powerpc64-gcc unable to compile clang 3.8.0 from clang380-import -r294609 via buildworld

Dimitry Andric dim at FreeBSD.org
Sat Jan 23 15:08:51 UTC 2016


On 23 Jan 2016, at 12:25, Mark Millard <markmi at dsl-only.net> wrote:
> 
> I tried a buildworld that included building clang and lldb based on using powerpc64-xtoolchain-gcc/powerpc64-gcc as a cross compiler. It failed, see below. This might indicate a more general gcc 5.x vs. clang 3.8.0 source code mismatch. This was my first try. This could have been true for some time.
> 
> --- CFG.o ---
> /usr/local/bin/powerpc64-portbld-freebsd11.0-g++ -isystem /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include -L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib --sysroot=/usr/obj/xtoolchain/powerpc.po
> werpc64/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/ -I/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1 -std=gnu++11 -L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/../lib/libc++ --sysroot=/usr
> /obj/xtoolchain/powerpc.powerpc64/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/  -O2 -pipe -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/include -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm
> /tools/clang/include -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis -I. -I/usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"powerpc64-unknown-freebsd11.0\" -DLLVM_HOST_TRIPLE=\"powerpc64
> -unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" -MD -MP -MF.depend.CFG.o -MTCFG.o -fstack-protector-strong -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-
> error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict
> -aliasing -Wno-error=address  -std=c++11 -fno-exceptions -fno-rtti  -c /usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp -o CFG.o
> . . .
> --- all_subdir_libclanganalysis ---
> /usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp: In member function 'std::__1::unique_ptr<clang::CFG> {anonymous}::CFGBuilder::buildCFG(const clang::Decl*, clang::Stmt*)':
> /usr/src/lib/clang/libclanganalysis/../../../contrib/llvm/tools/clang/lib/Analysis/CFG.cpp:1046:45: error: no matching function for call to 'reverse(clang::CXXConstructorDecl::init_const_range)'
>     for (auto *I : llvm::reverse(CD->inits())) {
>                                             ^

I just tried building clang 3.8.0 with gcc 5.3.0, but that went fine.
However, by default gcc uses its own copy of libstdc++.  The above error
is most likely something caused by libc++ and gcc not playing well
together.

This kind of error is always hard to report upstream, since the gcc
maintainers obviously do not care that much about libc++, while the
libc++ maintainers do not care that much about gcc. :-)

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-ppc/attachments/20160123/96385479/attachment.sig>


More information about the freebsd-ppc mailing list