Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] libcurl: fix build with ssh2 and static mbedtls
@ 2018-05-21 11:41 Fabrice Fontaine
  2018-05-22 21:06 ` Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2018-05-21 11:41 UTC (permalink / raw)
  To: buildroot

The ssh2 pkg-config file could contain the following lines when build
with a static version of mbedtls:
   Libs: -L${libdir} -lssh2 /xxx/libmbedcrypto.a
   Libs.private: /xxx/libmbedcrypto.a

This static mbedtls library must be used to correctly detect ssh2
support and this library must be copied in libcurl.pc otherwise
compilation of any application (such as upmpdcli) with libcurl will fail
when trying to found mbedtls functions included in libssh2.
So, replace pkg-config --libs-only-l by pkg-config --libs.

Fixes:
 - http://autobuild.buildroot.net/results/43e24b22a77f616d6198c10435dcc23cc3b9088a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ink-with-ssh2-built-with-a-static-mbedtls.patch | 40 ++++++++++++++++++++++
 package/libcurl/libcurl.mk                         |  2 ++
 2 files changed, 42 insertions(+)
 create mode 100644 package/libcurl/0001-Fix-link-with-ssh2-built-with-a-static-mbedtls.patch

diff --git a/package/libcurl/0001-Fix-link-with-ssh2-built-with-a-static-mbedtls.patch b/package/libcurl/0001-Fix-link-with-ssh2-built-with-a-static-mbedtls.patch
new file mode 100644
index 0000000000..9107fa7c8c
--- /dev/null
+++ b/package/libcurl/0001-Fix-link-with-ssh2-built-with-a-static-mbedtls.patch
@@ -0,0 +1,40 @@
+From b5fbc486e805805efb8400373ccec2a3dee1c81b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 21 May 2018 12:07:00 +0200
+Subject: [PATCH 1/1] Fix link with ssh2 built with a static mbedtls
+
+The ssh2 pkg-config file could contain the following lines when build
+with a static version of mbedtls:
+   Libs: -L${libdir} -lssh2 /xxx/libmbedcrypto.a
+   Libs.private: /xxx/libmbedcrypto.a
+
+This static mbedtls library must be used to correctly detect ssh2
+support and this library must be copied in libcurl.pc otherwise
+compilation of any application (such as upmpdcli) with libcurl will fail
+when trying to found mbedtls functions included in libssh2.
+So, replace pkg-config --libs-only-l by pkg-config --libs.
+
+Fixes:
+ - http://autobuild.buildroot.net/results/43e24b22a77f616d6198c10435dcc23cc3b9088a
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5569a26b4..9e2606885 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -2766,7 +2766,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
+     CURL_CHECK_PKGCONFIG(libssh2)
+ 
+     if test "$PKGCONFIG" != "no" ; then
+-      LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
++      LIB_SSH2=`$PKGCONFIG --libs libssh2`
+       LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
+       CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
+       version=`$PKGCONFIG --modversion libssh2`
+-- 
+2.14.1
+
diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index fbaeaa8975..25d74394c7 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -14,6 +14,8 @@ LIBCURL_DEPENDENCIES = host-pkgconf \
 LIBCURL_LICENSE = curl
 LIBCURL_LICENSE_FILES = COPYING
 LIBCURL_INSTALL_STAGING = YES
+# We're patching configure.ac
+LIBCURL_AUTORECONF = YES
 
 # We disable NTLM support because it uses fork(), which doesn't work
 # on non-MMU platforms. Moreover, this authentication method is
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-17 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21 11:41 [Buildroot] [PATCH 1/1] libcurl: fix build with ssh2 and static mbedtls Fabrice Fontaine
2018-05-22 21:06 ` Thomas Petazzoni
2018-05-22 21:43   ` Fabrice Fontaine
2018-05-23  6:02     ` Thomas Petazzoni
2018-05-27 21:42 ` Peter Korsgaard
2018-06-17 14:57 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox