GNOME Bugzilla – Bug 747982
gthumb rawhide build fails to detect a number of libraries
Last modified: 2015-10-08 09:25:59 UTC
configure:18808: checking for floor in -lm configure:18833: gcc -o conftest -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c -lm >&5 conftest.c:32:6: warning: conflicting types for built-in function 'floor' char floor (); ^ /usr/bin/ld: /tmp/cc7ozcQQ.o: relocation R_X86_64_PC32 against undefined symbol `floor@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status This seems to be caused by the fact that the linker is invoked with -specs=/usr/lib/rpm/redhat/redhat-hardened-ld from LDFLAGS, but the compilation is done without matching -specs line that's supposed to come from CFLAGS.
Created attachment 301721 [details] [review] configure: Clear out ldflags before ac_check_lib() calls This fixes the Fedora 23 build where the cflags and ldflags have to match. Otherwise, if ac_check_lib checks throw away cflags but use ldflags, the checks fail with linker errors.
Patch pushed to master, thank you.
This actually breaks on OpenBSD with gthumb 3.4.1 where without passing -L/usr/local/lib and -I/usr/local/include jpeg and tiff cannot be found. Removing the LDFLAGS="" line works around it, but that's hardly the right move.