[MacPorts] #43484: clang-3.4 @3.4 fails building on 10.5.8 PPC because cctools is too old
MacPorts
noreply at macports.org
Sat Oct 11 02:00:46 PDT 2014
#43484: clang-3.4 @3.4 fails building on 10.5.8 PPC because cctools is too old
-------------------------+------------------------
Reporter: braumann@… | Owner: jeremyhu@…
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Resolution: | Keywords: leopard
Port: clang-3.4 |
-------------------------+------------------------
Comment (by khepler@…):
I am admittedly in over my head, however it seems clang-3.4 is not using
the cctools @855_1+llvm34 ld:
{{{
[Vertigo:~/Projects/C++/UniqueString] kris% time clang++-mp-3.4 -O2 -v -o
unique.clang34 main.cpp
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: powerpc-apple-darwin9.8.0
Thread model: posix
Selected GCC installation:
"/opt/local/libexec/llvm-3.4/bin/clang" -cc1 -triple powerpc-apple-
darwin9.8.0 -S -disable-free -main-file-name main.cpp -mrelocation-model
static -mdisable-fp-elim -fmath-errno -target-linker-version 97.17 -v
-resource-dir /opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2 -O2
-fdeprecated-macro -fno-dwarf2-cfi-asm -fno-dwarf-directory-asm -fno-
autolink -fdebug-compilation-dir /Users/kris/Projects/C++/UniqueString
-ferror-limit 19 -fmessage-length 192 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-
diagnostics -vectorize-loops -vectorize-slp -o /var/tmp/main-b2dc29.s -x
c++ main.cpp
clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target powerpc-
apple-darwin9.8.0
ignoring nonexistent directory "/usr/include/c++/4.2.1"
ignoring nonexistent directory "/usr/include/c++/4.2.1/powerpc-apple-
darwin10/"
ignoring nonexistent directory "/usr/include/c++/4.2.1/backward"
ignoring nonexistent directory "/usr/include/c++/4.0.0/powerpc-apple-
darwin10/"
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.0.0
/usr/include/c++/4.0.0/backward
/opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/opt/local/bin/g++" -O2 -v -c -arch ppc -m32 -o /var/tmp/main-abd300.o
-x assembler /var/tmp/main-b2dc29.s
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_tarballs_ports_lang_apple-gcc42/apple-
gcc42/work/objroot/src/configure --disable-checking --enable-werror
--prefix=/opt/local --mandir=/opt/local/share/man --enable-
languages=c,c++,objc,obj-c++ --libexecdir=/opt/local/libexec/apple-gcc42
--libdir=/opt/local/lib/apple-gcc42 --includedir=/opt/local/include/apple-
gcc42 --program-suffix=-apple-4.2 --with-system-zlib --disable-nls --with-
slibdir=/usr/lib --build=powerpc-apple-darwin9 --with-gxx-include-
dir=/usr/include/c++/4.0.0 --host=powerpc-apple-darwin9 --target=powerpc-
apple-darwin9
Thread model: posix
gcc version 4.2.4 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42
5666.3_14+gpl3)
/opt/local/libexec/apple-gcc42/gcc/powerpc-apple-darwin9/4.2.4/as -arch
ppc -o /var/tmp/main-abd300.o /var/tmp/main-b2dc29.s
"/opt/local/bin/g++" -O2 -v -arch ppc -m32 -o unique.clang34 /var/tmp
/main-abd300.o
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_tarballs_ports_lang_apple-gcc42/apple-
gcc42/work/objroot/src/configure --disable-checking --enable-werror
--prefix=/opt/local --mandir=/opt/local/share/man --enable-
languages=c,c++,objc,obj-c++ --libexecdir=/opt/local/libexec/apple-gcc42
--libdir=/opt/local/lib/apple-gcc42 --includedir=/opt/local/include/apple-
gcc42 --program-suffix=-apple-4.2 --with-system-zlib --disable-nls --with-
slibdir=/usr/lib --build=powerpc-apple-darwin9 --with-gxx-include-
dir=/usr/include/c++/4.0.0 --host=powerpc-apple-darwin9 --target=powerpc-
apple-darwin9
Thread model: posix
gcc version 4.2.4 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42
5666.3_14+gpl3)
/opt/local/libexec/apple-gcc42/gcc/powerpc-apple-darwin9/4.2.4/collect2
-dynamic -arch ppc -macosx_version_min 10.5.8 -weak_reference_mismatches
non-weak -o unique.clang34 -lcrt1.10.5.o -L/opt/local/lib/apple-gcc42/gcc
/powerpc-apple-darwin9/4.2.4 -L/opt/local/lib/apple-gcc42/gcc/powerpc-
apple-darwin9/4.2.4/../../.. /var/tmp/main-abd300.o -lstdc++ -lgcc_s.10.5
-lgcc -lSystemStubs -lSystem
ld: absolute address to symbol std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storagein a different linkage unit not supported in
_main from /var/tmp/main-abd300.o
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to
see invocation)
2.716u 0.288s 0:03.54 84.4% 0+0k 0+56io 0pf+0w
}}}
The "UniqueString" project is a trivial academic exercise. I'm only using
it to avoid re-writing HelloWorld.cpp for the 800th time.
After much web searching I have the ''impression'' Clang falls-back to
linking with GCC when it doesn't have a "toolchain" defined for the
current platform.
Dunno what else I can do at this point.
--
Ticket URL: <https://trac.macports.org/ticket/43484#comment:19>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list