Subject: [Boost-bugs] [Boost C++ Libraries] #12962: user overridden cxxflags are not honored for the compilation of some libraries
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-12 08:42:03
#12962: user overridden cxxflags are not honored for the compilation of some
libraries
-----------------------------+------------------------------
Reporter: sascha.kratky@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: Building Boost | Version: Boost 1.63.0
Severity: Problem | Keywords:
-----------------------------+------------------------------
Upon linking `libboost_regex-mt.a` to a shared library I am getting the
error:
{{{
/usr/bin/ld: /usr/local/lib/libboost_regex-mt.a(instances.o): relocation
R_X86_64_32S against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libboost_regex-mt.a: could not read symbols: Bad value
}}}
I am building boost with `-fPIC` by running bjam with the following
options:
{{{
./bjam '-sBUILD=<cflags>-fPIC <cxxflags>-fPIC <linkflags>-fPIC' --without-
mpi --without-python --without-iostreams --layout=tagged
link=shared,static
}}}
bjam does not seem to honor the `-fPIC` flag upon compilation of
`libboost_regex-mt`:
{{{
gcc.compile.c++ bin.v2/libs/regex/build/gcc-4.8/release/link-static
/threading-multi/instances.o
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall
-pedantic -pthread -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o
"bin.v2/libs/regex/build/gcc-4.8/release/link-static/threading-
multi/instances.o" "libs/regex/build/../src/instances.cpp"
}}}
Looking at the bjam debug log, there seem to be many libraries where user
overridden cxxflags are not honored for the compilation. These include
`libboost_math_tr1-mt.a`, `libboost_program_options-mt.a`,
`libboost_signals-mt.a`, `libboost_locale-mt.a` and others.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12962> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-04-12 08:45:01 UTC