[exim-dev] [Bug 1584] Build failure with gcc-5 due to PIC/PI…

Inizio della pagina
Delete this message
Reply to this message
Autore: Jaroslav Škarvada
Data:  
To: exim-dev
Oggetto: [exim-dev] [Bug 1584] Build failure with gcc-5 due to PIC/PIE mismatch
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1584




--- Comment #2 from Jaroslav Škarvada <jskarvad@???> 2015-02-10 09:50:45 ---
Compilation error:
gcc -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient -DDYNLOOKUP -shared
-rdynamic -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 -g -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic -fpie -I/usr/kerberos/include mysql.c -o mysql.so
/usr/bin/ld: /tmp/ccRo6WwN.o: relocation R_X86_64_PC32 against undefined symbol
`debug_selector' 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
Makefile:34: recipe for target 'mysql.so' failed
make[2]: *** [mysql.so] Error 1
make[2]: Leaving directory
'/builddir/build/BUILD/exim-4.85/build-Linux-x86_64/lookups'

I.e. there is -fpie, but there should be -fpic.

We compile it with:
export PIE=-fpie

With the attached patch it can be compiled with:
export PIE=-fpie
export PIC=-fpic


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email