I am trying to compile a gpsd client on a i686 bullseye machine. It appears the compiler can find the include file for libgps, gps.h. However, the linker cannot find the library.
gcc -Wall -ggdb -lm -lgps -o gpsclient gpsclient.c gpsclient.c:64:2: warning: #warning Setting up for API version 9.0 [-Wcpp] 64 | #warning Setting up for API version 9.0 | ^~~~~~~ /usr/bin/ld: /tmp/ccCsxl8F.o: in function `exitHandler': /home/charles/versioned/gpsclient/gpsclient.c:130: undefined reference to `gps_stream' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:131: undefined reference to `gps_close' /usr/bin/ld: /tmp/ccCsxl8F.o: in function `showData': /home/charles/versioned/gpsclient/gpsclient.c:229: undefined reference to `timespec_to_iso8601' /usr/bin/ld: /tmp/ccCsxl8F.o: in function `main': /home/charles/versioned/gpsclient/gpsclient.c:474: undefined reference to `gps_open' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:477: undefined reference to `gps_errstr' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:503: undefined reference to `gps_stream' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:506: undefined reference to `gps_waiting' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:509: undefined reference to `gps_read' /usr/bin/ld: /home/charles/versioned/gpsclient/gpsclient.c:515: undefined reference to `gps_stream' collect2: error: ld returned 1 exit status Compilation exited abnormally with code 1 at Sun Jul 12 12:11:46 This compiles and runs on Buster on AMD64 architecture. I have run ldconfig manually. root@white:/usr/lib/i386-linux-gnu# ldconfig -v | fgrep gps ldconfig: Can't stat /usr/local/lib/i386-linux-gnu: No such file or directory ldconfig: Can't stat /usr/local/lib/i686-linux-gnu: No such file or directory ldconfig: Can't stat /lib/i686-linux-gnu: No such file or directory ldconfig: Can't stat /usr/lib/i686-linux-gnu: No such file or directory ldconfig: Path `/lib/i386-linux-gnu' given more than once ldconfig: Path `/usr/lib/i386-linux-gnu' given more than once ldconfig: /lib/i386-linux-gnu/ld-2.30.so is the dynamic linker, ignoring libgps.so.26 -> libgps.so.26.0.0 root@white:/usr/lib/i386-linux-gnu# uname -a Linux white 5.7.0-1-686 #1 SMP Debian 5.7.6-1 (2020-06-24) i586 GNU/Linux root@white:/usr/lib/i386-linux-gnu# This also works on buster AMD64 when I have gpsd version 3.20.12 loaded from buster backports. This is the same version that is in bullseye. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/