Opened 12 years ago

Closed 12 years ago

#34297 closed defect (fixed)

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

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: tiger powerpc Cc: p3k (Tobi Schäfer)
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 (1)

ld64-main.log (11.6 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: ld64-main.log added

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

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 12 years ago by p3k (Tobi Schäfer)

Same error here, confirming this issue.

comment:3 Changed 12 years ago by p3k (Tobi Schäfer)

Cc: interface@… added

Cc Me!

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

Status: newassigned

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 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

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

chicken, meet egg... crap...

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

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 12 years ago by ryandesign (Ryan Carsten Schmidt)

ld64 does build with that patch, thanks.

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

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.