Bug 1984891 - adcli: FTBFS because of libresolv changes in glibc 2.34
Summary: adcli: FTBFS because of libresolv changes in glibc 2.34
Alias: None
Product: Fedora
Classification: Fedora
Component: adcli
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Sumit Bose
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1984892
TreeView+ depends on / blocked
Reported: 2021-07-22 12:34 UTC by Florian Weimer
Modified: 2021-07-28 12:48 UTC (History)
1 user (show)

Fixed In Version: adcli-0.9.1-9.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1984892 (view as bug list)
Last Closed: 2021-07-28 12:48:56 UTC
Type: Bug

Attachments (Terms of Use)

Description Florian Weimer 2021-07-22 12:34:53 UTC
adcli-0.9.1-8.fc35 contains the following configure check:

AC_MSG_CHECKING(for which library has res_query)
for lib in "" "-lresolv"; do
	LIBS="$LIBS $lib"
		AC_LANG_PROGRAM([#include <resolv.h>],
		                [res_query (0, 0, 0, 0, 0)])
	[ AC_MSG_RESULT(${lib:-libc}); have_res_query="yes"; break; ],
	[ LIBS="$saved_LIBS" ])

In glibc 2.34, res_query has been moved into libc, so this no longer picks up -lresolv. However, in library/addisco.c, adcli uses ns_get32, and this symbol still needs -lresolv.

This leads to this linker failure:

libtool: link: 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 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -g -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wdeclaration-after-statement -Wformat=2 -Winit-self -Waggregate-return -Wno-missing-format-attribute -Wmissing-include-dirs -Wundef -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o adcli computer.o entry.o info.o tools.o -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now  ../library/.libs/libadcli.a -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -llber -lldap
/usr/bin/ld: /tmp/ccve9tqE.ltrans1.ltrans.o: undefined reference to symbol 'ns_get32@@GLIBC_2.9'
/usr/bin/ld: /usr/lib64/libresolv.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

For Fedora, it should be possible to link with -lresolv unconditionally due to the --as-needed linker flag.

Comment 1 Fedora Update System 2021-07-28 12:47:02 UTC
FEDORA-2021-3ba04e8b7d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3ba04e8b7d

Comment 2 Fedora Update System 2021-07-28 12:48:56 UTC
FEDORA-2021-3ba04e8b7d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

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