gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] Build of gpsd fails


From: address@hidden
Subject: [gpsd-dev] Build of gpsd fails
Date: Mon, 30 Apr 2012 17:13:18 +0200

Hallo,

 

on Ubuntu 12.04, the build of gpsd fails with

 

gpsutils.c:(.text+0x3b3): undefined reference to `clock_gettime'

 

in "my" module driver_nmea2000.c.

 

Here is the output of SConns.

 

gcc -o gpsdecode -Wl,-rpath=//usr/local/lib gpsdecode.o -L. -L/usr/local/lib -lrt -lgpsd -lgps -lm

./libgpsd.a(driver_nmea2000.o): In function `nmea2000_get':

driver_nmea2000.c:(.text+0x12e): undefined reference to `clock_gettime'

./libgps.a(gpsutils.o): In function `timestamp':

gpsutils.c:(.text+0x3b3): undefined reference to `clock_gettime'

collect2: ld returned 1 exit status

scons: *** [gpsdecode] Error 1

scons: building terminated because of errors.

 

There are hints, that -lrt library reference should be after the library using it for newer gcc's.

 

The following command with "-lrt" at the end of the command line works.

 

address@hidden:~/gpsd/gpsd$ gcc -o gpsdecode -Wl,-rpath=//usr/local/lib gpsdecode.o -L. -L/usr/local/lib -lgpsd -lgps -lm -lrt

 

I will disable the section in driver_nmea2000.c for now, as it is used for writing a logfile only.

I am not a wizard of "scons", what need to be changed, that "-lrt" goes to the end of the command line?

 

Reinhard

 


reply via email to

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