Opened 9 years ago

Closed 9 years ago

#46640 closed defect (fixed)

ld64 @136_3 +llvm34+universal (i386 + x86_64 + ppc): build fails with "'OSAtomicAdd64' was not declared in this scope" and "#error unknown default architecture"

Reported by: larryv (Lawrence Velázquez) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: ld64

Description

This is on Snow Leopard; I haven’t tried Leopard yet.

:info:build /usr/bin/g++-4.2 -Os -Os  -arch x86_64 -arch i386 -arch ppc -I/opt/local/libexec/llvm-3.4/include -DLTO_SUPPORT -Isrc/abstraction -Isrc/ld -Isrc/ld/parsers -I/opt/local/include  -c -o src/ld/InputFiles.o src/ld/InputFiles.cpp
:info:build src/ld/InputFiles.cpp:667:3: error: #error unknown default architecture
:info:build src/ld/InputFiles.cpp: In member function ‘ld::File* ld::tool::InputFiles::makeFile(const Options::FileInfo&, bool)’:
:info:build src/ld/InputFiles.cpp:282: error: ‘OSAtomicAdd64’ was not declared in this scope
:info:build src/ld/InputFiles.cpp:290: error: ‘OSAtomicAdd64’ was not declared in this scope
:info:build src/ld/InputFiles.cpp:312: error: ‘OSAtomicAdd64’ was not declared in this scope
:info:build fatal error: lipo: can't figure out the architecture type of: /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git_trunk_dports_devel_ld64/ld64/work/.tmp/ccoYDVjJ.out
:info:build make: *** [src/ld/InputFiles.o] Error 1

Attachments (2)

main.log (58.9 KB) - added by larryv (Lawrence Velázquez) 9 years ago.
single-threaded log
ld64-snowleopard-ppc.patch (809 bytes) - added by larryv (Lawrence Velázquez) 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by larryv (Lawrence Velázquez)

Attachment: main.log added

single-threaded log

comment:1 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

We need to force Using ld64-127 when ppc is a universal arch.

Changed 9 years ago by larryv (Lawrence Velázquez)

Attachment: ld64-snowleopard-ppc.patch added

comment:2 Changed 9 years ago by larryv (Lawrence Velázquez)

This change worked for me.

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

works for me. push it.

comment:4 in reply to:  3 Changed 9 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

Thanks! r131926

Note: See TracTickets for help on using tickets.