From: SourceForge.net <no...@so...> - 2003-06-11 09:14:54
|
Patches item #715603, was opened at 2003-04-04 14:25 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=715603&group_id=12694 Category: None Group: None Status: Closed Resolution: Accepted Priority: 7 Submitted By: Alex Burger (alex_b) Assigned to: Wes Hardaker (hardaker) Summary: Compiling Perl modules for Windows / Win32 Initial Comment: This patch allows you to compile the Perl modules using MSVC++ on Windows NT with 5.0.8. The following files have been patched: perl\ASN\Makefile.PL perl\OID\Makefile.PL perl\SNMP\Makefile.PL perl\Agent\default_store\Makefile.PL perl\Agent\Makefile.PL perl\default_store\Makefile.PL include\net-snmp\library\system.h perl\snmp\snmp.xs perl\SNMP\README make test for OID does not pass, but it does compile. The README file has been updated for compiling using MSVC and Cygwin. cd net-snmp-5.0.8 patch -p0 < patch-win32-perl ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-06-11 02:14 Message: Logged In: NO I've compiled it under ActivePerl 5.8.0 and v1 and v2c works ok, but v3 causes crash during calling new SNMP::Session(...) with message: Free to wrong pool 1622770 not 80102 at blib\arch\..\..\blib\lib/SNMP.pm line 464. I've investigated a little problem and workaround it by commenting out in perl/SNMP.xs line 2671: free (session.contextEngineID); It removes that problem. Of course it's not good way to deal with, but maybe it'll help you track reason (for example second free on the same memory). Or the problem is within ActivePerl implementation of Perl. Maybe anyone solved it already? ---------------------------------------------------------------------- Comment By: Wes Hardaker (hardaker) Date: 2003-05-08 09:18 Message: Logged In: YES user_id=76242 Thanks for the patch! I've applied it to the main line cvs as well as the patches branch for a 5.0.9 release. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-22 07:23 Message: Logged In: YES user_id=85836 This version of the patch will allow you to run perl Makefile.PL from inside one of the sub directories such as default_store and SNMP. It will allow you to install only the modules you want instead of everything. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-16 13:58 Message: Logged In: YES user_id=85836 Uploaded patch-win32-perl4 and patch-win32-perl4.win. This fixes a minor problem that prevented the Perl modules from compiling under Unix due to a mistake in the patch. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-11 06:32 Message: Logged In: YES user_id=85836 Did you compile libsnmp, libsnmp_dll or both? I have only tested so far with libsnmp (release). Alex ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-04-10 23:11 Message: Logged In: NO I got the netsnmpmibs.lib compiled together with the rest of the library, but I still get the same error when building the default store directory. I am using activestate's perl 5.8.0 Build 802. cl -c -I..\..\include\ -I..\..\include\net-snmp\ -I..\..\win32\ - nolog o -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE - DNO_STRICT -DHAVE_DES_FCRYPT -DPE RL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD - DNDEBUG -O1 -DVERSION=\0.01\ - DXS_VERSION=\0.01\ "-IC:\Perl\lib\CORE" -DMSVC_PERL default_store.c default_store.c "Running Mkbootstrap for NetSNMP::default_store ()" C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 default_store.bs link - out:..\blib\arch\auto\NetSNMP\default_store\default_store.dll - dll -nologo -nodefaultlib -release -libpath:"C:/Perl\lib\CORE" - machine:x86 default_store.obj C:\Perl\lib\CORE\perl58.lib D:\Temp\net-snmp-5.0.8\perl\default_store\..\..\win32 \lib\libsnmp.lib "C:\Program Files\Microsoft Visual Studio\VC98\lib\oldnames.lib" "C:\Program Files\Microsoft SDK\Lib\.\kernel32.lib" "C:\Program Files\Microsoft SDK\Lib\.\user32.lib" "C:\Program Files\Microsoft SDK\Lib\.\gdi32.lib" "C:\Program Files\Microsoft SDK\Lib\.\winspool.lib" "C:\Program Files\Microsoft SDK\Lib\.\comdlg32.lib" "C:\Program Files\Microsoft SDK\Lib\.\advapi32.lib" "C:\Program Files\Microsoft SDK\Lib\.\shell32.lib" "C:\Program Files\Micros oft SDK\Lib\.\ole32.lib" "C:\Program Files\Microsoft SDK\Lib\.\oleaut32.lib" "C:\Program Files\Microsoft SDK\Lib\.\netapi32.lib" "C:\Program Files\Microsoft SDK \Lib\.\uuid.lib" "C:\Program Files\Microsoft SDK\Lib\.\wsock32.lib" "C:\Program Files\Microsoft SDK\Lib\.\mpr.lib" "C:\Program Files\Microsoft SDK\Lib\.\winmm.lib" "C:\Program Files\Microsoft SDK\Lib\.\version.lib" "C:\Program Files\Microso ft SDK\Lib\.\odbc32.lib" "C:\Program Files\Microsoft SDK\Lib\.\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\msvcrt.lib" -def:default_store.def Creating library ..\blib\arch\auto\NetSNMP\default_store\default_store.l ib and object ..\blib\arch\auto\NetSNMP\default_store\default_store. exp default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_get_void default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_set_void default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_shutdown ..\blib\arch\auto\NetSNMP\default_store\default_store.dll : fatal error LNK1120: 3 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-10 06:22 Message: Logged In: YES user_id=85836 'netsnmpmibs' is not the same library as 'libsnmp'. You probably didn't compile snmpmibs in VC++, or didn't copy the compiled .lib file to c:\temp\lib. The agent module requires that libsnmp, libagent, libhelpers and netsnmpmibs be compiled first. The other modules only look for libsnmp. Alex ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-04-10 03:27 Message: Logged In: NO I have succesfully patch net-snmp-5.0.8 and created the Makefile, but encounter error when doing nmake in MSVC : I compiled the net-snmp-5.0.8 library successfully before doing this : D:\Temp\net-snmp-5.0.8\perl>perl Makefile.PL CAPI=TRUE -NET-SNMP-PATH=D:\TEMP\ t-snmp-5.0.8 Message: ... Note (probably harmless): No library found for '- lnetsnmpmibs' ... I think this is because the name of the library was libsnmp.lib instead of libnetsnmpmibs. After I change the name of the library, the error message was gone, but when I do a nmake, I got an error : ... default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_get_void default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_set_void default_store.obj : error LNK2001: unresolved external symbol _netsnmp_ds_shutdown ..\blib\arch\auto\NetSNMP\default_store\default_store.dll : fatal error LNK1120: 3 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-09 11:16 Message: Logged In: YES user_id=85836 Thanks for adding the comment! The latest patch 'patch-win32-perl3' / 'patch-win32-perl.win' fixes the problem when using Perl 5.8.0. Alex ---------------------------------------------------------------------- Comment By: Roger Lindholm (lindhor) Date: 2003-04-09 08:41 Message: Logged In: YES user_id=63084 The new patch seems to work just fine. I have finally managed to compile the perl module using perl 5.6.1 and MSVC7! Thanks!! The only strange behaviour I got is during "nmake test", when I got a runtime error in perl.exe. Ignoring this and nmake install worked just fine. Using perl 5.8.0 I get the following error (which might be caused by something outside the patch) when running perl Makefile.PL CAPI=TRUE -NET-SNMP-IN- SOURCE=TRUE ERROR from evaluation of C:\net-snmp-5.0.8 \perl\agent/Makefile.PL: ERROR from evaluation of C:\net- snmp-5.0.8\perl\agent\default_store/Makefile.PL: Bizarre copy of ARRAY in sassign at C:/Perl/lib/Carp/Heavy.pm line 45. ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-05 07:25 Message: Logged In: YES user_id=85836 The updated patch file also patches: perl\Makefile.PL perl\Makefile.subs.pl ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=715603&group_id=12694 |