Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Math] Weird compiler-error with Clang 3.8
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-01-18 12:00:28


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_at_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_at_3/clang38/build/boost-build/b2
> -j1 -q \
>
> --build-dir=/home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost
> \
> --build-type=minimal --layout=versioned address-model=64 install \
>
> --prefix=/home/jenkins/workspace/Pipeline_Boost_at_3/clang38/installed/opt/BENOCS/clang38
> \
>
> --libdir=/home/jenkins/workspace/Pipeline_Boost_at_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_at_3/clang38/build/boost/boost/bin.v2/libs/math/build
> common.mkdir
> /home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8
> common.mkdir
> /home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release
> common.mkdir
> /home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi
> common.mkdir
> /home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/..
> common.mkdir
> /home/jenkins/workspace/Pipeline_Boost_at_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_at_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_at_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_at_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_at_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_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi/../src/tr1/pch.hpp.pth...
> ...skipped
> <p/home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi>assoc_laguerre.o
> for lack of
> <p/home/jenkins/workspace/Pipeline_Boost_at_3/clang38/build/boost/boost/bin.v2/libs/math/build/clang-linux-3.8/release/threading-multi>../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
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net