Description of problem: Linking any trivial test program without -fPIC fails if you use -specs=/usr/lib/rpm/redhat/redhat-hardened-ld (as used by RPM builds). This means absolutely everything has to be built with -fPIC in Rawhide, which is certainly unexpected. $ gcc test.c -lvirt $ gcc test.c -lvirt -specs=/usr/lib/rpm/redhat/redhat-hardened-ld /usr/bin/ld: /tmp/ccqyK5ia.o: relocation R_X86_64_32S against `virConnectOpen' can not be used when making a shared object; recompile with -fPIC /tmp/ccqyK5ia.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status $ cat test.c #include <stdio.h> #include <stdlib.h> #include <libvirt/libvirt.h> int main (int argc, char *argv[]) { void *p = virConnectOpen; fprintf (stderr, "p = %p\n", p); exit (1); } Version-Release number of selected component (if applicable): redhat-rpm-config-27-1.fc22.noarch How reproducible: 100% Steps to Reproduce: 1. See above.
See: https://lists.fedoraproject.org/pipermail/devel/2015-February/208039.html