On 18/01/2017 13:25, Deniz Bahadir wrote:
Hi guys,
Our build-server (Jenkins) tried to build Boost 1.58 with Clang 3.8 and libc++ and tripped over an error that I do not understand. Maybe someone can shed some light on it?
A probable workaround is to build with pch=off, but I don't understand the error either, it's something to do with your specific version of clang not understanding the command line (which I believe is the same as for gcc, so it should work?) Everything works fine for me with my clang version on Ubuntu BTW, but if you can figure out what the issue with the command line is, we might be able to fix it in the build scripts. HTH, John.
The specific error is this:
clang-linux.compile.c++.pch /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth clang: error: cannot specify -o when generating multiple output files
Does this look familiar to anyone?
My build-environment is Ubuntu 16.04 x86_64 and I invoked Boost.Build like this:
cd /home/jenkins/workspace/Pipeline_Boost/sources/boost_1_58_0 COMMON_COMPILER_FLAGS="-m64 -fpic -fdiagnostics-color=always -O3" CFLAGS="$COMMON_COMPILER_FLAGS" CXXFLAGS="$COMMON_COMPILER_FLAGS -std=c++14 -stdlib=libc++ -isystem/usr/include/libcxxabi -lc++abi" CC=/usr/bin/clang-3.8 CXX=/usr/bin/clang++-3.8
/home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost-build/b2 -j1 -q \
--build-dir=/home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost \ --build-type=minimal --layout=versioned address-model=64 install \
--prefix=/home/jenkins/workspace/Pipeline_Boost@3/clang38/installed/opt/BENOCS/clang38 \
--libdir=/home/jenkins/workspace/Pipeline_Boost@3/clang38/installed/opt/BENOCS/clang38/lib/x86_64-linux-gnu \ dll-path==/opt/BENOCS/clang38/lib/x86_64-linux-gnu \ toolset=clang-3.8 \ cflags="$CFLAGS" CXXFLAGS="$CXXFLAGS" linkflags="-Wl,--as-needed"
The more detailed error-message is the following:
common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8 common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/.. common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src common.mkdir /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1 clang-linux.compile.c++.pch /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth clang: error: cannot specify -o when generating multiple output files
rm -f "/home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth" && "clang++" -x c++-header -m64 -fpic -fdiagnostics-color=always -O3 -std=c++14 -stdlib=libc++ -isystem/usr/include/libcxxabi -lc++abi -m64 -fpic -fdiagnostics-color=always -O3 -O3 -Wno-inline -Wall -pthread -fPIC -m64 -m64 -fpic -fdiagnostics-color=always -O3 -std=c++14 -stdlib=libc++ -isystem/usr/include/libcxxabi -lc++abi -m64 -fpic -fdiagnostics-color=always -O3 -DBOOST_ALL_NO_LIB=1 -DBOOST_BUILD_PCH_ENABLED -DBOOST_MATH_TR1_DYN_LINK=1 -DNDEBUG -I"." -I"libs/math/src/tr1" -Xclang -emit-pth -o "/home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth" "libs/math/build/../src/tr1/pch.hpp"
...failed clang-linux.compile.c++.pch /home/jenkins/workspace/Pipeline_Boost@3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth... ...skipped
assoc_laguerre.o for lack of
../src/tr1/pch.hpp.pth... ...failed updating 1 target... ...skipped 1 target... ...updated 11871 targets...
Can someone tell me what is going on and how to fix or work around this problem?
Thanks, Deniz