On Thu, Feb 6, 2025 at 12:46 AM Börge Strümpfel <boerge.struempfel@xxxxxxxxx> wrote: > > Hi Bart, > > While preparing a patch to add gpio-manager to mainline Buildroot, I > encountered this issue again. That is, I can successfully compile the > gpio-manager manually (using autotools/gcc/ld provided by ubuntu 2024) however, > when using the Buildroot infrastructure, I get a compiler error, stating that > the libgpiod.so.3 cannot be found. > > After further investigation, I'm increasingly unsure on how the > libgpiod.so.3 is supposed to be found by the linker in the first place: > > From what I see, gpio-manager depends on: > - bindings/glib/libgpiod-glib > - dbus/lib/libgpiodbus Correct. > - lib/libgpiod This one is an indirect dependency, it's already pulled in by libgpiod-glib.so. > > However, I see no direct reference in dbus/manager/Makefile.am, nor can I see > an indirect reference via the Makefile.am files used to generate: > - bindings/glib/libgpiod-glib.la > - dbus/lib/libgpiodbus.la > > Am I missing something obvious? > These are generated in different directories, the Makefiles in there take care of this. > Furthermore upon review, I believe the solution I proposed last October was > flawed - I should have used: > LDADD += $(top_builddir)/lib/libgpiod.la On Ubuntu, I see that gpio-manager is only linked against libgpiod-glib.so and libgpiodbus.so. However if I cross-compile on yocto, it's linked against libgpiod.so as well. I don't know exactly what the differences in linker setup are but yocto is able to find libgpiod without problems. Before we add an unnecessary flag, may I suggest looking into how yocto does the linking? Bart