Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#50635 closed defect (worksforme)

boost @1.59 does not build on Snow Leopard

Reported by: steven.dwyer@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: snowleopard Cc:
Port: boost

Description

Trying to install boost 1.59.0 using MacPorts 2.3.4 on Snow Leopard (10.6.8) fails with the following output:

$ sudo port install boost
--->  Computing dependencies for boost
--->  Fetching archive for boost
--->  Attempting to fetch boost-1.59.0_2+no_single+no_static+python27.darwin_10.i386.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/boost
--->  Attempting to fetch boost-1.59.0_2+no_single+no_static+python27.darwin_10.i386.tbz2 from http://lil.fr.packages.macports.org/boost
--->  Attempting to fetch boost-1.59.0_2+no_single+no_static+python27.darwin_10.i386.tbz2 from http://packages.macports.org/boost
--->  Fetching distfiles for boost
--->  Attempting to fetch boost_1_59_0.tar.bz2 from http://kent.dl.sourceforge.net/project/boost/boost/1.59.0
--->  Verifying checksums for boost                                                  
--->  Extracting boost
--->  Applying patches to boost
--->  Configuring boost
--->  Building boost
Error: org.macports.build for port boost returned: command execution failed
Please see the log file for port boost for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_boost/boost/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port boost failed

I have attached the main.log.

Cleaning the port did not work. I have successfully downloaded boost 1.59 and built this manually so I do not believe it is a boost issue.

Attachments (1)

main.log.gz (22.9 KB) - added by steven.dwyer@… 8 years ago.
Log file

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by steven.dwyer@…

Attachment: main.log.gz added

Log file

comment:1 Changed 8 years ago by steven.dwyer@…

Failure from log:

:info:build ld: bad codegen, pointer diff in boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >::basic_text_iprimitive(std::basic_istream<char, std::char_traits<char> >&, bool)to global weak symbol vtable for boost::archive::codecvt_null<char>for architecture i386
:info:build collect2: ld returned 1 exit status
:info:build ...failed darwin.link.dll stage/lib/libboost_serialization-mt.dylib...

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: snowleopard added; 1.59 snow leopard removed
Milestone: MacPorts Future
Owner: changed from macports-tickets@… to ryandesign@…

Might be relevant that this is occurring on i386 not x86_64.

What version of Xcode are you using? Did you recently change the version of Xcode? Some hits on Google for this error suggest the reason is mixing binaries compiled with different compilers.

comment:3 Changed 8 years ago by steven.dwyer@…

Nope, not touched the Xcode version. Currently running 4.0.2 (Build 4A2002a).

The error had originally occurred during an upgrade, however, I removed all my installed ports and started again from scratch but the error still occurs.

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

Ok, there could just be a bug in the compiler in Xcode 4.0.2. Is there a specific reason why you need Xcode 4.0.2? Xcode 3.2.6 is recommended for MacPorts on Snow Leopard because it is the last free version for Snow Leopard so it's the best-tested one.

comment:5 Changed 8 years ago by steven.dwyer@…

That's just what I have installed - has been installed for ages. I did see something that referred to 3.2.6 being the last free version but I've never paid for Xcode so not sure how I've got 4.0.2.

I will roll back to 3.2.6 and retry.

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

Ok. Make sure you run the uninstall-devtools script and restart the computer before installing an older version of Xcode, as it says in the Xcode readme.

comment:7 Changed 8 years ago by steven.dwyer@…

Thanks. That's solved it! Boost 1.59 successfully installed with Xcode 3.2.6.

comment:8 Changed 8 years ago by mojca (Mojca Miklavec)

Resolution: worksforme
Status: newclosed

comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

I originally thought the problem must be that with Xcode 4 you would be using llvm-gcc-4.2. But that's not the case because the boost port already blacklists llvm-gcc-4.2. So with Xcode 4 boost is using gcc-4.2, same as on Xcode 3. And according to XcodeVersionInfo#MacOSX10.6, Xcode 3.2.6, 4.0, and 4.1 use the same version of gcc-4.2: 5666 dot 3. So I'm at a loss to explain why it would fail with Xcode 4, and also our usual compiler blacklisting methods could not be used to work around this, since they work by looking at the compiler version number.

Note: See TracTickets for help on using tickets.