postgresql --with-perl fails to build on rawhide due new perl postgresql affected versions 9.3+ (including HEAD) (maybe due hardening?) > checking for libperl... no > configure: error: libperl library is required for Perl or in detail configure:15859: checking for libperl configure:15875: ccache gcc -o conftest -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE conftest.c -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -lnsl -ldl -lm -lcrypt -lutil -lc >&5 /usr/bin/ld: /tmp/cchBvqS3.o: relocation R_X86_64_PC32 against symbol `perl_alloc' 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 #disabled --with-perl workaround the build config_opts =>[ qw( --enable-cassert --enable-debug --enable-nls --with-perl --with-python --with-tcl --with-gssapi --with-openssl --with-ldap --with-libxml --with-libxslt --with-pam --with-krb5 )
That's bug in postrgresql build script. It uses Perl's linker flags but it does uses compiler flags. Specifically it does not pass -fPIC to adhere default Fedora hardening with RELRO linkage. The same issue was already spotted a year ago when Perl was tentatively built with enabled hardening.
Felipe, here we are talking about vanilla Postgresql, right? Because I don't see problems with PostgreSQL in koschei. Build of our package in PostgreSQL succeeds IMO because we have now enabled hardening (bug 1242817).
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This requires upstream fix.