PowerPC Packages [boost vs. libc++ apparently being missing at the time]

Mark Millard markmi at dsl-only.net
Sat Jun 21 02:38:42 UTC 2014


For the following boost build error (the first) I think the explanation is simply that /usr/lib/libc++.* is not being built with clang from /usr/src/contrib/libc++/... and installed first. clang is required for this build because the gcc vintage (compiler and C++ library) that FreeBSD is stuck at is too old to handle C++11 and its library and libc++ is modern and requires C++ 11. And boost apparently requires clang contexts to be using c++11 and c++11's library.

> Building boost-libs-1.55.0_2.txz (origin /buildshare/ports/355755/devel/boost-libs) for powerpc-10-0 on XXX
> ...
> clang-linux.compile.c++.without-pch bin.v2/libs/atomic/build/clang-linux-3.3/release/threading-multi/lockpool.o
> clang-linux.link.dll bin.v2/libs/atomic/build/clang-linux-3.3/release/threading-multi/libboost_atomic.so.1.55.0
> /usr/bin/ld: cannot find -lc++
> clang++: error: linker command failed with exit code 1 (use -v to see invocation)

From https://wiki.freebsd.org/NewC++Stack are notes about this for 9.X and 10.0 where clang is not yet the default compiler:

> ... They were merged into 9-STABLE prior to 9.1 and are in 9.1 and later, but libc++ is not built by default in 9.x. They are all built by default in 10.0, replacing their GNU equivalents, on any platforms where clang is the default compiler. Our old GCC is not capable of building libc++ (which uses C++11 internally), so this stack is not built by default on other architectures.

As far as I can tell technically /lib/libcxxrt.* (with its symbolic link in /usr/lib/) and then clang's/llvm's /usr/lib/libc++.* should be built and in place before trying hosted-implementation C++11 compiles with clang. (Freestanding C++11 implementations instead have an implementation defined set of C++ libraries and so /usr/lib/libc++.* need not be involved.) The lack of /usr/lib/libc++.* for powerpc/powerpc64 would seem to be the issue for the above. i386 and amd64 for 10.0-RELEASE (and later) have /usr/lib/libc++.* in place as required and do not have this problem from what I can tell.

[I'm away from the PowerMac's so I can not cross check everything currently. Sorry if that means that I've made any mistakes above.]

===
Mark Millard
markmi at dsl-only.net




More information about the freebsd-ppc mailing list