Opened 12 years ago

Closed 12 years ago

#36444 closed defect (duplicate)

perl 5.12 +universal build failed

Reported by: poorsod@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: perl5.12

Description

Perl 5.12 +universal is a dependency of Wine. When I try and install it (either using 'sudo port install wine' or 'sudo port install perl5.12 +universal') I get the following error:

Error: org.macports.build for port perl5.12 returned: command execution failed
Error: Failed to install perl5.12
Please see the log file for port perl5.12 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5.12/perl5.12/main.log

I've tried cleaning the ports and reinstalling several times. Attached is the log file, which contains the following two lines:

:info:build ld: in /opt/local/lib/libstdc++.6.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libstdc++.6.dylib for architecture i386

and

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5.12/perl5.12/work/perl-5.12.4" && /usr/bin/make -j2 -w all 

I hope this is enough information. Thanks, Benjamin Hodgson

Attachments (1)

main.log (119.4 KB) - added by poorsod@… 12 years ago.
perl5.12 main.log file

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by poorsod@…

Attachment: main.log added

perl5.12 main.log file

comment:1 Changed 12 years ago by poorsod@…

PS, I am using Mountain Lion 10.8.2 with MacPorts 2.1.2.

comment:2 Changed 12 years ago by manphiz@…

Looks like you have built libstdcxx or libstdcxx-devel which is not universal. Try rebuild it with +universal as well.

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

It shoudln't be using /opt/local/lib/libstdc++.6.dylib unless it's being built with one of MacPorts' gcc4X compilers...

comment:4 in reply to:  2 Changed 12 years ago by poorsod@…

Replying to manphiz@…:

Looks like you have built libstdcxx or libstdcxx-devel which is not universal. Try rebuild it with +universal as well.

Thank you! 'sudo port -f uninstall libstdcxx' followed by 'sudo port clean libstdcxx' and 'sudo port install libstdcxx +universal' seems to have done the trick.

Caveat lector, for anyone else with the same problem: it took a very long time to build, so don't do it unless you really have to.

comment:5 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

You're missing the bigger issue poorsod. It shouldn't be linking against /opt/local/lib/libstdc++.6.dylib from what I can tell from the build log. Please try to figure out why it's trying to link against /opt/local/lib/libstdc++.6.dylib instead of /usr/lib/libstdc++.dylib

For the life of me, I can't seem to trick clang into asking the linker to use /opt/local/lib/libstdc++.6.dylib (unless I pass in the full path to /opt/local/lib/libstdc++.6.dylib). I tried setting LIBRARY_PATH and making my environment as close to what is used at build time, but it's still using /usr/lib/libstdc++.dylib.

Can you please try to reproduce this issue and rerun the link command with -v, so clang will output the command line it is using to call ld?

comment:6 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: duplicate
Status: newclosed

#36438 ... seems to be an issue with ld64.

Note: See TracTickets for help on using tickets.