Re: Need help building net-snmp perl modules on Windows

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 7/20/19 2:34 AM, Joon du Randt wrote:
> I am trying to use net-snmp on Windows 10 with Perl. I tried
> downloading the binaries listed on the website, but couldn't make them
> work with my version of ActivePerl - the binaries I found need
> ActivePerl 5.10 and I am on Active Perl 5.26. When I tried to change
> the PPD file and install them anyway, I got the following error:
> C:\usr\bin>perl net-snmp-perl-test.pl
> Can't load 'C:/Perl64/site/lib/auto/NetSNMP/default_store/default_store.dll'
> for module NetSNMP::default_store: load_file:The specified module
> could not be found at C:/Perl64/lib/DynaLoader.pm line 194.
> 
> I am assuming that this is some type of runtime dependency error, so then I
> thought I should build net-snmp from source to ensure I have the right
> dependencies.  I found this link that helped me build the software:
> https://serverfault.com/a/722353/118496, and I was able to build
> OpenSSL 0.9.8zh and then build net-snmp against it.
> 
> Then I tried building the perl modules by running this command:
> C:\Net-snmp>win32\nmakeperl.bat
> Remember to run this script from the base of the source directory.
> Net-SNMP base directory: C:\Net-snmp
> Net-SNMP base directory: C:\Net-snmp
> The Net-SNMP library (netsnmp.lib) could not be found.
> Please enter the directory where it is located:
> 
> It keeps on asking me over and over for various dependencies, and the
> end result after I've typed in the dependencies over and over is that
> the eventual build fails with this error:
> Make the Perl SNMP modules.
> to undefined at C:/Perl64/lib/ExtUtils/Install.pm line 141.
> NMAKE : fatal error U1077: 'C:\Perl64\bin\perl.exe' : return code '0xff'
> Stop.
> If errors are seen stop here and review perl\nmake.out.
> Press any key to continue . . .
> 
> I am using the following versions:
> - Windows 10
> - ActiveState Perl, 5.26
> - Visual Studio 2017 Community Edition
> 
> My question:
> - What is the easiest way to make the Net-SNMP perl module run on Windows 10?

Building and using the Net-SNMP Perl modules is only possible if 
Net-SNMP and the Perl interpreter have been built with the same 
compiler. Several years ago ActivePerl distributed Perl binaries built 
with Microsoft Visual C. The binaries distributed today by ActivePerl 
have been built with gcc. Unless there is another source from which a 
Perl interpreter built with Visual C can be obtained, this rules out 
building Net-SNMP with Visual C and with Perl support enabled.

I have tried to build Net-SNMP + Perl support with the other supported 
Windows build environments (MinGW32, MinGW64, MSYS 2.0, Cygwin 32-bit, 
Cygwin 64-bit) but so far without success.

Bart.


_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.