Skip to contentSkip to conversation

package/netsnmp: fix static build with openssl

PATCH New Fabrice Fontaine 2 participants 2 messages Feb 19, 2019 – Feb 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/netsnmp: fix static build with openssl

Fixes:
- http://autobuild.buildroot.org/results/8f6fdbf8a21967363b737bc771252bcded4278a9

---
 ..._IFELSE-BIO_dgram_get_peer-when-static-li.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch
package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch new file +30 -0
new file mode 100644
index 0000000000..5ec4de3f9e
@@ -0,0 +1,30 @@
+From 9df00594114f3bd9ca8eab4e6d715ceaa7110dc5 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 19 Feb 2019 11:54:29 +0100
+Subject: [PATCH] fix AC_LINK_IFELSE(BIO_dgram_get_peer) when static linking
+
+When building as a static library, AC_LINK_IFELSE(BIO_dgram_get_peer)
+fails because $LIBS (that contains -lz) is added before -lcrypto so
+invert both variables.
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ configure.d/config_os_functions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.d/config_os_functions b/configure.d/config_os_functions
+index ba39069fe..813fda644 100644
+--- a/configure.d/config_os_functions
++++ b/configure.d/config_os_functions
+@@ -337,7 +337,7 @@ if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then
+        AC_MSG_CHECKING([[for BIO_dgram_get_peer]])
+        [
+         oldLIBS="$LIBS"
+-        LIBS="$LIBS -lcrypto"
++        LIBS="-lcrypto $LIBS"
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+             [[#include <openssl/bio.h>]],
+-- 
+2.14.1
+
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/netsnmp: fix static build with openssl

Quoted 29 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/8f6fdbf8a21967363b737bc771252bcded4278a9

---
 ..._IFELSE-BIO_dgram_get_peer-when-static-li.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch
package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch new file +14 -0
new file mode 100644
index 0000000000..5ec4de3f9e
@@ -0,0 +1,30 @@
+From 9df00594114f3bd9ca8eab4e6d715ceaa7110dc5 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 19 Feb 2019 11:54:29 +0100
+Subject: [PATCH] fix AC_LINK_IFELSE(BIO_dgram_get_peer) when static linking
+
+When building as a static library, AC_LINK_IFELSE(BIO_dgram_get_peer)
+fails because $LIBS (that contains -lz) is added before -lcrypto so
+invert both variables.
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ configure.d/config_os_functions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+

package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch line 24

Quoted 10 lines
package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch new file +10 -0
+diff --git a/configure.d/config_os_functions b/configure.d/config_os_functions
+index ba39069fe..813fda644 100644
+--- a/configure.d/config_os_functions
++++ b/configure.d/config_os_functions
+@@ -337,7 +337,7 @@ if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then
+        AC_MSG_CHECKING([[for BIO_dgram_get_peer]])
+        [
+         oldLIBS="$LIBS"
+-        LIBS="$LIBS -lcrypto"
++        LIBS="-lcrypto $LIBS"

Instead of keeping on trying to fix this stuff, wouldn't it be better to use
pkg-config to get the openssl libs?

Also, upstream seems to be active, so please send patches upstream.

Regards,
Arnout

Quoted 7 lines
package/netsnmp/0005-fix-AC_LINK_IFELSE-BIO_dgram_get_peer-when-static-li.patch new file +6 -0
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+             [[#include <openssl/bio.h>]],
+-- 
+2.14.1
+