Bug 463101 - Unable to link agains bfd_openr in configure script
Unable to link agains bfd_openr in configure script
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 454462
  Show dependency treegraph
 
Reported: 2008-09-21 15:08 EDT by Jochen Schmitt
Modified: 2008-10-30 04:10 EDT (History)
3 users (show)

See Also:
Fixed In Version: binutils-2.18.50.0.9-3.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-21 20:18:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch posted to <ksplice@mit.edu>. (1.79 KB, patch)
2008-09-21 20:16 EDT, Jan Kratochvil
no flags Details | Diff

  None (edit)
Description Jochen Schmitt 2008-09-21 15:08:25 EDT
When I try to build ksplice agains rawhide, I will got the following error messages in the configure script (config.log):

configure:3509: checking for bfd_openr in -lbfd
configure:3544: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   conftest.c -lbfd  -liberty  >&5
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(compress.o): In function `bfd_uncompress_section_contents':
(.text+0x129): undefined reference to `inflateInit_'
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(compress.o): In function `bfd_uncompress_section_contents':
(.text+0x15c): undefined reference to `inflate'
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(compress.o): In function `bfd_uncompress_section_contents':
(.text+0x169): undefined reference to `inflateReset'
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/libbfd.a(compress.o): In function `bfd_uncompress_section_contents':
(.text+0x194): undefined reference to `inflateEnd'
collect2: ld returned 1 exit status

For reproduce the issue please download http://www.herr-schmitt.de/pub/ksplice-0.9.0-1.fc9.src.rpm and try to build it agains rawhide. On F-9 its works fine.
Comment 1 Jan Kratochvil 2008-09-21 20:16:20 EDT
Created attachment 317332 [details]
Patch posted to <ksplice@mit.edu>.

Fix of ksplice to explicitely check zlib.
Comment 2 Jan Kratochvil 2008-09-21 20:18:14 EDT
Thanks for the report, this workaround should fix it up for any 3rd party packages:
* Sun Sep 21 2008 Jan Kratochvil <jan.kratochvil@redhat.com> 2.18.50.0.9-3
- Provide libbfd.so and libopcodes.so for automatic dependencies (BZ 463101).

/usr/lib64/libbfd.so:
/* GNU ld script
   The libz dependency is unexpected by legacy build scripts.  */

INPUT ( /usr/lib64/libbfd.a -liberty -lz )
Comment 3 Jakub Jelinek 2008-09-22 03:11:50 EDT
When you use absolute paths in the script, please also add OUTPUT_FORMAT
directive, like e.g. /usr/lib*/libc.so uses:
OUTPUT_FORMAT(elf64-x86-64)
etc., so that things work well even if you build gcc -m64 -L/usr/lib/ -lbfd
or gcc -m32 -L/usr/lib64/ -lbfd.
Comment 4 Jan Kratochvil 2008-09-22 06:45:42 EDT
Jakub, thanks, I did not read it all in glibc as I see, fixed/imported.

* Mon Sep 22 2008 Jan Kratochvil <jan.kratochvil@redhat.com> 2.18.50.0.9-4
- Fix *.so scripts for multilib linking (BZ 463101, suggested by Jakub Jelinek).
Comment 5 CHIKAMA Masaki 2008-10-29 23:55:02 EDT
(In reply to comment #2)
> Thanks for the report, this workaround should fix it up for any 3rd party
> packages:
> * Sun Sep 21 2008 Jan Kratochvil <jan.kratochvil@redhat.com> 2.18.50.0.9-3
> - Provide libbfd.so and libopcodes.so for automatic dependencies (BZ 463101).
> 
> /usr/lib64/libbfd.so:
> /* GNU ld script
>    The libz dependency is unexpected by legacy build scripts.  */
> 
> INPUT ( /usr/lib64/libbfd.a -liberty -lz )

This breaks package which has 
 BuildRequires:  binutils-devel
but doesn't have
 BuildRequires:  zlib-devel
even if it doesn't really need libz.

One example is avarice.
Should I file a new Bug as avarice package ?
Comment 6 Jan Kratochvil 2008-10-30 04:10:23 EDT
Committed, built binutils-2.18.50.0.9-6.fc10, thanks:
* Thu Oct 30 2008 Jan Kratochvil <jan.kratochvil@redhat.com> 2.18.50.0.9-6
- binutils-devel now requires zlib-devel (BZ 463101 comment 5).

%package devel
Requires: zlib-devel

Note You need to log in before you can comment on or make changes to this bug.