gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] timespec_str and test linking


From: Gary E. Miller
Subject: Re: [gpsd-dev] timespec_str and test linking
Date: Tue, 24 Sep 2019 19:39:09 -0700

Yo Greg!

I am almost totally ignorant of Qt, but I did dig at this.

On Mon, 23 Sep 2019 21:54:12 -0400
Greg Troxel <address@hidden> wrote:

> I did a build and got timespec_str undefined in test_qgpsmm.

I manage to compile test_gqgpsmm, even though my scons turned off Qt...

>  It seems
> that is because it doesn't link against -lgps which is where that
> function is (recently) defined.

If turns out that libQgpsmm.so is libgps.so, but compiled differently
for Qt.  So linking in -lgps is not right.

timespec_str is being linked into libQgpsmm.so.25.0.0:

g++ -o libQgpsmm.so.25.0.0 -pthread -shared -Wl,-Bsymbolic 
-Wl,-soname=libQgpsmm.so.25 qt-ais_json.os qt-bits.os qt-gpsdclient.os 
qt-gps_maskdump.os qt-gpsutils.os qt-hex.os qt-json.os qt-libgps_core.os 
qt-libgps_dbus.os qt-libgps_json.os qt-libgps_shm.os qt-libgps_sock.os 
qt-netlib.os qt-os_compat.os qt-rtcm2_json.os qt-rtcm3_json.os 
qt-shared_json.os qt-timespec_str.os qt-libgpsmm.os -L. -lrt -lm -ldbus-1 
-lbluetooth -ldbus-1 -lQt5Network -lQt5Core

As it should be because timespec_str.c is in qtobjects in SConstruct

I can see it in there:

# strings libQgpsmm.so.25.0.0 | fgrep timespec_s
timespec_str

But it does not get found when linking the binary:

g++ -o tests/test_qgpsmm -pthread tests/qt-test_gpsmm.o -L. -lQgpsmm
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
./
libQgpsmm.so: undefined reference to `timespec_str'

I suspect a C/C++ thing?

Anyone understand the Qt linkage?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgphc591c4tTm.pgp
Description: OpenPGP digital signature


reply via email to

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