net/asterisk-11.x and net/asterisk-13.x: fix menuselect
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 28 Jul 2017 19:34:02 +0000 (21:34 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Fri, 28 Jul 2017 19:34:05 +0000 (21:34 +0200)
menuselect often fails on the buildbots:

menuselect/menuselect: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

This doesn't happen on all builds. The assumption is that on the
particular buildbot where there is no error the buildbots own libxml2.so
is usable (it exists and the version is suitable).

To fix this make the linker add an rpath to the menuselect utility,
pointing to the hostpkg lib dir.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-11.x/Makefile
net/asterisk-13.x/Makefile

index 2bfadbf698b2ac0b3a21e6aabfea404e27d447be..5dc0374169dd17ff3d18babfd08f8d955b794c16 100644 (file)
@@ -310,7 +310,7 @@ define Build/Configure
                CC="$(HOSTCC)" \
                CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
                CONFIG_SITE= \
-               LDFLAGS="$(HOST_LDFLAGS)" \
+               LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
                ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR_HOSTPKG)/bin/xml2-config \
                ./configure \
                $(HOST_CONFIGURE_ARGS) \
@@ -321,7 +321,7 @@ endef
 define Build/Compile
        CC="$(HOSTCC)" \
        CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
-       LDFLAGS="$(HOST_LDFLAGS)" \
+       LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
        $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
        $(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \
                include/asterisk/buildopts.h defaults.h \
index d082d66a155347b7a479926b7980ae8434fe7be2..13614fd6e16256d8ccae965a62f59293788c11b9 100644 (file)
@@ -251,7 +251,7 @@ define Build/Configure
                CC="$(HOSTCC)" \
                CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
                CONFIG_SITE= \
-               LDFLAGS="$(HOST_LDFLAGS)" \
+               LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
                ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR_HOSTPKG)/bin/xml2-config \
                ./configure \
                $(HOST_CONFIGURE_ARGS) \
@@ -262,7 +262,7 @@ endef
 define Build/Compile
        CC="$(HOSTCC)" \
        CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
-       LDFLAGS="$(HOST_LDFLAGS)" \
+       LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
        $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                include/asterisk/version.h \