Subject: | 64-bit build error with PETERZEN/GPS-Magellan-0.61 |
Date: | Thu, 13 Aug 2015 21:11:21 -0400 |
To: | <bug-GPS-Magellan [...] rt.cpan.org> |
From: | Walt Sullivan <walts [...] magma.ca> |
I am running Linux, Ubuntu 14.04.3 LTS, on a 64-bit machine:
Linux aardvark 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015
x86_64 x86_64 x86_64 GNU/Linux
When I tried to install PETERZEN/GPS-Magellan-0.61, via cpan, I saw:
cc -shared -L/usr/local/lib -fstack-protector Magellan.o -o
blib/arch/auto/GPS/Magellan/Magellan.so \
-L/home/w3/.cpan/build/GPS-Magellan-0.61-XqWBDf/gpslib -lgps \
/usr/bin/ld:
/home/w3/.cpan/build/GPS-Magellan-0.61-XqWBDf/gpslib/libgps.a(serial.o):
relocation R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/home/w3/.cpan/build/GPS-Magellan-0.61-XqWBDf/gpslib/libgps.a: error adding
symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [blib/arch/auto/GPS/Magellan/Magellan.so] Error 1
I added "-fPIC" to CCFLAGS in gpslib/Makefile and the problem was solved.
Note that this error results in a malformed libgps.a, and could be behind the
other GPS-Magellan bug.
Walt Sullivan
Save our in-boxes! http://emailcharter.org