Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#40875 closed defect (fixed)

mongodb 2.4 branch can't install on Mavericks

Reported by: moderndeveloperllc (Mark Garrett) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.99
Keywords: mavericks Cc: emirotin (Eugene Mirotin), juanhernandezgomez@…, p.perroud@…, skler84@…, hacker@…, slava@…, hertcloud@…, csaltos@…, brandon.zacharie@…, nick.lavrik@…, oliver.bock@…, papachoco@…, mitch@…, pleusmann@…, jchauvel@…, roger.clivio@…
Port: mongodb

Description

It looks like mongodb 2.4.x won't be supported on OSX 10.9/Xcode 5.0.1 by default due to changes Apple made with their compilers:

https://jira.mongodb.org/browse/SERVER-10644

The bottom comments may provide a patch solution, though I don't know enough about scons to even attept it. The in-development 2.5.x master supposedly works. Perhaps a mongodb-dev port?

Attachments (2)

patch-mavericks.diff (3.1 KB) - added by slava@… 10 years ago.
patch for mavericks
Portfile.diff (515 bytes) - added by slava@… 10 years ago.

Download all attachments as: .zip

Change History (47)

comment:1 Changed 10 years ago by emirotin (Eugene Mirotin)

+1 for this, quite critical — mongo stopped working after the OS upgrade, I removed it and now I cannot re-install it

comment:2 Changed 10 years ago by emirotin (Eugene Mirotin)

Cc: emirotin@… added

Cc Me!

comment:3 Changed 10 years ago by juanhernandezgomez@…

Cc: juanhernandezgomez@… added

Cc Me!

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Keywords: 10.9 removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

I'll see what I can do. Meanwhile, anyone needing mongodb (or anything else that doesn't work on Mavericks yet) should not upgrade to Mavericks! :) Check compatibility of your apps before you upgrade your OS.

comment:5 Changed 10 years ago by p.perroud@…

Cc: p.perroud@… added

Cc Me!

comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #40890.

comment:7 Changed 10 years ago by dominik.zogg@…

+1

comment:8 Changed 10 years ago by skler84@…

+1 ! :)

comment:9 Changed 10 years ago by skler84@…

Cc: skler84@… added

Cc Me!

comment:10 Changed 10 years ago by moderndeveloperllc (Mark Garrett)

For those of us who run with scissors in dark rooms filled with marbles and install major OS releases on the first day:

If you MUST get mongo running now, download the binaries from http://www.mongodb.org/downloads. You can then start the server up manually with (assuming default paths):

sudo -u _mongo <<path_to_mongod_binary>> --dbpath /opt/local/var/db/mongodb --logpath /opt/local/var/log/mongodb/mongodb.log --logappend

MacPorts will not know mongodb is installed, so any libraries that have it as a prereq will not build. If you are using PHP, install the needed extension via pecl:

port install pear-install-phar pear-PEAR
pecl install mongo

You will need to follow the install directions to make sure the .so gets loaded. I just duplicated a file that already existed in /opt/local/var/db/php<<your_php_version>> and changed its extension= declaration to mongo.so. I'm not a Python user, but I think y'all can use pip to install your extension.

Since this is a trouble ticket and not a help forum, please direct questions about the above directly to my email. I may be able to help, I may not.

comment:11 Changed 10 years ago by phuoc@…

+1

Currently, I have to use the workaround suggested by Mark!

comment:12 Changed 10 years ago by hacker@…

Cc: hacker@… added

Cc Me!

comment:13 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I have a mongodb-devel in progress, but it doesn't build on Mavericks either. Next I'll want to try it on earlier OS X versions.

Changed 10 years ago by slava@…

Attachment: patch-mavericks.diff added

patch for mavericks

Changed 10 years ago by slava@…

Attachment: Portfile.diff added

comment:14 Changed 10 years ago by slava@…

Hi I created patch that work on Mavericks. Maybe someone test it on Mountain Lion and Lion.

comment:15 Changed 10 years ago by slava@…

Cc: slava@… added

Cc Me!

comment:16 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks. That patch looks very simple. The developers of mongodb made it sound like backporting Mavericks compatibility to the 2.4 branch would be prohibitively difficult. Have you run these changes by them to see if this is really all that's needed?

comment:17 Changed 10 years ago by slava@…

I don't fully understand the question. On my machine these patch works. I tried make patch more universal, in order to be able suggest it to upstream.

comment:19 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I'm suggesting that you attach your patch to the upstream bug report and get confirmation from the developers that it is the correct fix for the problem.

comment:20 Changed 10 years ago by slava@…

Hi I've attached this patch to upstream bug tracker. I was a bit confused, because bug has resolved status in theirs bug tracker.

comment:21 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: hertcloud@… added

