diff mbox

[7/8] libssh2: fix static link with libgcrypt

Message ID 1411465547-6847-7-git-send-email-jezz@sysmic.org
State Rejected
Headers show

Commit Message

Jérôme Pouiller Sept. 23, 2014, 9:45 a.m. UTC
BR call configure script with environment variable
lt_cv_sys_lib_search_path_spec="" (see packages/Makefile.in). This prevent
libtool to detect compiler builtin paths. Thus, in case where
BR2_PREFER_STATIC_LIB is enabled, libtool does not find libgpg-error
dependency:

/home/jezz/br-continuous/cfgs/31-x86_64-core2-uclibc-static/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib/libgcrypt.a(rsa.o):
In function `run_selftests':
rsa.c:(.text+0xd2): undefined reference to `gpg_strerror'
rsa.c:(.text+0xfc): undefined reference to `gpg_strerror'

For this case, we may remove $lt_cv_sys_lib_search_path_spec from environment.
However, it not easy to remove a variable from default environment. So, we
prefer to pass a correct value.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
 package/libssh2/libssh2.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni April 4, 2015, 4:36 p.m. UTC | #1
Dear Jérôme Pouiller,

On Tue, 23 Sep 2014 11:45:46 +0200, Jérôme Pouiller wrote:
> BR call configure script with environment variable
> lt_cv_sys_lib_search_path_spec="" (see packages/Makefile.in). This prevent
> libtool to detect compiler builtin paths. Thus, in case where
> BR2_PREFER_STATIC_LIB is enabled, libtool does not find libgpg-error
> dependency:
> 
> /home/jezz/br-continuous/cfgs/31-x86_64-core2-uclibc-static/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib/libgcrypt.a(rsa.o):
> In function `run_selftests':
> rsa.c:(.text+0xd2): undefined reference to `gpg_strerror'
> rsa.c:(.text+0xfc): undefined reference to `gpg_strerror'
> 
> For this case, we may remove $lt_cv_sys_lib_search_path_spec from environment.
> However, it not easy to remove a variable from default environment. So, we
> prefer to pass a correct value.
> 
> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>

Since this patch, some other changes have been made to the libssh2
package, and it now links fine in a static configuration. I've marked
this patch as Rejected in patchwork, then.

Thanks,

Thomas
diff mbox

Patch

diff --git a/package/libssh2/libssh2.mk b/package/libssh2/libssh2.mk
index 50bd265..193714e 100644
--- a/package/libssh2/libssh2.mk
+++ b/package/libssh2/libssh2.mk
@@ -10,6 +10,7 @@  LIBSSH2_LICENSE = BSD
 LIBSSH2_LICENSE_FILES = COPYING
 LIBSSH2_INSTALL_STAGING = YES
 LIBSSH2_CONF_OPT = --disable-examples-build
+LIBSSH2_CONF_ENV += lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib"
 
 # libssh2 must use either libgcrypt or OpenSSL
 # Only select openssl if libgcrypt is not selected