package/zabbix: fix shared netsnmp build
Fix the following shared build failure with netsnmp raised since the
addition of the package in commit
42382a1712
:
configure: error: "libnetsnmp.a static library was not found in /home/buildroot/autobuild/instance-0/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib"
Fixes:
- http://autobuild.buildroot.org/results/0f541e45d1fa27b3302968683bf64949131ec1c9
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
bc4cc27705
commit
532e5063f5
@ -0,0 +1,44 @@
|
||||
From 3e810c0804ec40ad6e111a9791cdb2033ecdad71 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 25 Feb 2022 23:30:19 +0100
|
||||
Subject: [PATCH] m4/netsnmp.m4: fix shared netsnmp build
|
||||
|
||||
Since commit fe391e8689c523d3c7ea6b173d25aa5dba3a6902, the build fails
|
||||
with the following error if the user provides the path of
|
||||
net-snmp-config through the --with-net-snmp option:
|
||||
|
||||
configure: error: "libnetsnmp.a static library was not found in /home/buildroot/autobuild/instance-0/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib"
|
||||
|
||||
However, the assumption that a static library will be provided by the
|
||||
system is just plain wrong so replace AC_MSG_ERROR by AC_MSG_WARN
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/0f541e45d1fa27b3302968683bf64949131ec1c9
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/zabbix/zabbix/pull/61]
|
||||
---
|
||||
m4/netsnmp.m4 | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4
|
||||
index 5e84d84303..87e21a67e6 100644
|
||||
--- a/m4/netsnmp.m4
|
||||
+++ b/m4/netsnmp.m4
|
||||
@@ -140,8 +140,11 @@ AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
|
||||
test [ "x$static_linking_support" = "xno" -o -z "$static_linking_support" ] -a -z "$_libsnmp_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
|
||||
|
||||
if test "x$static_linking_support" = "xno" -o -z "$static_linking_support"; then
|
||||
- test -f $_libsnmp_dir_lib/libnetsnmp.a || AC_MSG_ERROR(["libnetsnmp.a static library was not found in $_libsnmp_dir_lib"])
|
||||
- SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
|
||||
+ if test -f $_libsnmp_dir_lib/libnetsnmp.a; then
|
||||
+ SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
|
||||
+ else
|
||||
+ AC_MSG_WARN(["libnetsnmp.a static library was not found in $_libsnmp_dir_lib"])
|
||||
+ fi
|
||||
else
|
||||
SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s/-lnetsnmp/${static_linking_support}static -lnetsnmp ${static_linking_support}dynamic/g"`
|
||||
fi
|
||||
--
|
||||
2.34.1
|
||||
|
@ -10,6 +10,8 @@ ZABBIX_SITE = https://cdn.zabbix.com/zabbix/sources/stable/$(ZABBIX_VERSION_MAJO
|
||||
ZABBIX_LICENSE = GPL-2.0+
|
||||
ZABBIX_LICENSE_FILES = README COPYING
|
||||
ZABBIX_CPE_ID_VENDOR = zabbix
|
||||
# We're patching m4/netsnmp.m4
|
||||
ZABBIX_AUTORECONF = YES
|
||||
|
||||
ZABBIX_DEPENDENCIES = pcre
|
||||
ZABBIX_CONF_OPTS = \
|
||||
|
Loading…
Reference in New Issue
Block a user