Has duplicate #40976.

comment:22 Changed 10 years ago by srogers (Steve Rogers)

This is the error that's preventing build for me: https://jira.mongodb.org/browse/SERVER-10644

comment:23 Changed 10 years ago by csaltos@…

Cc: csaltos@… added

Cc Me!

comment:24 Changed 10 years ago by csaltos@…

As commented in the mongodb ticket SERVER-10644: The patch is already applied by mongodb at the master branch: https://github.com/mongodb/mongo/commit/c70a72b151fcfab26d0db5e8ceeb7c04a96ce449 but I think this is the 2.5 !!

comment:25 Changed 10 years ago by slava@…

Yes this for 2.5, my patch works on 2.4.

comment:26 Changed 10 years ago by p.perroud@…

This defect was first reported 2+ months ago but nothing seems to be done about it: is'nt time to move on? The proposal made in ticket header about a mongodb-dev port is interesting but what would happen about it in the long terms? If 2 different ports were the solution then I would recommand a stable mongodb port and an unstable mongodb-dev port. But this leads to version issues since 2.4 was actually an unstable - the last stable being 2.2.6 as shown here: http://www.mongodb.org/downloads. Is it possible to downgrade the existing port to 2.2.6 to build a stable port then create a mongodb-dev unstable port with patched 2.4 or 2.5? To put all this in perspective, I am also using mongodb on a Debian 7 server and the version it runs is 2.0.6: http://packages.debian.org/wheezy/mongodb-server.

comment:27 Changed 10 years ago by brandon.zacharie@…

Cc: brandon.zacharie@… added

Cc Me!

The submitted patch worked for me.

Last edited 10 years ago by brandon.zacharie@… (previous) (diff)

comment:28 in reply to:  26 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to p.perroud@…:

But this leads to version issues since 2.4 was actually an unstable - the last stable being 2.2.6 as shown here: http://www.mongodb.org/downloads.

When the second digit is even, it is stable. 2.4.x is the latest stable series. When the second digit is odd, it is unstable/development. 2.5.x is the latest unstable/development series.

comment:29 in reply to:  28 ; Changed 10 years ago by p.perroud@…

Replying to ryandesign@…:

When the second digit is even, it is stable. 2.4.x is the latest stable series. When the second digit is odd, it is unstable/development. 2.5.x is the latest unstable/development series.

But they do have a 2.4 "nightly" classified as "unstable"...

May be we could agree on a different terminolgy: even (2.4) standing for "production" and odd (2.5) for "development".

In my understanding the Mavericks issue was addressed in the 2.5 branch 2 months ago and will never reach the 2.4: this is why we are stuck in this issue today.

Since a port is supposed to provide the original package, patching the official 2.4.7 to build on Mavericks is hardly an option. Which means the next "production" release that builds on Mavericks will be 2.6 - in many months from now.

For Mavericks users a new mongodb-dev 2.5.x port that would compile on XCode 5 should be provided ASAP - assuming the issue was really fixed in the 2.5 branch indeed. The existing 2.4.7 mongodb "production" port should require XCode 4, redirecting Mavericks users to mongodb-dev port.

In the future, the "production" port would increment even versions and the "development" port would increment odd versions.

When both ports will be installed on same machine, only one should be "active" at a time: doing it that way it would be possible to switch from "development" to "production" (and back) simply by changing the active mongodb port on this machine.

Is this making sense?

Last edited 10 years ago by p.perroud@… (previous) (diff)

comment:31 Changed 10 years ago by nick.lavrik@…

Cc: nick.lavrik@… added
Last edited 10 years ago by nick.lavrik@… (previous) (diff)

comment:32 Changed 10 years ago by oliver.bock@…

Cc: oliver.bock@… added

Cc Me!

comment:33 in reply to:  29 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to p.perroud@…:

Is this making sense?

Yes; you've described how -devel ports work in MacPorts. But as I said, though I have locally developed a mongodb-devel (sub)port, it does not compile. Meanwhile we already have a patch above that should allow mongodb 2.4.x to build on Mavericks. I intend to compare it with the fix that was committed to the official sources for 2.5.x and then add a version of it to our mongodb port and forgo adding a mongodb-devel (sub)port for now.

comment:34 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: papachoco@… added

Has duplicates #41067, #41081.

comment:35 in reply to:  33 Changed 10 years ago by p.perroud@…

Replying to ryandesign@…:

I intend to compare it with the fix that was committed to the official sources for 2.5.x and then add a version of it to our mongodb port and forgo adding a mongodb-devel (sub)port for now.

OK so what you are telling us is: be patient - a new 2.4.x port that builds on Mavericks will show up as soon as you could solved it up from the fix the mongodb team put in their 2.5 branch 2 months ago. Is that correct?

