Skip to contentSkip to conversation

package/netsnmp: fix static build with openssl

PATCH New Fabrice Fontaine 3 participants 3 messages Apr 13, 2019 – Apr 24, 2019

lore
Share & tools
lore
#0 lore raw

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

Use pkg-config to find openssl dependencies such as lz or latomic

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

---
Changes v1 -> v2 (after review of Arnout Vandecappelle):
- Drop patch and use pkg-config

 package/netsnmp/netsnmp.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/netsnmp/netsnmp.mk +2 -5
index 4bd65ef17a..ed573c51e3 100644
@@ -53,15 +53,12 @@ endif
 
 # OpenSSL
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-NETSNMP_DEPENDENCIES += openssl
+NETSNMP_DEPENDENCIES += host-pkgconf openssl
 NETSNMP_CONF_OPTS += \
 	--with-openssl=$(STAGING_DIR)/usr/include/openssl \
 	--with-security-modules="tsm,usm" \
 	--with-transports="DTLSUDP,TLSTCP"
-ifeq ($(BR2_STATIC_LIBS),y)
-# openssl uses zlib, so we need to explicitly link with it when static
-NETSNMP_CONF_ENV += LIBS=-lz
-endif
+NETSNMP_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
 NETSNMP_CONF_OPTS += --with-openssl=internal
 else
Signature · 1 line
2.20.1
#1 lore raw

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

Quoted 6 lines · Fabrice Fontaine

Use pkg-config to find openssl dependencies such as lz or latomic

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

Applied to master, thanks.

Regards,
Arnout

Quoted 30 lines

---
Changes v1 -> v2 (after review of Arnout Vandecappelle):
- Drop patch and use pkg-config

 package/netsnmp/netsnmp.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/netsnmp/netsnmp.mk +2 -5
index 4bd65ef17a..ed573c51e3 100644
@@ -53,15 +53,12 @@ endif
 
 # OpenSSL
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-NETSNMP_DEPENDENCIES += openssl
+NETSNMP_DEPENDENCIES += host-pkgconf openssl
 NETSNMP_CONF_OPTS += \
 	--with-openssl=$(STAGING_DIR)/usr/include/openssl \
 	--with-security-modules="tsm,usm" \
 	--with-transports="DTLSUDP,TLSTCP"
-ifeq ($(BR2_STATIC_LIBS),y)
-# openssl uses zlib, so we need to explicitly link with it when static
-NETSNMP_CONF_ENV += LIBS=-lz
-endif
+NETSNMP_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
 NETSNMP_CONF_OPTS += --with-openssl=internal
 else
#2 lore raw

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

In reply to Fabrice Fontaine
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Use pkg-config to find openssl dependencies such as lz or latomic Fixes:
- http://autobuild.buildroot.org/results/8f6fdbf8a21967363b737bc771252bcded4278a9

---
Changes v1 -> v2 (after review of Arnout Vandecappelle):
- Drop patch and use pkg-config

Committed to 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard