#30598 closed defect (fixed)
mongodb 1.8.2: Build fails on Lion with Xcode 4.2
Reported by: | verwymeren@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.1 |
Keywords: | lion clang | Cc: | neeraj.sharma@…, rk@… |
Port: | mongodb |
Description
Mac OS X Lion 10.7 (11A511) Xcode 4.2 (4D139)
Log file attached. Terminal output below:
---> Computing dependencies for mongodb ---> Dependencies to be installed: boost icu libpcap scons python26 gdbm python_select spidermonkey nspr ---> Fetching archive for icu ---> Attempting to fetch icu-4.6.1_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/icu ---> Fetching icu ---> Attempting to fetch icu4c-4_6_1-src.tgz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/icu ---> Verifying checksum(s) for icu ---> Extracting icu ---> Applying patches to icu ---> Configuring icu ---> Building icu ---> Staging icu into destroot ---> Installing icu @4.6.1_0 ---> Activating icu @4.6.1_0 ---> Cleaning icu ---> Fetching archive for boost ---> Attempting to fetch boost-1.47.0_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/boost ---> Fetching boost ---> Attempting to fetch boost_1_47_0.tar.bz2 from http://downloads.sourceforge.net/boost ---> Verifying checksum(s) for boost ---> Extracting boost ---> Applying patches to boost ---> Configuring boost ---> Building boost ---> Staging boost into destroot ---> Installing boost @1.47.0_0 ---> Activating boost @1.47.0_0 ---> Cleaning boost ---> Fetching archive for libpcap ---> Attempting to fetch libpcap-1.1.1_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/libpcap ---> Fetching libpcap ---> Attempting to fetch libpcap-1.1.1.tar.gz from http://www.tcpdump.org/release/ ---> Verifying checksum(s) for libpcap ---> Extracting libpcap ---> Applying patches to libpcap ---> Configuring libpcap ---> Building libpcap ---> Staging libpcap into destroot ---> Installing libpcap @1.1.1_0 ---> Activating libpcap @1.1.1_0 ---> Cleaning libpcap ---> Fetching archive for gdbm ---> Attempting to fetch gdbm-1.8.3_3.darwin_11.x86_64.tbz2 from http://packages.macports.org/gdbm ---> Fetching gdbm ---> Attempting to fetch gdbm-1.8.3.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gdbm ---> Verifying checksum(s) for gdbm ---> Extracting gdbm ---> Configuring gdbm ---> Building gdbm ---> Staging gdbm into destroot ---> Installing gdbm @1.8.3_3 ---> Activating gdbm @1.8.3_3 ---> Cleaning gdbm ---> Fetching archive for python_select ---> Attempting to fetch python_select-0.3_1.darwin_11.noarch.tbz2 from http://packages.macports.org/python_select ---> Fetching python_select ---> Verifying checksum(s) for python_select ---> Extracting python_select ---> Configuring python_select ---> Building python_select ---> Staging python_select into destroot ---> Installing python_select @0.3_1 ---> Activating python_select @0.3_1 ---> Cleaning python_select ---> Fetching archive for python26 ---> Attempting to fetch python26-2.6.7_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/python26 ---> Fetching python26 ---> Attempting to fetch Python-2.6.7.tar.bz2 from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/python26 ---> Verifying checksum(s) for python26 ---> Extracting python26 ---> Applying patches to python26 ---> Configuring python26 ---> Building python26 ---> Staging python26 into destroot ---> Installing python26 @2.6.7_0 ---> Activating python26 @2.6.7_0 To make python 2.6 the default (i.e. the version you get when you run 'python'), please run: sudo port select --set python python26 ---> Cleaning python26 ---> Fetching archive for scons ---> Attempting to fetch scons-2.0.1_0.darwin_11.noarch.tbz2 from http://packages.macports.org/scons ---> Fetching scons ---> Attempting to fetch scons-2.0.1.tar.gz from http://voxel.dl.sourceforge.net/scons ---> Verifying checksum(s) for scons ---> Extracting scons ---> Applying patches to scons ---> Configuring scons ---> Building scons ---> Staging scons into destroot ---> Installing scons @2.0.1_0 ---> Activating scons @2.0.1_0 ---> Cleaning scons ---> Fetching archive for nspr ---> Attempting to fetch nspr-4.8.8_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/nspr ---> Fetching nspr ---> Attempting to fetch nspr-4.8.8.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/nspr ---> Verifying checksum(s) for nspr ---> Extracting nspr ---> Configuring nspr ---> Building nspr ---> Staging nspr into destroot ---> Installing nspr @4.8.8_0 ---> Activating nspr @4.8.8_0 ---> Cleaning nspr ---> Fetching archive for spidermonkey ---> Attempting to fetch spidermonkey-1.7.0_5.darwin_11.x86_64.tbz2 from http://packages.macports.org/spidermonkey ---> Fetching spidermonkey ---> Attempting to fetch js-1.7.0.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/spidermonkey ---> Verifying checksum(s) for spidermonkey ---> Extracting spidermonkey ---> Applying patches to spidermonkey ---> Configuring spidermonkey ---> Building spidermonkey ---> Staging spidermonkey into destroot ---> Installing spidermonkey @1.7.0_5 ---> Activating spidermonkey @1.7.0_5 ---> Cleaning spidermonkey ---> Fetching archive for mongodb ---> Attempting to fetch mongodb-1.8.2_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/mongodb ---> Fetching mongodb ---> Attempting to fetch mongodb-src-r1.8.2.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/mongodb ---> Verifying checksum(s) for mongodb ---> Extracting mongodb ---> Applying patches to mongodb ---> Configuring mongodb ---> Building mongodb Error: Target org.macports.build returned: shell command failed (see log for details) Log for mongodb is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mongodb/mongodb/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
Attachments (2)
Change History (22)
Changed 13 years ago by verwymeren@…
comment:1 follow-up: 2 Changed 13 years ago by jmroot (Joshua Root)
Keywords: | mongodb removed |
---|
The log shows clang crashing. That's probably not something that can be fixed in the port. You should file a radar about this.
comment:2 Changed 13 years ago by verwymeren@…
I've filed a radar with Apple and copied it to OpenRadar at http://openradar.appspot.com/radar?id=1290406
comment:3 Changed 13 years ago by verwymeren@…
Workaround:
mongodb will build if the GNU Compiler is manually specified the on the command line.
sudo port install mongodb configure.cc=/usr/bin/gcc configure.cpp=/usr/bin/cpp configure.cxx=/usr/bin/g++
comment:4 Changed 13 years ago by verwymeren@…
Is it possible to modify the Portfile to check for the presence of the GNU Compiler tools and, if they exist, set configure.cc, configure.cpp and configure.cxx?
comment:5 Changed 13 years ago by jmroot (Joshua Root)
Does it work if you specify a lower optimisation level? For example:
sudo port -v install mongodb configure.optflags=-Os
comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | neeraj.sharma@… added |
---|
comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
mongodb has been updated to 2.0.1. Did that help?
comment:9 Changed 13 years ago by verwymeren@…
With mongodb 2.0.1 the build continues to fail when using clang. Using the workaround I posted to build with the GNU Compiler tools continues to work.
comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | clang added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Xcode 4.2 no longer includes the GNU compiler collection; it offers clang (which MacPorts uses by default) or llvm-gcc-4.2. Since clang did not work, I have modified the port in r86970 to use llvm-gcc-4.2 instead. If after waiting 30 minutse and running "sudo port selfupdate" and "sudo port clean mongodb" mongodb still won't build with Xcode 4.2, please reopen the ticket and attach the new main.log.
comment:11 Changed 13 years ago by verwymeren@…
Apple engineering have responded that Radar 9926858 has been fixed as of Xcode 4.3.
To verify, I copied the current mongodb 2.0.3 Portfile, removed the section that switches to llvm-gcc-4.2 and attempted to install. mongodb built without error.
comment:12 follow-up: 13 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Super; thanks for letting me know. I updated the port in r90960.
comment:14 follow-up: 15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | rk@… added |
---|
And does using llvm-gcc-4.2 instead of clang again fix it?
comment:15 Changed 13 years ago by rk@…
Replying to ryandesign@…:
Yes, using compiler override worked perfectly.
sudo port install mongodb configure.cc=/usr/bin/gcc configure.cpp=/usr/bin/cpp configure.cxx=/usr/bin/g++
comment:16 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
The ProblemHotlist never suggests using /usr/bin/gcc or /usr/bin/g++. We want to use a specific compiler, and /usr/bin/gcc and /usr/bin/g++ are usually symlinks. What are they symlinks to on your system?
comment:17 Changed 13 years ago by rk@…
/usr/bin/gcc -> llvm-gcc-4.2
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
/usr/bin/g++ -> llvm-g++-4.2
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
I found that Xcode 4.3 uses different versions:
LLVM build 2336.9.00
Does it make a difference? Not sure why it isn't global for my system. Since xcode went to app store with its non-global installation, I can't get a hold of it.
comment:18 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
So wait... You have Xcode 4.3, but Xcode 4.2.something's command line tools? Please update your command line tools so that they are the version that comes with Xcode 4.3. Read the Xcode 4.3 installation instructions in the Guide.
comment:19 Changed 13 years ago by rk@…
Can't check it as with today updated 4.3.2 xcode, command line no longer installs due to issue with permissions: http://prod.lists.apple.com/archives/xcode-users/2012/Mar/msg00619.html
comment:20 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
We are now blacklisting clang based on the clang version instead of the Xcode version (see #37123) so that users who have not upgraded their command line tools don't run into this build failure.
Log for mongodb located at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mongodb/mongodb/main.log