Now about the postpone -dev port: I don't know if it's only me but I would have the use for such a cutting edge port, just to let you know. My production server being a 2.0 on debian 7 linux, a 2.4 on macosx is not as good as a 2.5 would be for R&D ...

comment:36 Changed 10 years ago by mitch@…

Cc: mitch@… added

Cc Me!

comment:37 Changed 10 years ago by mitch@…

Trying to figure if we need to ditch macports support for mongo for now, or wait... My development team is waiting on the mavericks update, as I told them to wait for me to blow up my laptop (which I'm glad I did, as we cannot afford to lose productivity right now).

How long before macports and mavericks can support mongo? Can I do anything to help?

comment:38 in reply to:  description Changed 10 years ago by pleusmann@…

Found the button for CC ;)

Last edited 10 years ago by pleusmann@… (previous) (diff)

comment:39 Changed 10 years ago by pleusmann@…

Cc: pleusmann@… added

Cc Me!

comment:40 Changed 10 years ago by jchauvel@…

Cc: jchauvel@… added

Cc Me!

comment:41 Changed 10 years ago by roger.clivio@…

Cc: roger.clivio@… added

Cc Me!

comment:42 in reply to:  14 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to slava@…:

Hi I created patch that work on Mavericks. Maybe someone test it on Mountain Lion and Lion.

Thanks. I wanted to understand why the patch was different from what upstream committed in c70a72b151fcfab26d0db5e8ceeb7c04a96ce449. I've now had a chance to look into it, tried the build with just the upstream patch, saw the build problems, found that most of the remaining parts of the patch were also from upstream changes in bafd5c286f824ddcacc4376af1db35e5e8f11ea1 and a25c25b030cd2f35db1e0e0e9e32ca9efbc8a5f1. So that's fine.

I've committed the fixes in r112860 though I split it into a few patches, one per upstream change.

comment:43 in reply to:  42 ; Changed 10 years ago by p.perroud@…

Resolution: fixed
Status: closedreopened

Replying to ryandesign@…:

I've committed the fixes in r112860 though I split it into a few patches, one per upstream change.

2.4.8 is building fine on Mavericks but mongo shell is still not working:

--->  Installing mongodb @2.4.8_0
--->  Activating mongodb @2.4.8_0
--->  Cleaning mongodb
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
$ sudo port load mongodb
$ mongo
MongoDB shell version: 2.4.8
connecting to: test
Sun Nov  3 11:05:10.924 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed
$ ps -afx | grep mongodb
    0 76771     1   0 11:05AM ??         0:00.00 /opt/local/bin/daemondo --label=mongodb --start-cmd sudo -u _mongo /opt/local/bin/mongod --dbpath /opt/local/var/db/mongodb --logpath /opt/local/var/log/mongodb/mongodb.log --logappend ; --pid=exec
    0 76772 76771   0 11:05AM ??         0:00.01 sudo -u _mongo /opt/local/bin/mongod --dbpath /opt/local/var/db/mongodb --logpath /opt/local/var/log/mongodb/mongodb.log --logappend
  500 76773 76772   0 11:05AM ??         0:00.49 /opt/local/bin/mongod --dbpath /opt/local/var/db/mongodb --logpath /opt/local/var/log/mongodb/mongodb.log --logappend
  

comment:44 in reply to:  43 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

Replying to p.perroud@…:

Replying to ryandesign@…:

I've committed the fixes in r112860 though I split it into a few patches, one per upstream change.

2.4.8 is building fine on Mavericks but mongo shell is still not working:

It is working for me. Could you file a new ticket? Let's consider this issue, which was about getting mongodb to build on Mavericks, solved.

comment:45 in reply to:  44 Changed 10 years ago by emirotin (Eugene Mirotin)

Replying to ryandesign@…:

It is working for me. Could you file a new ticket? Let's consider this issue, which was about getting mongodb to build on Mavericks, solved.

Mongo shell works for me as well.

Thank you for the fix.

comment:46 in reply to:  44 Changed 10 years ago by p.perroud@…

Replying to ryandesign@…:

Replying to p.perroud@…:

Replying to ryandesign@…:

I've committed the fixes in r112860 though I split it into a few patches, one per upstream change.

2.4.8 is building fine on Mavericks but mongo shell is still not working:

It is working for me. Could you file a new ticket? Let's consider this issue, which was about getting mongodb to build on Mavericks, solved.

Well - that won't be necessary: after I re-installed it once again the shell seems to be working fine - more verbose than usual but it works - thank you.

$ mongo
MongoDB shell version: 2.4.8
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
	http://docs.mongodb.org/
Questions? Try the support group
	http://groups.google.com/group/mongodb-user
> db
test
> 
Note: See TracTickets for help on using tickets.