Bug 35872

Summary: libbfd compatibility problems?
Product: [Retired] Red Hat Linux Reporter: Thierry Valentin <valentin>
Component: binutilsAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-13 15:51:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thierry Valentin 2001-04-13 15:51:50 UTC
Hello,
Sorry in advance if you find my question naive.

I have a C++ program that uses libbfd.
I have compiled this program on RedHat 6.1 with egcs-2.91.66.
This program works ok on RedHat 6.1 but fails to execute on Redhat 7.0:
the loader complains that it cannot find /usr/lib/libbfd-2.9.1.0.24.so
(RedHat 7.0 comes with libbfd-2.10.0.18.so)

Note: libbfd is the only library that the loader complains about
among the numerous other system libraries my program uses.

Recompiling the program on RedHat 7.0 of course fixes the problem
but this forces me to release two versions of my program instead of one.

Is libbfd-2.10.0.18 incompatible with libbfd-2.9.1.0.24?
Do I have other solutions than releasing 2 different versions?
Did I miss something?
Thanks for your help.

Comment 1 Jakub Jelinek 2001-04-13 21:53:00 UTC
libbfd is never meant to be compatible, it is a shared library
only so that all of gas/ld/nm/strip/... can share it. The API is
changing all the time.
If you want to ship a program using libbfd, basically the only option
unless you want to run it yourself only is to link libbfd.a in
instead of linking with -lbfd, that way the program will run everywhere.
Otherwise, even in the same distribution if somebody updates binutils
the program will suddenly not work (or rpm dependencies will fail).

Comment 2 Thierry Valentin 2001-04-20 16:52:15 UTC
I linked my program with libbfd.a and this fixes my problem.
Thanks a lot for your help.