Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479630 - sys-db/postgresql-server-9.2.4 fails to build with PIE in hardened toolchain
Summary: sys-db/postgresql-server-9.2.4 fails to build with PIE in hardened toolchain
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-03 12:37 UTC by Patrick Strateman
Modified: 2013-08-03 13:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,330.08 KB, text/x-log)
2013-08-03 12:39 UTC, Patrick Strateman
Details
environment (file_479630.txt,166.72 KB, text/plain)
2013-08-03 12:40 UTC, Patrick Strateman
Details
emerge --info (file_479630.txt,4.52 KB, text/plain)
2013-08-03 12:40 UTC, Patrick Strateman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Strateman 2013-08-03 12:37:05 UTC
emerging postgresql-server:9.2 with the hardened x86_64-pc-linux-gnu-4.6.3 fails

x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -I../../../src/include pg_resetxlog.o -L../../../src/port -Wl,-O1 -Wl,--as-needed  -L/usr/lib64/postgresql-9.2/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-9.2/lib64',--enable-new-dtags -Wl,-O1 -Wl,--as-needed -lpgport -lpam -lssl -lcrypto -lz -lreadline -lcrypt -ldl -lm  -o pg_resetxlog
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/postgresql-9.2/lib64/libpgport.a(exec.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/postgresql-9.2/lib64/libpgport.a: could not read symbols: Bad value

Reproducible: Always

Steps to Reproduce:
1.emerge postgresql-server with hardened toolchain including PIE
Actual Results:  
Fails with error
Comment 1 Patrick Strateman 2013-08-03 12:39:59 UTC
Created attachment 355016 [details]
build.log
Comment 2 Patrick Strateman 2013-08-03 12:40:16 UTC
Created attachment 355018 [details]
environment
Comment 3 Patrick Strateman 2013-08-03 12:40:26 UTC
Created attachment 355020 [details]
emerge --info
Comment 4 Patrick Strateman 2013-08-03 13:00:47 UTC
emerge --unemerge postgresql-base resolved this problem

it seems like this was caught in a loop using pg_config CFLAGS/LDFLAGS which prevented postgresql-base/postgresql-server from being built with PIC/PIE