Bug 2095926

Summary: ld.bfd (symbol from plugin): undefined reference to symbol
Product: Red Hat Enterprise Linux 9 Reporter: Orion Poplawski <orion>
Component: binutilsAssignee: Nick Clifton <nickc>
binutils sub component: system-version QA Contact: Miloš Prchlík <mprchlik>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: fweimer, mprchlik, ohudlick, sipoyare
Version: 9.0Keywords: Bugfix, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: binutils-2.35.2-24.el9 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:12:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2022-06-11 02:59:57 UTC
Description of problem:

When building cgnslib for EL9:

/usr/bin/gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu99 -DNDEBUG -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 CMakeFiles/calcwish.dir/calctcl.c.o CMakeFiles/calcwish.dir/calcwish.c.o -o calcwish  ../calclib/libcalclib.a /usr/lib64/libtcl.so /usr/lib64/libtk.so /usr/lib64/libhdf5.so /usr/lib64/libX11.so -lm ../../libcgns.so.4.3 -ldl /usr/lib64/libhdf5.so 
/usr/bin/ld: calc.c.o (symbol from plugin): undefined reference to symbol 'reference@@LIBXML2_2.4.30'
/usr/bin/ld: /usr/lib64/libxml2.so.2: error adding symbols: DSO missing from command line

reference is a variable defined in libcaclclib.a (as well as a versioned symbol in libxml2).  This is appears to be the following upstream bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=27311

Using -fuse-ld=gold as mentioned there seems to fix the link as well.

Version-Release number of selected component (if applicable):
binutils-2.35.2-23.el9.x86_64

Comment 1 Nick Clifton 2022-06-14 13:58:22 UTC
Fixed in binutils-2.35.2-24.el9.

Comment 4 Miloš Prchlík 2022-06-28 13:26:45 UTC
Verified with binutils-2.35.2-24.el9.

Comment 6 errata-xmlrpc 2022-11-15 11:12:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (binutils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8281