Hi Yaroslav, 2016-09-11 18:03 GMT+02:00 Yaroslav Halchenko <[email protected]>: > On September 11, 2016 6:59:58 AM EDT, Balint Reczey <[email protected]> > wrote: ... >>Hi, >> >>During a rebuild of all packages in sid, your package failed to build >>on >>amd64 with patched GCC and dpkg. >> >>The rebuild tested if packages are ready for a transition >>enabling PIE and bindnow for amd64. >> >>For more information about the changes to sid's dpkg and GCC please >>visit: >> https://wiki.debian.org/Hardening/PIEByDefaultTransition >> >>Relevant part (hopefully): >>... >>/usr/bin/c++ -fopenmp -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. >>-fstack-protector-strong -Wformat >> -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 >>-Wl,-z,relro -Wl,-z,now -Wl,--as >>-needed CMakeFiles/wb_command.dir/wb_command.cxx.o >>CMakeFiles/wb_command.dir/qrc_resources.cxx.o -o w >>b_command -rdynamic ../Commands/libCommands.a >>../Operations/libOperations.a ../Algorithms/libAlgorithm >>s.a ../OperationsBase/libOperationsBase.a ../Brain/libBrain.a -lftgl >>../Files/libFiles.a ../Annotation >>s/libAnnotations.a ../Palette/libPalette.a ../Gifti/libGifti.a >>../Cifti/libCifti.a ../Nifti/libNifti.a >> ../Charting/libCharting.a ../FilesBase/libFilesBase.a >>../Scenes/libScenes.a ../Xml/libXml.a ../Common/libCommon.a >>../Quazip/libQuazip.a -lfreetype -lQtGui -lQtXml -lQtNetwork -lQtCore >>-lOSMesa -lGL -Wl,-Bstatic -lGLU -Wl,-Bdynamic -lz >>/usr/bin/ld: >>/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libGLU.a(error.o): >>relocation R_X86_64_32 against `.rodata' can not be used when making a >>shared object; recompile with -fPIC ... >> >>The full build log is available from: >>https://people.debian.org/~rbalint/build-logs/pie-bindnow-20160906/connectome-workbench_1.2.3-1_amd64.build.gz >> >>Dynamically linking to libGLU would probably fix the problem. >> >>Thanks, >>Balint > > So the actual issue is within libGLU.a which needs to be rebuilt with -fPIC, > ie nothing to do on my end?
AFAIK the policy does not dictate shipping PIC static libraries, thus it is not clearly libGLU's issue, but it could be fixed by libGLU. Generally I prefer dynamic linking to be able to fix libraries without recompiling reverse dependencies thus I think moving to libGLU.so would be beneficial in itself. As an alternative libglu could be updated to build with fPIC, but this is up to the libglu maintainers. As an other alternative libglu could be recompiled with gcc with PIE and PIC enabled by default which would resolve this issue for _some_ architectures, where PIE is enabled by default but would not let connectome-workbench compiled with PIE on the rest of the architectures. I suggest going with moving to using dynamic linking. It also helps the preparation for the transition to enable PIE by default. Thanks, Balint

