Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#35726 closed defect (duplicate)

mongodb @2.0.7 boost 1.49 Mountain Lion - build failure

Reported by: kinergy@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: francisdb@…, vkuznet (Valentin Kuznetsov)
Port: mongodb

Description

As documented in the last comment here: http://apple.stackexchange.com/questions/59804/macports-issues-after-mountain-lion-upgrade

It isn't possible to install mongodb on a Mountain Lion machine that didn't previously have mongo installed. The workaround to downgrade to boost 1.49 does NOT work as suggested because the command 'port install mongodb' will try to upgrade to boost 1.5 first.

Change History (10)

comment:1 in reply to:  description ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: kinergy@… removed
Owner: changed from macports-tickets@… to ryandesign@…

Replying to kinergy@…:

The workaround to downgrade to boost 1.49 does NOT work as suggested because the command 'port install mongodb' will try to upgrade to boost 1.5 first.

It works fine, as long as you tell MacPorts you don't want it to upgrade dependencies, by using the "-n" flag.

sudo port -n install mongodb

comment:2 in reply to:  1 Changed 12 years ago by kinergy@…

Thank you, worked like a charm - for the benefit of others who may be having this issue, here is what I did to downgrade boost and install mongodb:

sudo port activate boost @1.49.0_0
sudo port -n install mongodb

Replying to ryandesign@…:

Replying to kinergy@…: It works fine, as long as you tell MacPorts you don't want it to upgrade dependencies, by using the "-n" flag.

comment:3 Changed 12 years ago by vkuznet (Valentin Kuznetsov)

I have Lion and mongodb fails to upgrade. Initial error message is the following:

--->  Configuring mongodb
Error: mongodb 2.0.7 requires boost 1.49.x or older but you have boost 1.50.0.
Error: To downgrade boost, see https://trac.macports.org/wiki/howto/InstallingOlderPort
Error: or more specifically https://trac.macports.org/ticket/35118#comment:12
Error: org.macports.configure for port mongodb returned: boost 1.50.0 is too new
Please see the log file for port mongodb for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_mongodb/mongodb/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

I have

vk@localhost(11:01:05)> sudo port installed | grep boost
  boost @1.50.0_0 (active)
  boost-jam @3.1.18_0 (active)

so I don't know why mongodb port complains about boost. Then I tried to install previous boost and to my surprise it did not pick up correct version

vk@localhost(11:01:36)> sudo port install boost @1.49.0_0
--->  Computing dependencies for boost
--->  Fetching archive for boost
--->  Attempting to fetch boost-1.50.0_0+no_single+no_static.darwin_11.x86_64.tbz2 from http://packages.macports.org/boost
--->  Attempting to fetch boost-1.50.0_0+no_single+no_static.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/boost
--->  Installing boost @1.50.0_0+no_single+no_static
--->  Deactivating boost @1.50.0_0
--->  Cleaning boost
--->  Activating boost @1.50.0_0+no_single+no_static
--->  Cleaning boost
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

So when I checked what I have I got the following

vk@localhost(11:08:04)> sudo port installed | grep boost
Password:
  boost @1.50.0_0
  boost @1.50.0_0+no_single+no_static (active)
  boost-jam @3.1.18_0 (active)

Certainly there are two problems here.

  1. MongoDB asks for boost 1.49.x or newer and if system has newer version MongoDB port fails to install
  2. Asking to install boost 1.49.0 installs the wrong version of boost.

comment:4 Changed 12 years ago by francisdb@…

Cc: francisdb@… added

Cc Me!

comment:5 Changed 12 years ago by francisdb@…

dupe of #35118: defect: mongodb @2.0.6_0 broken after boost @1.50.0_0 update (new)?

comment:6 in reply to:  3 Changed 12 years ago by kinergy@…

If Boost 1.49 isn't already on your machine then my comment:2 above won't work. Try the following to install Boost 1.49 and then install MongoDB while suppressing upgrades:

sudo port install boost @1.49.0_0
sudo port -n install mongodb

comment:7 Changed 12 years ago by francisdb@…

does not work

sudo port uninstall boost
--->  Deactivating boost @1.50.0_0+no_single+no_static
--->  Cleaning boost
--->  Uninstalling boost @1.50.0_0+no_single+no_static
--->  Cleaning boost

sudo port install boost @1.49.0_0
--->  Computing dependencies for boost
--->  Fetching archive for boost
--->  Attempting to fetch boost-1.50.0_0+no_single+no_static.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/boost
--->  Attempting to fetch boost-1.50.0_0+no_single+no_static.darwin_12.x86_64.tbz2 from http://packages.macports.org/boost
--->  Fetching distfiles for boost
--->  Verifying checksum(s) for boost
--->  Extracting boost

comment:8 in reply to:  3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: vkuznet@… added
Resolution: duplicate
Status: newclosed

Replying to vkuznet@…:

--->  Configuring mongodb
Error: mongodb 2.0.7 requires boost 1.49.x or older but you have boost 1.50.0.
Error: To downgrade boost, see https://trac.macports.org/wiki/howto/InstallingOlderPort
Error: or more specifically https://trac.macports.org/ticket/35118#comment:12
Error: org.macports.configure for port mongodb returned: boost 1.50.0 is too new

The above error message completely explains the problem and the solution; please re-read it.

Certainly there are two problems here.

  1. MongoDB asks for boost 1.49.x or newer and if system has newer version MongoDB port fails to install

No, it asks for 1.49.x or older. This is a bug the mongodb developers need to fix.

  1. Asking to install boost 1.49.0 installs the wrong version of boost.

The "port install" command does not accept a version number; it always installs the currently-available version. This is not a bug; it's just how MacPorts works. If you want to install a different version than the currently-available one, you must follow the instructions in wiki:howto/InstallingOlderPort

After installing boost 1.49.0, install mongodb without upgrading dependencies:

sudo port -n install mongodb

comment:9 Changed 12 years ago by francisdb@…

thanks, so where is the bug/improvement ticket to make this process more user-friendly?

comment:10 Changed 12 years ago by dustin@…

If activating 1.49 doesn't work for you, it likely means you never had it and need to install it explicitly:

sudo port uninstall boost
svn co -r 93341 http://svn.macports.org/repository/macports/trunk/dports/devel/boost/
cd boost
sudo port install

sudo port -n install mongodb
Note: See TracTickets for help on using tickets.