gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] [PATCH 2/5] Fixes some build failures of test_gpsmm.


From: Fred Wright
Subject: [gpsd-dev] [PATCH 2/5] Fixes some build failures of test_gpsmm.
Date: Sun, 23 Oct 2016 14:16:55 -0700

The clock_gettime() function was originally a "second-tier" library
function in Linux, implemented in librt and requiring "-lrt" when
linking.  Later versions moved it to libc, with the "-lrt" being
unnecessary.  The build recipe for test_gpsmm here was failing to
account for the optional need for the "-lrt", causing it to fail
to build on debian Wheezy.

TESTED:
Now passes "scons build-all check" on a Beaglebone Black running
Debian Wheezy, where test_gpsmm formerly failed to build.  Also
retested on OSX 10.9 (where librt doesn't exist) for good measure.
---
 SConstruct | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index 5996513..8cd558a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1312,7 +1312,8 @@ else:
         parse_flags=["-lm"] + rtlibs + usbflags + dbusflags)
 
 test_gpsmm = env.Program('test_gpsmm', ['test_gpsmm.cpp'],
-                         LIBS=['gps_static'], LIBPATH='.', parse_flags=["-lm"] 
+ dbusflags)
+                         LIBS=['gps_static'], LIBPATH='.',
+                         parse_flags=["-lm"] + rtlibs + dbusflags)
 testprogs = [test_bits, test_float, test_geoid, test_libgps, test_matrix, 
test_mktime, test_packet, test_timespec, test_trig]
 if env['socket_export']:
     testprogs.append(test_json)
-- 
2.10.1




reply via email to

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