Bug#808205: libc6: Unrecognized relocation when compiling
Package: libc6 Version: 2.21-4 Severity: important Dear Maintainer, When attempting to compile a simple C program, the link stage fails with an unrecognized relocation error. This problem seems to have appeared in the latest version, 2.21-4 (and is also present in 2.22-0experimental which I tested before submitting); it was not present in 2.19-22 which I was using prior to tonight. When using 2.19-22 (pinned to that version after installing the package from a CD), it works normally. When upgraded, it fails as per below. The problem manifested in a much more complicated build process, but I can duplicate it with a program as simple as this: #include int main() { fprintf(stdout, "Hello, world.\n"); return(0); } When compiling, the following error happens: $ gcc hello.c -o hello /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o: unrecognized relocation (0x2a) in section `.init' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status The expected behavior is for the program to compile normally without error. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.2.0-1-amd64 (SMP w/8 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 libc6 depends on: ii libgcc1 1:5.2.1-23 libc6 recommends no packages. Versions of packages libc6 suggests: ii debconf [debconf-2.0] 1.5.58 pn glibc-doc ii libc-l10n 2.22-0experimental1 ii locales2.21-4 -- debconf information: glibc/disable-screensaver: glibc/restart-services: glibc/kernel-not-supported: * libraries/restart-without-asking: true glibc/restart-failed: glibc/upgrade: true glibc/kernel-too-old:
Bug#808205: libc6: Unrecognized relocation when compiling
Dear all, I am on Debian/Jessie, not sid nor Stretch, but I can reproduce the hello.c bug as done by John Aston: $ gcc hello.c -o hello /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o: réadressage inconnu (0x2a) dans la section « .init » /usr/bin/ld: édition de lien finale en échec: Mauvaise valeur collect2: error: ld returned 1 exit status Packages: -- sudo apt-cache show binutils Package: binutils Version: 2.25-5 Package: libc6-dev Source: glibc Version: 2.19-18+deb8u1 sudo apt-cache show libgcc1 Package: libgcc1 Source: gcc-4.9 (4.9.2-10) Version: 1:4.9.2-10 sudo apt-cache show libc6 Package: libc6 Status: install ok installed […] Source: glibc Version: 2.21-1 […] - Is there something wrong in my settings or is this related to the bug you are describing in the testing versions of Debian? I do not know what to do to fix the issue on my system. On Thu, 17 Dec 2015 04:31:40 -0500 John Aston wrote: > Package: libc6 > Version: 2.21-4 > Severity: important > > Dear Maintainer, > > When attempting to compile a simple C program, the link stage fails with an > unrecognized relocation error. > > This problem seems to have appeared in the latest version, 2.21-4 (and is > also present in 2.22-0experimental which I tested before submitting); it was > not present in 2.19-22 which I was using prior to tonight. When using > 2.19-22 (pinned to that version after installing the package from a CD), it > works normally. When upgraded, it fails as per below. > > The problem manifested in a much more complicated build process, but I can > duplicate it with a program as simple as this: > > #include > int main() { >fprintf(stdout, "Hello, world.\n"); >return(0); > } > > When compiling, the following error happens: > > $ gcc hello.c -o hello > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o: > unrecognized relocation (0x2a) in section `.init' > /usr/bin/ld: final link failed: Bad value > collect2: error: ld returned 1 exit status > > The expected behavior is for the program to compile normally without error. > > > -- System Information: > Debian Release: stretch/sid > APT prefers testing > APT policy: (500, 'testing'), (1, 'experimental') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.2.0-1-amd64 (SMP w/8 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 libc6 depends on: > ii libgcc1 1:5.2.1-23 > > libc6 recommends no packages. > > Versions of packages libc6 suggests: > ii debconf [debconf-2.0] 1.5.58 > pn glibc-doc > ii libc-l10n 2.22-0experimental1 > ii locales2.21-4 > > -- debconf information: > glibc/disable-screensaver: > glibc/restart-services: > glibc/kernel-not-supported: > * libraries/restart-without-asking: true > glibc/restart-failed: > glibc/upgrade: true > glibc/kernel-too-old: > >
Bug#808205: libc6: Unrecognized relocation when compiling
On 2016-01-05 00:55, Mahesh Kronecker wrote: > Dear all, > I am on Debian/Jessie, not sid nor Stretch, but I can reproduce the hello.c > bug as done by John Aston: > > $ gcc hello.c -o hello > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o: > réadressage inconnu (0x2a) dans la section « .init » > /usr/bin/ld: édition de lien finale en échec: Mauvaise valeur > collect2: error: ld returned 1 exit status > > Packages: > -- > sudo apt-cache show binutils > Package: binutils > Version: 2.25-5 > > Package: libc6-dev > Source: glibc > Version: 2.19-18+deb8u1 > > sudo apt-cache show libgcc1 > Package: libgcc1 > Source: gcc-4.9 (4.9.2-10) > Version: 1:4.9.2-10 > > sudo apt-cache show libc6 > Package: libc6 > Status: install ok installed > […] > Source: glibc > Version: 2.21-1 glibc version 2.21-1 has never been available in jessie... > […] > - > > Is there something wrong in my settings or is this related to the bug you are > describing in the testing versions of Debian? > I do not know what to do to fix the issue on my system. It really looks like your system have a mix of jessie and stretch or sid. Can you please try to run the following commands and send me the output: dpkg -l libc6:amd64 md5sum /usr/lib/x86_64-linux-gnu/crti.o -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net
Bug#808205: libc6: Unrecognized relocation when compiling
You are right. I apologize, I so much did not expect testing packages on the system I am working on that I was in denial of libc6 not being the stable version! I don’t remember why I have sid/stretch packages (I really should not have). $ dpkg -l libc6:amd64 […] ii libc6:amd64 2.21-1 amd64 GNU C Library: Shared libraries $ md5sum /usr/lib/x86_64-linux-gnu/crti.o 4ca8dc3c02f848753e5a5317fe78fb14 /usr/lib/x86_64-linux-gnu/crti.o I have downgraded everything to stable and the issue has of course disappeared. Sorry for the noise and thanks for your help. > On Jan 5, 2016, at 1:39 AM, Aurelien Jarno wrote: > > On 2016-01-05 00:55, Mahesh Kronecker wrote: >> Dear all, >> I am on Debian/Jessie, not sid nor Stretch, but I can reproduce the hello.c >> bug as done by John Aston: >> >> $ gcc hello.c -o hello >> /usr/bin/ld: >> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o: >> réadressage inconnu (0x2a) dans la section « .init » >> /usr/bin/ld: édition de lien finale en échec: Mauvaise valeur >> collect2: error: ld returned 1 exit status >> >> Packages: >> -- >> sudo apt-cache show binutils >> Package: binutils >> Version: 2.25-5 >> >> Package: libc6-dev >> Source: glibc >> Version: 2.19-18+deb8u1 >> >> sudo apt-cache show libgcc1 >> Package: libgcc1 >> Source: gcc-4.9 (4.9.2-10) >> Version: 1:4.9.2-10 >> >> sudo apt-cache show libc6 >> Package: libc6 >> Status: install ok installed >> […] >> Source: glibc >> Version: 2.21-1 > > glibc version 2.21-1 has never been available in jessie... > >> […] >> - >> >> Is there something wrong in my settings or is this related to the bug you >> are describing in the testing versions of Debian? >> I do not know what to do to fix the issue on my system. > > It really looks like your system have a mix of jessie and stretch or > sid. Can you please try to run the following commands and send me the > output: > > dpkg -l libc6:amd64 > > md5sum /usr/lib/x86_64-linux-gnu/crti.o > > -- > Aurelien Jarno GPG: 4096R/1DDD8C9B > aurel...@aurel32.net http://www.aurel32.net