Hello. # I'm almost comming back..
At Wed, 16 Oct 2019 10:41:19 -0400, Andrew Dunstan <andrew.duns...@2ndquadrant.com> wrote in > On Wed, Oct 16, 2019 at 8:32 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > > >> $ ./configure --with-perl CFLAGS=-O0 > > >> It is bash-aliased and survived without being found for a long time on > > >> my Cent7 environment, but CentOS8 doesn't allow that. > > > > I don't quite understand why that wouldn't work. I'm confused with make CFLAGS=.. > It looks like you need CFLAGS='-O0 -fPIC' on CentOS 8 when building with perl. Yes, that is what my first mail said. I dug into it further. The immediately problematic command generated by autoconf is: gcc -o /tmp/conftest -Wall -Wmissing-prototypes -Wpointer-arith \ -Wdeclaration-after-statement -Werror=vla -Wendif-labels \ -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing \ -fwrapv -fexcess-precision=standard -Wno-format-truncation \ -Wno-stringop-truncation \ -O0 \ -D_GNU_SOURCE -I/usr/lib64/perl5/CORE \ /tmp/conftest.c \ -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE \ -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc /usr/bin/ld: /tmp/ccGxodNv.o: relocation R_X86_64_32 against symbol `PL_memory_wrap' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Very interestingly I don't get the error when the "-O0" is "-O2". It is because gcc eliminates the PL_memory_wrap maybe by inlining. The *final* problematic command boils down to: gcc -o /tmp/conftest /tmp/conftest_O0.o \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lperl That is, the problem doesn't happen without "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld". I found the following bug report but it hasn't ever been fixed since 2016 on Fedora 24. I'm not sure about the newer versions. https://bugzilla.redhat.com/show_bug.cgi?id=1343892 -- Kyotaro Horiguchi NTT Open Source Software Center