Control: tags -1 patch pending Dear Maintainers,
On Sun, 11 Sep 2016 15:00:23 +0200 Balint Reczey <bal...@balintreczey.hu> wrote: .... > 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 Please see the proposed patch attached. I'm about to upload the changed package to DELAYED/5 as an NMU. Cheers, Balint
diff -Nru ctn-3.2.0~dfsg/debian/changelog ctn-3.2.0~dfsg/debian/changelog --- ctn-3.2.0~dfsg/debian/changelog 2015-12-20 21:12:09.000000000 +0100 +++ ctn-3.2.0~dfsg/debian/changelog 2016-09-28 21:26:02.000000000 +0200 @@ -1,3 +1,10 @@ +ctn (3.2.0~dfsg-3.1) unstable; urgency=medium + + * Non-maintainer upload + * Build package with -fPIC CFLAG (Closes: #837417) + + -- Balint Reczey <bal...@balintreczey.hu> Wed, 28 Sep 2016 21:25:59 +0200 + ctn (3.2.0~dfsg-3) unstable; urgency=medium * cme fix dpkg-control diff -Nru ctn-3.2.0~dfsg/debian/README.Debian ctn-3.2.0~dfsg/debian/README.Debian --- ctn-3.2.0~dfsg/debian/README.Debian 2013-09-12 10:58:02.000000000 +0200 +++ ctn-3.2.0~dfsg/debian/README.Debian 2016-09-28 21:23:21.000000000 +0200 @@ -29,3 +29,10 @@ 5. Added man pages. + +This package ships only static libraries and they are compiled with -fPIC +to let reverse dependencies use the static libraries as part of shared +libraries and PIE binaries. + +The exception is discussed in this thread: + https://lists.debian.org/debian-devel/2016/09/msg00277.html diff -Nru ctn-3.2.0~dfsg/debian/rules ctn-3.2.0~dfsg/debian/rules --- ctn-3.2.0~dfsg/debian/rules 2013-11-07 22:35:21.000000000 +0100 +++ ctn-3.2.0~dfsg/debian/rules 2016-09-28 21:21:13.000000000 +0200 @@ -3,5 +3,7 @@ pkg-ctn := ctn pkg-ctn-dev := ctn-dev +export DEB_CFLAGS_MAINT_APPEND = -fPIC + %: dh $@