Opened 13 years ago
Closed 12 years ago
#33452 closed defect (worksforme)
coreutils: Undefined symbols for architecture x86_64
Reported by: | macports@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | Cc: | ||
Port: | coreutils |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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
Attachments (3)
Change History (9)
Changed 13 years ago by macports@…
Attachment: | main-apple-gcc-4.2.log added |
---|
Changed 13 years ago by macports@…
Attachment: | main-clang.log added |
---|
port install coreutils configure.compiler=clang
comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Summary: | Undefined symbols for architecture x86_64 → coreutils: Undefined symbols for architecture x86_64 |
comment:2 follow-up: 3 Changed 13 years ago by macports@…
I noticed that I did have Xcode 4.3 installed, but xcodebuild would still print "4.1". Switched to 4.3 now, but the error remains the same :-\
$ xcodebuild -version Xcode 4.3 Build version 4E109 $ xcode-select -print-path /Applications/Xcode.app/Contents/Developer
comment:3 follow-up: 4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to macports@…:
I noticed that I did have Xcode 4.3 installed, but xcodebuild would still print "4.1". Switched to 4.3 now,
How?
but the error remains the same :-\
Did you already "sudo port clean coreutils" and try again?
comment:4 Changed 13 years ago by macports@…
How?
Xcode 4.1 was installed as a .dmg (and was installed in /Developer), 4.3 installs via AppStore in /Applications, so I had to do:
$ xcode-select -switch /Applications/Xcode.app/Contents/Developer $ xcodebuild -version Xcode 4.3 Build version 4E109
When compiling w/o any configure.compiler= flags set, llvm-gcc-4.2 is used and from the main.log (attached) one can see that this points to "/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2" which is the version from the commandline-tools that was installed from within Xcode 4.3.
Did you already "sudo port clean coreutils" and try again?
Yes, after every failed attempt of "port install ..." I did the "port clean coreutils", even "port clean --all all" once.
comment:5 Changed 13 years ago by macports@…
Same as #33540: reinstalling MacPorts helped, coreutils now installs just fine. Again, sorry for the noise.
comment:6 Changed 12 years ago by jmroot (Joshua Root)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
port install coreutils configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2