Your message dated Thu, 24 Nov 2016 15:05:52 +0300
with message-id <1479989152.687449...@f137.i.mail.ru>
and subject line Re[2]: Bug#845484: libdpkg-perl: broken
/usr/share/dpkg/no-pie-compile.specs
has caused the Debian Bug report #845484,
regarding libdpkg-perl: broken /usr/share/dpkg/no-pie-compile.specs
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 ow...@bugs.debian.org
immediately.)
--
845484: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845484
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libdpkg-perl
Version: 1.18.15
Severity: serious
Hi,
I use cdbs with cmake, which automatically adds the following compilation flags
gcc/g++/ld:
-DCMAKE_C_FLAGS="-g -O2 -fdebug-prefix-map=<sourcedir> =.
-specs=/usr/share/dpkg/no-pie-compile.specs -Wformat -Werror=format-security
-Wdate-time -D_FORTIFY_SOURCE=2"
-DCMAKE_CXX_FLAGS="-g -O2 -fdebug-prefix-map=<sourcedir>=.
-specs=/usr/share/dpkg/no-pie-compile.specs -Wformat -Werror=format-security
-Wdate-time -D_FORTIFY_SOURCE=2"
-DCMAKE_MODULE_LINKER_FLAGS="-specs=/usr/share/dpkg/no-pie-link.specs
-Wl,-z,relro"
-DCMAKE_SHARED_LINKER_FLAGS="-specs=/usr/share/dpkg/no-pie-link.specs
-Wl,-z,relro"
After the latest update of Stretch almost C/C++ packages fail to build with the
following messages:
/usr/bin/ld: xxx.o: relocation R_X86_64_32S against `.rodata' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
cat /usr/share/dpkg/no-pie-compile.specs
*self_spec:
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fno-PIE}}}}}}
gcc can't compile even a simple C program using this spec:
----------
#include <stdio.h>
int
main(void)
{
printf("hello\n");
return 0;
}
----------
----------
gcc xx.c -o xx -specs=/usr/share/dpkg/no-pie-compile.specs
/usr/bin/ld: /tmp/ccEbzEVn.o: relocation R_X86_64_32 against `.rodata' can not
be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
----------
This spec file is owned by libdpkg-perl package. Please consider to fix this
spec or to revert the latest changes.
Severity is serious because this spec file is completely unusable for everyone.
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (600, 'experimental'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libdpkg-perl depends on:
ii dpkg 1.18.15
ii perl 5.22.2-3
Versions of packages libdpkg-perl recommends:
ii bzip2 1.0.6-8
ii libfile-fcntllock-perl 0.22-3+b1
ii liblocale-gettext-perl 1.07-3
ii xz-utils 5.2.2-1.2
Versions of packages libdpkg-perl suggests:
ii binutils 2.27.51.20161108-1
ii clang-3.6 [c-compiler] 1:3.6.2-3
ii clang-3.7 [c-compiler] 1:3.7.1-3
ii clang-3.8 [c-compiler] 1:3.8.1-16
ii clang-3.9 [c-compiler] 1:3.9-6
ii debian-keyring 2016.09.04
ii gcc [c-compiler] 4:6.1.1-1
ii gcc-4.9 [c-compiler] 4.9.3-14
ii gcc-5 [c-compiler] 5.4.1-3
ii gcc-6 [c-compiler] 6.2.0-13
ii gnupg 1.4.20-6
ii gnupg2 2.1.11-7
ii gpgv 2.1.15-9
ii patch 2.7.5-1
-- no debconf information
--
WBR,
Roman Tsisyk <ro...@tarantool.org>
http://tarantool.org/ - an efficient in-memory data store and a Lua
application server
--- End Message ---
--- Begin Message ---
>Thursday, November 24, 2016 5:07 AM +03:00 from Guillem Jover
><guil...@debian.org>:
>
>Hi!
>
>The problem is that whatever is linking that code is not passing the
>correct flags. There is a missing LDFLAGS somewhere. If you retry with:
>
> $ gcc -o xx xx.c \
> -specs=/usr/share/dpkg/no-pie-compile.specs \
> -specs=/usr/share/dpkg/no-pie-link.specs
>
>it will work.
Oops, there are two different spec files.
I've found a typo in Makefile which caused missing LDFLAGS for some binaries.
Thanks for the explanation, now it is clear for me.
>> Severity is serious because this spec file is completely unusable
>> for everyone.
>
>Only if used incorrectly. ;) Otherwise big parts of the Debian archive
>would be already completely broken!
I think that only users of DEB_BUILD_MAINT_OPTIONS="hardening=-pie" are
affected.
Anyway, that's my fault. Sorry for the false alarm.
--
WBR,
Roman Tsisyk <ro...@tarantool.org>
http://tarantool.org/ - an efficient in-memory data store and a Lua
application server
--- End Message ---