I have a confusing issue with the new gpiod-based GPIO driver.

It currently compiles and runs just fine under Buster. However under
Bookworm, whilst it compiles OK, it fails at load time:

hal_gpio: dlopen: /home/andypugh/linuxcnc-dev/rtlib/hal_gpio.so:
undefined symbol: gpiod_line_find

The difference seems to be in the linking of rtapi_app.

Under Buster libgpiod is 4th in the list

andypugh@pi400:~/linuxcnc-dev/bin $ ldd rtapi_app
linux-vdso.so.1 (0xbeb12000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so =>
/usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f60000)
libgpiod.so.2 => /lib/arm-linux-gnueabihf/libgpiod.so.2 (0xb6f22000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f0f000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6ef8000)
libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0xb6ec8000)
libstdc++.so.6 => /lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6d81000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6cff000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6cd2000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6ca8000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6b5a000)
/lib/ld-linux-armhf.so.3 (0xb6f75000)

Whereas under Bookworm it is not there:

andypugh@pi400:~/linuxcnc-dev/src$ ldd ../bin/rtapi_app
linux-vdso.so.1 (0x0000ffff94b8d000)
libudev.so.1 => /lib/aarch64-linux-gnu/libudev.so.1 (0x0000ffff94a90000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff94870000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff94830000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff94680000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff94b50000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff945e0000)

I have checked with a line inside the submakefile that the flags is
there in LDFLAGS and I have added it explicitly too.

andypugh@pi400:~/linuxcnc-dev/src$ make
$LDFLAGS is [-lgpiod]
$CXX is [c++ -std=gnu++17]
Reading 206/206 dependency files
...


Any ideas from the floor? The only differences are:
1) Different Debian versions
2) 64 bit v 32 bit kernels
3) Different libgpiod versions, v1.2 in Buster and v1.6 in Bookworm

A simple test file using the library _does_ compile, link and run
under Bookworm. So the problem is not in the library as far as I can
see.

rtapi_app is compiled/linked via src/rtapi/Submakefile.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to