[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Building gpsd 3.3

From: Adam Boggs
Subject: Re: [gpsd-users] Building gpsd 3.3
Date: Sat, 21 Jan 2012 11:12:40 -0700

On Tue, Jan 10, 2012 at 10:35 AM, Eric S. Raymond <address@hidden> wrote:
> Pris Matic <address@hidden>:
>> I'm trying to build gpsd (my distro has a gpsd package that works
>> fine, but I need to modify source). I'm running Arch Linux x86, kernel
>> 3.1 (latest stable). I tried to follow the build instructions but ran
>> into many problems.
> Man, you seem to have been seriously snakebit.  Let's see how many of these
> we can solve...
>> 1) Running scons inside the build directory errors out with the following:
>> gpsd :/usr/bin/ld: ntpshm.o: undefined reference to symbol
>> 'log@@GLIBC_2.0'.... /usr/bin/ld: note: 'log@@GLIBC_2.0' is defined in
>> DSO /lib/ so try adding it to the linker command line
>> I tried adding LDFLAGS=-lm to my environment in the SConstruct file,
>> my shell environment, even directly passing the argument to scons when
>> I called it but none of these methods worked.
> This is *probably* fixed by the new fallback to static linking if chrpath
> is not installed.  I'd appreciate it if you'd pull git head and check.

I ran into a similar build issue and got it fixed but thought I would
report it.  I did not have chrpath installed so it fell back to static
linking.  This caused a build failure due to the order of the
libraries on the link line:

scons: done reading SConscript files.
scons: Building targets ...
gcc -o gpsdecode -Wl,-rpath=//usr/lib gpsdecode.o -L. -L/usr/lib -lrt
-lm -lgpsd -lgps
./libgpsd.a(libgpsd_core.o): In function `fill_dop':
libgpsd_core.c:(.text+0x223): undefined reference to `sincos'
libgpsd_core.c:(.text+0x26c): undefined reference to `sincos'
libgpsd_core.c:(.text+0x9a6): undefined reference to `sqrt'
libgpsd_core.c:(.text+0xa35): undefined reference to `sqrt'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:(.text+0xa5e): more
undefined references to `sqrt' follow
./libgpsd.a(libgpsd_core.o): In function `gpsd_poll':
libgpsd_core.c:(.text+0x1a22): undefined reference to `asin'
./libgpsd.a(driver_evermore.o): In function `evermore_rate_switcher':
driver_evermore.c:(.text+0x4dc): undefined reference to `trunc'

If I move -lrt and -lm to the end it links fine.  This is ubuntu 11.10
gcc 4.6.1.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]