/usr/bin/ld: /srv/sage-8.0/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a shared object; recompile with -fPIC
Probably your gmp or mpir was not built correctly:Indeed:/usr/bin/ld: /srv/sage-8.0/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a shared object; recompile with -fPIC
HiOn 19 September 2017 at 19:25, Dima Pasechnik <dim...@gmail.com> wrote:Probably your gmp or mpir was not built correctly:Indeed:/usr/bin/ld: /srv/sage-8.0/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a shared object; recompile with -fPICmpir log attached. There is no gmp log.This persists with SAGE_FAT_BINARY=no and rerunning make as well.This occurs inside a libvirt/qemu virtual machine.
Someone else posted this error related to docker in July:
https://groups.google.com/d/msg/sage-devel/Jl071EqambM/yr4_RvjbBQAJ
HiOn 20 September 2017 at 08:56, Jan Groenewald <j...@aims.ac.za> wrote:HiOn 19 September 2017 at 19:25, Dima Pasechnik <dim...@gmail.com> wrote:Probably your gmp or mpir was not built correctly:Indeed:/usr/bin/ld: /srv/sage-8.0/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a shared object; recompile with -fPICmpir log attached. There is no gmp log.
This persists with SAGE_FAT_BINARY=no and rerunning make as well.This occurs inside a libvirt/qemu virtual machine.
Someone else posted this error related to docker in July:
https://groups.google.com/d/msg/sage-devel/Jl071EqambM/yr4_RvjbBQAJJust like that previous poster (in docker), if inside my VM I do:
cd upstream; tar xf ecm*; cd ecm*; ./configure; make
On Wednesday, September 20, 2017 at 8:19:48 AM UTC+1, Jan Groenewald wrote:HiOn 20 September 2017 at 08:56, Jan Groenewald <j...@aims.ac.za> wrote:HiOn 19 September 2017 at 19:25, Dima Pasechnik <dim...@gmail.com> wrote:Probably your gmp or mpir was not built correctly:Indeed:/usr/bin/ld: /srv/sage-8.0/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a shared object; recompile with -fPICmpir log attached. There is no gmp log./bin/bash ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" gcc -c -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo fat_entry | sed 's/_$//'` -m64 -O2 -g -I. -I.. `test -f 'fat_entry.asm' || echo './'`fat_entry.asmlibtool: compile: ../mpn/m4-ccas --m4=m4 gcc -c -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -I.. -DOPERATION_fat_entry -m64 -O2 -g -I. -I.. fat_entry.asm -fPIC -DPIC -o .libs/fat_entry.om4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_fat_entry -DPIC fat_entry.asm >tmp-fat_entry.sgcc -c -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -I.. -DOPERATION_fat_entry -m64 -O2 -g -I. -I.. tmp-fat_entry.s -fPIC -DPIC -o .libs/fat_entry.olibtool: compile: ../mpn/m4-ccas --m4=m4 gcc -c -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -I.. -DOPERATION_fat_entry -m64 -O2 -g -I. -I.. fat_entry.asm -o fat_entry.o >/dev/null 2>&1these are lines in the log corresponding to compiling fat_entry.o, and it looks to me as if the last line does notsay -fPIC anywhere. No idea whether this is the cause of the problem...
This persists with SAGE_FAT_BINARY=no and rerunning make as well.This occurs inside a libvirt/qemu virtual machine.
Someone else posted this error related to docker in July:
https://groups.google.com/d/msg/sage-devel/Jl071EqambM/yr4_RvjbBQAJJust like that previous poster (in docker), if inside my VM I do:
cd upstream; tar xf ecm*; cd ecm*; ./configure; makebut this is against another libgmp, I presume.
This is possibly gcc 6.2 related: https://mail.coreboot.org/pipermail/coreboot/2016-December/082739.html
And a possible solution is Build GMP --with-pic
, (only) if GCC defaults to -pie
(preferred solution from reading the rest of above thread to the end).
HiThis is possibly gcc 6.2 related: https://mail.coreboot.org/pipermail/coreboot/2016-December/082739.html
And a possible solution is Build GMP
--with-pic
, (only) if GCC defaults to-pie
(preferred solution from reading the rest of above thread to the end).