New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #34297 (closed defect: fixed)

Opened 14 months ago

Last modified 13 months ago

ld64: /usr/bin/ld: unknown flag: -exported_symbol

Reported by: ryandesign@… Owned by: jeremyhu@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: tiger powerpc Cc: interface@…
Port: ld64

Description

I can't build ld64 97.17 on Tiger ppc. It says:

make: Entering directory `/mp/var/macports/build/_Volumes_data_macports_ports_devel_ld64/ld64/work/ld64-97.17'
/mp/bin/g++-apple-4.2 -Os -O2 -arch ppc  -Isrc/abstraction -Isrc/ld -I/mp/include  -c -o src/other/ObjectDump.o src/other/ObjectDump.cpp
/mp/bin/gcc-apple-4.2 -Os -O2 -arch ppc  -Isrc/abstraction -Isrc/ld -I/mp/include  -c -o src/ld/debugline.o src/ld/debugline.c
/mp/bin/g++-apple-4.2  -L/mp/lib -arch ppc src/other/ObjectDump.o src/ld/debugline.o -o ObjectDump
/usr/bin/ld: warning multiple definitions of symbol _atexit
/mp/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/crt3.o private external definition of _atexit in section (__TEXT,__text)
/usr/lib/libSystem.dylib(atexit.So) definition of _atexit
/usr/bin/ld: warning multiple definitions of symbol ___cxa_atexit
/mp/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/crt3.o private external definition of ___cxa_atexit in section (__TEXT,__text)
/usr/lib/libSystem.dylib(atexit.So) definition of ___cxa_atexit
/mp/bin/g++-apple-4.2 -Os -O2 -arch ppc  -Isrc/abstraction -Isrc/ld -I/mp/include  -c -o src/other/dyldinfo.o src/other/dyldinfo.cpp
/mp/bin/g++-apple-4.2 -L/mp/lib -arch ppc -Wl,-exported_symbol,__mh_execute_header src/other/dyldinfo.o -o dyldinfo
/usr/bin/ld: unknown flag: -exported_symbol

Attachments

ld64-main.log (11.6 KB) - added by ryandesign@… 14 months ago.

Change History

Changed 14 months ago by ryandesign@…

comment:1 Changed 14 months ago by ryandesign@…

In fact I have a previous version installed, ld64 @62.1_4; if I try to upgrade while that version is active, then the error is:

ld64-62.1 failed: unknown option: -exported_symbol

comment:2 Changed 13 months ago by interface@…

Same error here, confirming this issue.

comment:3 Changed 13 months ago by interface@…

  • Cc interface@… added

Cc Me!

comment:4 Changed 13 months ago by jeremyhu@…

  • Status changed from new to assigned

Install the ld64 port.

I welcome testing of the apple-gcc42 port in my overlay, which should take care of this issue without breaking Tiger:

https://github.com/jeremyhu/dports_jeremyhu

comment:5 Changed 13 months ago by jeremyhu@…

Oh wait... this is in building ld64...

chicken, meet egg... crap...

comment:6 Changed 13 months ago by jeremyhu@…

Please give this a try:

Index: Portfile
===================================================================
--- Portfile	(revision 92790)
+++ Portfile	(working copy)
@@ -92,6 +92,11 @@
             }
         }
     }
+
+    post-patch {
+        reinplace "s:-Wl,-exported_symbol,__mh_execute_header::g" \
+            ${worksrcpath}/Makefile
+    }
 }
 
 if {${configure.compiler} == "gcc-4.0"} {

comment:7 Changed 13 months ago by ryandesign@…

ld64 does build with that patch, thanks.

comment:8 Changed 13 months ago by jeremyhu@…

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.