Bug 1462394

Summary: [upstream] postgresql --with-perl fails to build on rawhide due new perl
Product: [Fedora] Fedora Reporter: Filipe Rosset <rosset.filipe>
Component: postgresqlAssignee: Patrik Novotný <panovotn>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: cweyl, devrim, hhorak, iarnell, jmlich83, jplesnik, jstanek, kasal, perl-devel, pkubat, ppisar, praiskup, psabata, rc040203, tcallawa, tgl
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-22 10:22:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filipe Rosset 2017-06-17 03:30:45 UTC
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
          )

Comment 1 Petr Pisar 2017-06-19 07:17:43 UTC
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 10:49:54 UTC
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 08:21:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 4 Ben Cotton 2018-11-27 14:51:17 UTC
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.

Comment 5 Pavel Raiskup 2018-11-27 15:00:56 UTC
This requires upstream fix.