On Wed, 3 Apr 2019, SZ Lin (林上智) wrote:
The APIs between libgpiod1 and libgpiod2 are quite different, and thus
the conflict setting was added to avoid any potential problem.
Differences in API (or ABI) shouldn't cause any trouble: programs built
using the old -dev package will use libgpiod.so.1, and programs built
using the new -dev package will use libgpiod.so.2. This is precisely why
they have different SONAMEs.
Can you make sure that it is harmless to co-install these two versions?
Well, I've tried co-installing them (admittedly on Raspbian, but the
changes between the Debian and Raspbian versions are minimal) and both old
and new versions of gpiodetect work, and pick up their correct library
versions:
bjh21@fugloy:/tmp $ sudo /usr/bin/gpiodetect
gpiochip0 [pinctrl-bcm2835] (54 lines)
bjh21@fugloy:/tmp $ sudo ./gpiod-1.2/usr/bin/gpiodetect
gpiochip0 [pinctrl-bcm2835] (54 lines)
bjh21@fugloy:/tmp $ ldd /usr/bin/gpiodetect
libgpiod.so.1 => /usr/lib/arm-linux-gnueabihf/libgpiod.so.1 (0xb6f18000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6dca000)
/lib/ld-linux-armhf.so.3 (0xb6f2e000)
bjh21@fugloy:/tmp $ ldd ./gpiod-1.2/usr/bin/gpiodetect
libgpiod.so.2 => /usr/lib/arm-linux-gnueabihf/libgpiod.so.2 (0xb6fb8000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e6a000)
/lib/ld-linux-armhf.so.3 (0xb6fce000)
So they appear to be co-installable, and both work properly when they're
co-installed. I can't see any reason why they should interact badly.
--
Ben Harris