Bug 1462394 - postgresql --with-perl fails to build on rawhide due new perl
postgresql --with-perl fails to build on rawhide due new perl
Status: NEW
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Pavel Raiskup
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-06-16 23:30 EDT by Filipe Rosset
Modified: 2017-08-15 04:21 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Filipe Rosset 2017-06-16 23:30:45 EDT
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 =>[
Comment 1 Petr Pisar 2017-06-19 03:17:43 EDT
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.
Comment 2 Pavel Raiskup 2017-06-22 06:49:54 EDT
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).
Comment 3 Jan Kurik 2017-08-15 04:21:57 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

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