Your message dated Mon, 03 Oct 2016 22:08:14 +0000
with message-id <[email protected]>
and subject line Bug#837417: fixed in ctn 3.2.0~dfsg-3.1
has caused the Debian Bug report #837417,
regarding ctn: Please build libctn.a with -fPIC
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
837417: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837417
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: ctn
Version: 3.2.0~dfsg-3
Severity: important
User: [email protected]
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


diff -u binutils-2.27/debian/changelog binutils-2.27/debian/changelog
--- binutils-2.27/debian/changelog
+++ binutils-2.27/debian/changelog
@@ -1,3 +1,10 @@
+binutils (2.27-8+rbalint0) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Build libbfd with -fPIC
+
+ -- Balint Reczey <[email protected]>  Sat, 10 Sep 2016 15:53:07 +0200
+
 binutils (2.27-8) unstable; urgency=medium
 
   * Fix diversion updates for 32bit x86 targets.
diff -u binutils-2.27/debian/patches/series binutils-2.27/debian/patches/series
--- binutils-2.27/debian/patches/series
+++ binutils-2.27/debian/patches/series
@@ -12,6 +12,7 @@
 130_gold_disable_testsuite_build.patch
 131_ld_bootstrap_testsuite.patch
 135_bfd_version.patch
+136_bfd_pic.patch
 157_ar_scripts_with_tilde.patch
 #158_ld_system_root.patch
 161_gold_dummy_zoption.diff
only in patch2:
unchanged:
--- binutils-2.27.orig/debian/patches/136_bfd_pic.patch
+++ binutils-2.27/debian/patches/136_bfd_pic.patch
@@ -0,0 +1,25 @@
+Author: Balint Reczey <[email protected]>
+Description: Build libbfd with -fPIC to allow linking with PIE binaries
+
+--- ./bfd/Makefile.am.bak	2016-09-10 16:26:46.062371030 +0200
++++ ./bfd/Makefile.am	2016-09-10 16:27:48.913724681 +0200
+@@ -51,7 +51,7 @@
+ 
+ WARN_CFLAGS = @WARN_CFLAGS@
+ NO_WERROR = @NO_WERROR@
+-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
++AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
+ AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
+ if PLUGINS
+ bfdinclude_HEADERS += $(INCDIR)/plugin-api.h
+--- ./bfd/Makefile.in.bak	2016-09-10 16:26:53.009857349 +0200
++++ ./bfd/Makefile.in	2016-09-10 16:27:31.886983240 +0200
+@@ -387,7 +387,7 @@
+ # case both are empty.
+ ZLIB = @zlibdir@ -lz
+ ZLIBINC = @zlibinc@
+-AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
++AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -fPIC
+ AM_CPPFLAGS = -DBINDIR='"$(bindir)"'
+ @PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
+ 


--- End Message ---
--- Begin Message ---
Source: ctn
Source-Version: 3.2.0~dfsg-3.1

We believe that the bug you reported is fixed in the latest version of
ctn, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Balint Reczey <[email protected]> (supplier of updated ctn package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 28 Sep 2016 21:25:59 +0200
Source: ctn
Binary: ctn ctn-dev
Architecture: source
Version: 3.2.0~dfsg-3.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team 
<[email protected]>
Changed-By: Balint Reczey <[email protected]>
Description:
 ctn        - Central Test Node, a DICOM implementation for medical imaging
 ctn-dev    - Development files for Central Test Node, a DICOM implementation
Closes: 837417
Changes:
 ctn (3.2.0~dfsg-3.1) unstable; urgency=medium
 .
   * Non-maintainer upload
   * Build package with -fPIC CFLAG (Closes: #837417)
Checksums-Sha1:
 9ab0e9f8c47610ab76a20ebb159a5a45d14342a7 2113 ctn_3.2.0~dfsg-3.1.dsc
 81b16c9ba4e4d4381ce0b0160bc118d79e39b786 20744 ctn_3.2.0~dfsg-3.1.debian.tar.xz
Checksums-Sha256:
 d91a2f19737010698c19d086f842f3bc134b885cd370d5277cad5965fcd3fd51 2113 
ctn_3.2.0~dfsg-3.1.dsc
 1e9c7bd3bab76b8be71bde8beb0db69325e3a172d588f40083e24afab8298acb 20744 
ctn_3.2.0~dfsg-3.1.debian.tar.xz
Files:
 4e843769f7875441275df1d169390be6 2113 graphics optional ctn_3.2.0~dfsg-3.1.dsc
 c89103ad32d8ffd061c69e76ae44ddba 20744 graphics optional 
ctn_3.2.0~dfsg-3.1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJX7B/sAAoJEPZk0la0aRp9nmIQAI/4hidFciE+XPsWYHSOc2Rd
SloFh4HSui1/RUKq6EDaL/GGn+WVCYqmMYZzO06Rueztxd/Thc7AXLkLhwL6X8OE
DqGIfDrONCDNueif1IiuvqBeDuQFxP2F7LHtxWqgnt3QT1LhIhd0BpRnjW8902gu
NrmJcr0xdaCV2tOujY8jIK/4uTX+bCm9XIJ5uz3vG4JMoEc6NFUlNb8XA3G+tNs+
i3cxOxLbdMBv5nBUJmlv2I5K9cSI6x+TYvEkZOOO9g0sdqmoj97B4yA2DAyRAh0D
QYJIuadDc7Qklgav7V3f9NVYwi0EEMV7J4vH6SU3FO1RrUP+wtT7q4yaGBGbjFnR
m5g2XPSy119THl6/yudmknO/8l3KrEFJQA9dR22UiK/k5KR1LCgkX2GWkQ9vUaSl
U4prsu+UogDgksE6k2VNr0J0FnG9yqrWrnuTcJO9xj+ZlGYoRG/gYkISbi84GWMj
sKTPS8/eBdSlwTopbB1XMzGgKfauVRubMU+aTwhk2Q92I04/bSc3VDW45gDs9amF
kFx19OXA6teUqP7tByl6p+19yf2ZMmQJ3NW1PlxjDsly2oru/R6fXYzo4VpqzCUt
5Mx+2pBhfSmt+0CUQ615c/F52JtpiEkIpCWrClA0YvEZr8h5EzGPMbVKzkxyb5T5
VnAe28TJORjwxmPLIdqC
=3TZ4
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to