[Debian-med-packaging] Bug#837417: ctn: Please build libctn.a with -fPIC

Balint Reczey balint at balintreczey.hu
Sun Sep 11 13:00:23 UTC 2016


Source: ctn
Version: 3.2.0~dfsg-3
Severity: important
User: balint at balintreczey.hu
Usertags: pie-bindnow-20160906
Justification: makes dicomnifti FTBFS on amd64 with extra hardening
Affects: dicomnifti

Dear Maintainers,

During a rebuild of all packages in sid, dicomnifti failed to build on
amd64 with patched GCC and dpkg. The root cause seems to be that
libbfd.a is shipped as a non-PIC library.

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/PIEByDefaultTransitio

Relevant part of dicomnifti's build log:
...
[ 57%] Linking CXX executable dinifti
/usr/bin/cmake -E cmake_link_script CMakeFiles/dinifti.dir/link.txt
--verbose=1
/usr/bin/c++   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=
format-security -Wdate-time -D_FORTIFY_SOURCE=2    -Wl,-z,relro
-Wl,-z,now CMakeFiles/dinifti.dir/src/
dinifti.cc.o CMakeFiles/dinifti.dir/src/dicomInfo.cc.o
CMakeFiles/dinifti.dir/src/niftiout.cc.o  -o di
nifti -rdynamic /usr/lib/ctn/libctn.a -lniftiio -lznz
/usr/bin/ld: /usr/lib/ctn/libctn.a(condition.o): relocation R_X86_64_32
against `.bss' 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/dicomnifti_2.32.1-1_amd64.build.gz

The attached patch fixed the problem.

Thanks,
Balint


-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils_2.27-8+rbalint0.patch
Type: text/x-patch
Size: 1876 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20160911/314b49b0/attachment.bin>


More information about the Debian-med-packaging mailing list