|
Hi all,
I had exactly the same issue while building on RockyLinux 9 with net-snmp 5.9.1.
The issue is that usmDESPrivProtocol is declared in net-snmp library with #ifndef NETSNMP_DISABLE_DES directive. Net-snmp header on Rocky 9 defines NETSNMP_DISABLE_DES.
It can be fixed by using the same directive on lines 3299 - 3300 of devSnmp.cpp. The replacement for lines 3299-3300 (suggested by AI) is:
#ifndef NETSNMP_DISABLE_DES
v3params.securityPrivProto = snmp_duplicate_objid(usmDESPrivProtocol,USM_PRIV_PROTO_DES_LEN);
v3params.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN;
#else
printf("devSnmp ERROR: SNMPv3 privProtocol 'DES' is not supported by this net-snmp build, use AES instead\n");
#endif
I also tried to modify the header to not define NETSNMP_DISABLE_DES, but the build failed during linking. It seems that libnetsnmp.so would have to be rebuilt as well.
Best regards,
Karel
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Peter Sx via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, March 12, 2026 11:07 PM
To: Hu, Yong <yhu at bnl.gov>; Priller, John <priller at frib.msu.edu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; Michael Davidsaver <mdavidsaver at gmail.com>
Subject: Re: EPICS SNMP compile error
Hi Yong, John and Michael.
I uninstalled the net-snmp 5.9.1 and installed 5.9.4 Pre. Then I compiled the epics snmp module. It went through. Thank you all for helping!
Best
Susheng
OR I can stop by your office tomorrow if that is more convenient to you.
Thank you, Yong! Let me try using the other version today. I will see you tomorrow.
I am out of office today. I will be in tomorrow. You can stop by tomorrow so we can try 5.9.1.
Hi John, Yong and Michael,
I had a busy day in the field. Sorry for the late reply!
My version is 5.9.1. I will try to install an older version and compile it again. Thank you all for helping!
Best
Susheng
Susheng;
What version of libsnmp do you have installed?
This is what version I'm compiling against, shown with the net-snmp-config command, on this Linux version I got from uname:
$> net-snmp-config --version
5.9.4.pre2
$> uname -v
uname -v
#1 SMP PREEMPT_DYNAMIC Debian 6.12.27-1 (2025-05-06)
I tried compiling on a host with a slightly older version of debian, which also compiles okay:
>$ net-snmp-config --version
5.7.3
>$ uname -v
#1 SMP Debian 4.19.316-1 (2024-06-25)
- JP
[EXTERNAL] This email originated from outside of FRIB
Dear John and EPICS specialist,
I have the following errors while compiling the SNMP 1.1.0.5. Could you please help me out? My EPICS version is V7.0.9. Thank you!
Susheng
/usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -DdevSnmp_NETSNMP_VERSION=50901 -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -DUSE_TYPED_RSET -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I..
-I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/local/epics/base//include/compiler/gcc -I/usr/local/epics/base//include/os/Linux -I/usr/local/epics/base//include -c ../devSnmp.cpp
../devSnmp.cpp: In member function ‘void devSnmp_host::setSnmpV3Param(const char*, const char*, bool)’:
../devSnmp.cpp:3299:60: error: ‘usmDESPrivProtocol’ was not declared in this scope; did you mean ‘usmAESPrivProtocol’?
3299 | v3params.securityPrivProto = snmp_duplicate_objid(usmDESPrivProtocol,USM_PRIV_PROTO_DES_LEN);
| ^~~~~~~~~~~~~~~~~~
| usmAESPrivProtocol
make[3]: *** [/usr/local/epics/base//configure/RULES_BUILD:268: devSnmp.o] Error 1
make[3]: Leaving directory '/home/sxin/Downloads/epics-snmp-1.1.0.5/snmpApp/src/O.linux-x86_64'
make[2]: *** [/usr/local/epics/base//configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
make[2]: Leaving directory '/home/sxin/Downloads/epics-snmp-1.1.0.5/snmpApp/src'
make[1]: *** [/usr/local/epics/base//configure/RULES_DIRS:85: src.install] Error 2
make[1]: Leaving directory '/home/sxin/Downloads/epics-snmp-1.1.0.5/snmpApp'
make: *** [/usr/local/epics/base//configure/RULES_DIRS:85: snmpApp.install] Error 2
|