-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile fails with net-snmp-5.8 and openssl-1.1.1d #25
Comments
Did you build openssl from source or did you install a software package that was provided by your Linux distributor? In the latter case, which Linux distribution are you using? |
From source |
I will have a look but it could take a few days before I have the time to take a look. |
Did you perhaps use the official v5.8 release? Please retest with the latest version of the v5.8 branch (https://github.com/net-snmp/net-snmp/tree/V5-8-patches). This issue has been solved a while ago. |
Hi bvanassche, I had this issue too, I downloaded netsnmp5.8 from here: https://github.com/net-snmp/net-snmp/tree/V5-8-patches and compiled it with openssl-1.1.1d. However, I met some errors when I "make": snmp_openssl.c: In function 'DH_get0_pqg': Could you please have a look at it? Many thanks! |
@hanhanlee, please double check which version was downloaded. It seems like version v5.8 was downloaded instead of the latest version of the V5-8-patches branch. One way to download the latest version of that branch is by following this link: https://codeload.github.com/net-snmp/net-snmp/zip/V5-8-patches. |
@bvanassche , After re-downloading source code from your link, it works fine! |
still having the same error when download bvannassche patch |
@phuong-dut-es, please provide more information. Which version of openssl are you using and which error message is displayed? |
@bvanassche just fix it already. we cant all be dummies |
I had the same problem while building static net-snmp 5.9.1 with static openssl 1.1.1l (built manually from source). Configuration script incorrectly detects functions like DH_get0_pqg because of missing dependencies, -lpthread and -ldl in my case.
I bypassed this error by editing the configure script. There are lines |
Which libraries must be linked in addition to the ssl library depends on the configuration of OpenSSL and on the platform. Hence use pkg-config to detect these libraries if pkg-config is available. See also "compile fails with net-snmp-5.8 and openssl-1.1.1d" (#25).
Please install pkg-config if it has not yet been installed and retest with the latest version of the v5.9 branch or the master branch. See also commit 8c3a094. |
@bvanassche, thank you for the fix. Just tested with the latest v5.9 branch and everything works like a charm! |
I encountered the same issue when cross compiling Net snmp 5.9.3 on the Windows platform and adding the header file generated by openssl 3.1.0, but it was not a problem when compiling on Ubuntu. Ubuntu has already installed libssl dev, and I'm not sure if it's related to this? |
@jinchaox7260 Did I understand correctly that you are running a cross-compiler on Windows? I haven't tried this before. |
@bvanassche |
snmp_openssl.c: In function 'DH_get0_pqg':
snmp_openssl.c:31:15: error: dereferencing pointer to incomplete type 'DH' {aka 'const struct dh_st'}
31 | *p = dh->p;
| ^~
snmp_openssl.c: In function 'DH_set0_pqg':
snmp_openssl.c:57:11: error: dereferencing pointer to incomplete type 'DH' {aka 'struct dh_st'}
57 | if ((dh->p == NULL && p == NULL)
| ^~
make[1]: *** [Makefile:100: snmp_openssl.lo] Error 1
The text was updated successfully, but these errors were encountered: