Bug#841947: [pkg-boost-devel] Bug#841947: libboost-*1.61-dev: Please build static libs with -fPIC
My understanding is that you have to first build boost with the pie-enabled compiler chain, then build your package with the new boost. c.f. https://wiki.ubuntu.com/SecurityTeam/PIE Note that using -fPIC on static libs is against current Debian Policy. -Steve On Mon, Oct 24, 2016 at 08:19:13PM +0200, Gilles Filippini wrote: > Source: boost1.61 > Version: 1.61.0+dfsg-3 > Severity: serious > Justification: make other packages FTBFS > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi, > > When rebuilding the psi4 package on amd6', it FTBFS with: > > [100%] Linking CXX executable ../../../bin/psi4 > cd /<>/builddir/src/bin/psi4 && /usr/bin/cmake -E > cmake_link_script CMakeFiles/psi4.dir/link.txt --verbose=1 > /usr/bin/c++ -DRESTRICT=__restrict__ -Xlinker -export-dynamic -fPIC > -std=c++11 -fopenmp -O2 -g -DNDEBUG > CMakeFiles/psi4_objlib.dir/export_psio.cc.o > CMakeFiles/psi4_objlib.dir/export_mints.cc.o > CMakeFiles/psi4_objlib.dir/psi_stop.cc.o > CMakeFiles/psi4_objlib.dir/export_functional.cc.o > CMakeFiles/psi4_objlib.dir/export_oeprop.cc.o > CMakeFiles/psi4_objlib.dir/export_plugins.cc.o > CMakeFiles/psi4_objlib.dir/export_blas_lapack.cc.o > CMakeFiles/psi4_objlib.dir/export_benchmarks.cc.o > CMakeFiles/psi4_objlib.dir/export_efp.cc.o > CMakeFiles/psi4_objlib.dir/export_cubeprop.cc.o > CMakeFiles/psi4_objlib.dir/clean.cc.o > CMakeFiles/psi4_objlib.dir/create_new_plugin.cc.o > CMakeFiles/psi4_objlib.dir/script.cc.o > CMakeFiles/psi4_objlib.dir/set_memory.cc.o > CMakeFiles/psi4_objlib.dir/read_options.cc.o > CMakeFiles/psi4_objlib.dir/export_libparallel.cc.o > CMakeFiles/versioned_code.dir/version.cc.o > CMakeFiles/versioned_code.dir/python.cc.o > CMakeFiles/versioned_code.dir/psi_start.cc.o CMakeFiles/versioned_code.dir > /psi4.cc.o -o ../../../bin/psi4 -rdynamic -lutil -lm -lrt -ldl -lpython2.7 > -Wl,--whole-archive ../../../lib/libadc.a ../../../lib/libccdensity.a > ../../../lib/libccenergy.a ../../../lib/libcceom.a ../../../lib/libcchbar.a > ../../../lib/libcclambda.a ../../../lib/libccresponse.a > ../../../lib/libccsort.a ../../../lib/libcctransort.a > ../../../lib/libcctriples.a ../../../lib/libdcft.a ../../../lib/libdetci.a > ../../../lib/libdfmp2.a ../../../lib/libdfocc.a ../../../lib/libefp.a > ../../../lib/libfindif.a ../../../lib/libfisapt.a ../../../lib/libfnocc.a > ../../../lib/libmcscf.a ../../../lib/libmints_wrapper.a > ../../../lib/libmrcc.a ../../../lib/libocc.a ../../../lib/liboptking.a > ../../../lib/libpsimrcc.a ../../../lib/libsapt.a ../../../lib/libscf.a > ../../../lib/libscfgrad.a ../../../lib/libthermo.a ../../../lib/libtransqt2.a > ../../../lib/libdmrg.a ../../../lib/lib3index.a ../../../lib/libciomr.a > ../../../lib/libdiis.a ../../../lib/libdisp.a ../../../lib/libdpd.a > ../../../lib/libefp_solver.a . > ./../../lib/libfock.a ../../../lib/libfunctional.a -Wl,--whole-archive > ../../../lib/libiwl.a -Wl,--no-whole-archive ../../../lib/libmints.a > ../../../lib/libmoinfo.a ../../../lib/liboptions.a ../../../lib/libparallel.a > ../../../lib/libparallel2.a ../../../lib/libplugin.a > ../../../lib/libsapt_solver.a ../../../lib/libscf_solver.a > ../../../lib/libthce.a ../../../lib/libtrans.a ../../../lib/libpsi4util.a > ../../../lib/libpsio.a ../../../lib/libPsiUtil.a ../../../lib/libqt.a > ../../../lib/libcubeprop.a ../../../lib/libinterface_libefp.a > -Wl,--no-whole-archive -Wl,-Bstatic -lboost_filesystem -lboost_python > -lboost_regex -lboost_serialization -lboost_system -lboost_timer > -lboost_chrono -lboost_thread -lboost_date_time -lboost_atomic -Wl,-Bdynamic > -lpthread -llapack -lblas -lpython2.7 -lblas -llapack -lint -lderiv -lutil > -ldl -lrt -lm /usr/lib/x86_64-linux-gnu/libchemps2.so -lchemps2 > /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so -lsz -lz -lpthread -lm > -lpython2.7 -ldl -Wl,-rpath,/usr/l > ib/x86_64-linux-gnu/hdf5/serial/lib > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_filesystem.a(operations.o): > relocation R_X86_64_32S against symbol > `_ZN5boost6detail15sp_counted_base7destroyEv' can not be used when making a > shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_filesystem.a(path.o): > relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making > a shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_python.a(list.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making > a shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_python.a(dict.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making > a shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_python.a(tuple.o): > relocation R_X86_64_32 ag
Bug#841947: [pkg-boost-devel] Bug#841947: libboost-*1.61-dev: Please build static libs with -fPIC
Control: block -1 by 841956 Steve M. Robbins a écrit le 24/10/2016 à 20:28 : > My understanding is that you have to first build boost with the > pie-enabled compiler chain, then build your package with the new > boost. > > c.f. https://wiki.ubuntu.com/SecurityTeam/PIE > > > Note that using -fPIC on static libs is against current Debian Policy. You're right. I've just tested building psi4 against a fresh build of boost1.61, and it works. I've submitted a binnmu request accordingly. Thanks, _g. > > On Mon, Oct 24, 2016 at 08:19:13PM +0200, Gilles Filippini wrote: >> Source: boost1.61 >> Version: 1.61.0+dfsg-3 >> Severity: serious >> Justification: make other packages FTBFS >> > Hi, > > When rebuilding the psi4 package on amd6', it FTBFS with: > > [100%] Linking CXX executable ../../../bin/psi4 > cd /<>/builddir/src/bin/psi4 && /usr/bin/cmake -E > cmake_link_script CMakeFiles/psi4.dir/link.txt --verbose=1 > /usr/bin/c++ -DRESTRICT=__restrict__ -Xlinker -export-dynamic -fPIC > -std=c++11 -fopenmp -O2 -g -DNDEBUG > CMakeFiles/psi4_objlib.dir/export_psio.cc.o > CMakeFiles/psi4_objlib.dir/export_mints.cc.o > CMakeFiles/psi4_objlib.dir/psi_stop.cc.o > CMakeFiles/psi4_objlib.dir/export_functional.cc.o > CMakeFiles/psi4_objlib.dir/export_oeprop.cc.o > CMakeFiles/psi4_objlib.dir/export_plugins.cc.o > CMakeFiles/psi4_objlib.dir/export_blas_lapack.cc.o > CMakeFiles/psi4_objlib.dir/export_benchmarks.cc.o > CMakeFiles/psi4_objlib.dir/export_efp.cc.o > CMakeFiles/psi4_objlib.dir/export_cubeprop.cc.o > CMakeFiles/psi4_objlib.dir/clean.cc.o > CMakeFiles/psi4_objlib.dir/create_new_plugin.cc.o > CMakeFiles/psi4_objlib.dir/script.cc.o > CMakeFiles/psi4_objlib.dir/set_memory.cc.o > CMakeFiles/psi4_objlib.dir/read_options.cc.o > CMakeFiles/psi4_objlib.dir/export_libparallel.cc.o > CMakeFiles/versioned_code.dir/version.cc.o > CMakeFiles/versioned_code.dir/python.cc.o > CMakeFiles/versioned_code.dir/psi_start.cc.o CMakeFiles/versioned_code.dir > /psi4.cc.o -o ../../../bin/psi4 -rdynamic -lutil -lm -lrt -ldl -lpython2.7 > -Wl,--whole-archive ../../../lib/libadc.a ../../../lib/libccdensity.a > ../../../lib/libccenergy.a ../../../lib/libcceom.a ../../../lib/libcchbar.a > ../../../lib/libcclambda.a ../../../lib/libccresponse.a > ../../../lib/libccsort.a ../../../lib/libcctransort.a > ../../../lib/libcctriples.a ../../../lib/libdcft.a ../../../lib/libdetci.a > ../../../lib/libdfmp2.a ../../../lib/libdfocc.a ../../../lib/libefp.a > ../../../lib/libfindif.a ../../../lib/libfisapt.a ../../../lib/libfnocc.a > ../../../lib/libmcscf.a ../../../lib/libmints_wrapper.a > ../../../lib/libmrcc.a ../../../lib/libocc.a ../../../lib/liboptking.a > ../../../lib/libpsimrcc.a ../../../lib/libsapt.a ../../../lib/libscf.a > ../../../lib/libscfgrad.a ../../../lib/libthermo.a ../../../lib/libtransqt2.a > ../../../lib/libdmrg.a ../../../lib/lib3index.a ../../../lib/libciomr.a > ../../../lib/libdiis.a ../../../lib/libdisp.a ../../../lib/libdpd.a > ../../../lib/libefp_solver.a . > ./../../lib/libfock.a ../../../lib/libfunctional.a -Wl,--whole-archive > ../../../lib/libiwl.a -Wl,--no-whole-archive ../../../lib/libmints.a > ../../../lib/libmoinfo.a ../../../lib/liboptions.a ../../../lib/libparallel.a > ../../../lib/libparallel2.a ../../../lib/libplugin.a > ../../../lib/libsapt_solver.a ../../../lib/libscf_solver.a > ../../../lib/libthce.a ../../../lib/libtrans.a ../../../lib/libpsi4util.a > ../../../lib/libpsio.a ../../../lib/libPsiUtil.a ../../../lib/libqt.a > ../../../lib/libcubeprop.a ../../../lib/libinterface_libefp.a > -Wl,--no-whole-archive -Wl,-Bstatic -lboost_filesystem -lboost_python > -lboost_regex -lboost_serialization -lboost_system -lboost_timer > -lboost_chrono -lboost_thread -lboost_date_time -lboost_atomic -Wl,-Bdynamic > -lpthread -llapack -lblas -lpython2.7 -lblas -llapack -lint -lderiv -lutil > -ldl -lrt -lm /usr/lib/x86_64-linux-gnu/libchemps2.so -lchemps2 > /usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so -lsz -lz -lpthread -lm > -lpython2.7 -ldl -Wl,-rpath,/usr/l > ib/x86_64-linux-gnu/hdf5/serial/lib > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_filesystem.a(operations.o): > relocation R_X86_64_32S against symbol > `_ZN5boost6detail15sp_counted_base7destroyEv' can not be used when making a > shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_filesystem.a(path.o): > relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making > a shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_python.a(list.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making > a shared object; recompile with -fPIC > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libboost_python.a(dict.o): > relocation R_X86_64_32 against `.rodata.str1.1' can not