Re: [libgpiod][PATCH 1/1] dbus: manager: fix linker not finding libgpiod.so

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

 



On Wed, Oct 30, 2024 at 5:49 PM Boerge Struempfel
<boerge.struempfel@xxxxxxxxx> wrote:
>
> When crosscompiling, the linker isn't finding libpgiod.so while linking
> the manager to libgpiod-glib.so.
>
> In order to fix this issue, we manually force the linker to look in
> the corresponding folder for needed shared libraries, when building the
> manager.
>
> Signed-off-by: Boerge Struempfel <boerge.struempfel@xxxxxxxxx>
> ---
>  dbus/manager/Makefile.am | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/dbus/manager/Makefile.am b/dbus/manager/Makefile.am
> index d1cef8e..32c9e30 100644
> --- a/dbus/manager/Makefile.am
> +++ b/dbus/manager/Makefile.am
> @@ -9,6 +9,7 @@ AM_CFLAGS += -DG_LOG_DOMAIN=\"gpio-manager\"
>  AM_CFLAGS += $(PROFILING_CFLAGS)
>  AM_LDFLAGS = $(GLIB_LIBS) $(GIO_LIBS) $(GIO_UNIX_LIBS) $(GUDEV_LIBS)
>  AM_LDFLAGS += $(PROFILING_LDFLAGS)
> +AM_LDFLAGS += -Wl,-rpath,$(top_builddir)/lib/.libs
>  LDADD = $(top_builddir)/bindings/glib/libgpiod-glib.la
>  LDADD += $(top_builddir)/dbus/lib/libgpiodbus.la
>
> --
> 2.43.0
>
>

Can you give me more info on your environment? I'm cross-compiling
just fine and the:

LDADD += $(top_builddir)/dbus/lib/libgpiodbus.la

bit should be enough for linking.

Bart





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux