Opened 13 years ago

Last modified 12 years ago

#33452 closed defect

Undefined symbols for architecture x86_64 — at Initial Version

Reported by: macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: coreutils

Description

Compiling coreutils on Mac OS X (Lion) fails with the infamous "Undefined symbols for architecture x86_64" error, see #32123, #33407. Unfortunately forcing a different compiler (as suggested in the tickets and in the documentation did not help here.

$ port clean coreutils
$ port install apple-gcc42
$ port install coreutils configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2

From the main.log:

[...]
:info:build   CC     su.o
:info:build   AR     libver.a
:info:build   CCLD   chroot
:info:build ld: warning: ignoring file libver.a, file was built for archive which is not the architecture being linked (x86_64)
:info:build ld: warning: ignoring file ../lib/libcoreutils.a, file was built for archive which is not the architecture being linked (x86_64)
:info:build Undefined symbols for architecture x86_64:
:info:build   "_xstrdup", referenced from:
:info:build       _set_additional_groups in chroot.o

Setting configure.compiler to "llvm-gcc-4.2" or "gcc-4.2" did not help, although one could see in the buildlog that the setting was honored and llvm-gcc-4.2 resp. gcc-4.2 (resp. apple-gcc42) was used.

$ sw_vers 
ProductName:    Mac OS X
ProductVersion: 10.7.3
BuildVersion:   11D50

$ port version
Version: 2.0.4

$ xcodebuild -version
Xcode 4.1
Build version 4B110

Change History (3)

Changed 13 years ago by macports@…

Attachment: main-apple-gcc-4.2.log added

port install coreutils configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2

Changed 13 years ago by macports@…

Attachment: main-clang.log added

port install coreutils configure.compiler=clang

Changed 13 years ago by macports@…

Attachment: main-plain.log added

port install coreutils

Note: See TracTickets for help on using tickets.