Opened 11 years ago

Closed 11 years ago

#38890 closed defect (duplicate)

perl5.12 @5.12.4_2 upgrade from _1 fails to build, arch mismatch

Reported by: gthb (Gunnlaugur Thor Briem) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: perl5.12

Description

A normal port upgrade outdated fails for me on perl5.12, with the following salient bit in the log:

:info:build /usr/bin/clang -L/opt/local/lib -arch x86_64 -arch i386 -fstack-protector -force_flat_namespace -o miniperl \
:info:build 	      gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   \
:info:build 	    miniperlmain.o opmini.o perlmini.o -ldl -lm -lutil -lc 
: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

Presumably this is because my existing installed perl5.12 has a +universal variant:

$ port installed perl5.12
The following ports are currently installed:
  perl5.12 @5.12.4_1+universal (active)

whereas my installed libstdcxx-devel does not:

$ port installed libstdcxx-devel
The following ports are currently installed:
  libstdcxx-devel @4.8-20121216_0 (active)
$ file /opt/local/lib/libstdc++.6.dylib
/opt/local/lib/libstdc++.6.dylib: Mach-O 64-bit x86_64 dynamically linked shared library

And indeed port clean perl5.12; port install perl5.12 -universal worked just fine, after which port upgrade outdated was able to proceed normally.

Don't know how this +universal mismatch arose. I didn't demote libstdcxx-devel from +universal (assuming that was installed previously) to 64-bit-only. Not on purpose at least! And I didn't purposely install perl5.12 with the +universal variant either.

In any case, the perl5.12 +universal port variant should probably explicitly declare the dependency on libstdcxx-devel +universal, rather than fail with a build error with the reason hidden away in a logfile.

Change History (1)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: duplicate
Status: newclosed

perl5.12 does not actually use libstdc++, so there should be no dependency. This is a suspected bug in ld(1). Duplicate of #36438.

Note: See TracTickets for help on using tickets.