libsmi0.2.17 - Win32 compilation problems

Hello All, I'm extremely thankful to Frank and his team for coming up with an improved version of libsmi, in which most of the memory leaks have been removed. However, while compiling the latest release of smilib (0.2.17) (which I obtained from ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/ ) on Win32 platform, I noticed the following things :
1) data.c contains #include <sys/wait.h> , which is not present in VC++6.0.The same file (line 3538-3560, caching module) contains calls like fork(), execv() , which are causing trouble during compilation on Win32. 2) parse-smi.tab.c and parse-sming.tab.c not present. 3) dump-stools.c not present. 4) References to initScli() from sumidump.c and .h files could not be resolved while linking. Unknown identifier _initScli .
Changes done in order to compile the library :
a) I resolved the first problem just by commenting the #include sys/wait.h and the code from line 3538 to 3560 in data.c b) Copied parse-smi.c to parse-smi.tab.c and parse-sming.c to parse-sming.tab.c. This worked. c) dump-stools.c from earlier version was used. d) References to initScli() were removed from smidump.c and smidump.h.
After taking these measures, I could compile the smi.lib. I used this library in place of the earlier smi.lib (version 0.2.16), for my applications. I found that the memory leaks have reduced greatly. But at the same time, the library has become a bit unstable in the sense that it now crashes for certain mib files( e.g : for a combination of following modules, I got an unhandled exception in smiFreeData() : RFC1213-MIB, Modem-MIB, SNMPv2-MIB) and also for a large number of input mib files (for which version 0.2.16 worked fine) Has anybody worked with this library on Win32 and any remedy ?
Thanks, Abhay -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

Hi!
Abhay> 1) data.c contains #include <sys/wait.h> , which is not present Abhay> in VC++6.0.The same file (line 3538-3560, caching module) Abhay> contains calls like fork(), execv() , which are causing trouble Abhay> during compilation on Win32.
It's changed in the CVS repository now.
Abhay> 2) parse-smi.tab.c and parse-sming.tab.c not present.
Fixed in the makefile and Makefile.mingw, as well.
Abhay> 3) dump-stools.c not present.
It has beene renamed to dump-scli.c, changed in the win/makefiles.
Abhay> 4) References to initScli() from sumidump.c and .h files could Abhay> not be resolved while linking. Unknown identifier _initScli .
Should be fixed by the above fix.
Abhay> After taking these measures, I could compile the smi.lib. I Abhay> used this library in place of the earlier smi.lib (version Abhay> 0.2.16), for my applications. I found that the memory leaks Abhay> have reduced greatly. But at the same time, the library has Abhay> become a bit unstable in the sense that it now crashes for Abhay> certain mib files( e.g : for a combination of following Abhay> modules, I got an unhandled exception in smiFreeData() : Abhay> RFC1213-MIB, Modem-MIB, SNMPv2-MIB) and also for a large number Abhay> of input mib files (for which version 0.2.16 worked fine) Has Abhay> anybody worked with this library on Win32 and any remedy ?
Hm. Even if I put *all* MIBs from the mibs/ietf directory to smilint, it doesn't crash. Could you please provide a precise description of a smilint or smidump command line, environment settings, configuration file, ... so that I can try to reproduce the problem?
Anyway, Abhay, thanks for your feedback. The above mentioned fixes are available from the anonymous CVS repository.
-frank -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

Hi Abhay,
You can use win/GNUmakefile + gmake to build msvc w32 libsmi. It is less sensitive to changes in file names.
Frank fixed all the other problems you listed below including win/makefile.
Deshmukh, Abhay AbhayAnil.Deshmukh@barconet.com wrote:
Hello All,
I'm extremely thankful to Frank and his team for coming up with an improved version of libsmi, in which most of the memory leaks have been removed. However, while compiling the latest release of smilib (0.2.17) (which I obtained from ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/ ) on Win32 platform, I noticed the following things :
- data.c contains #include <sys/wait.h> , which is not present in
VC++6.0.The same file (line 3538-3560, caching module) contains calls like fork(), execv() , which are causing trouble during compilation on Win32. 2) parse-smi.tab.c and parse-sming.tab.c not present. 3) dump-stools.c not present. 4) References to initScli() from sumidump.c and .h files could not be resolved while linking. Unknown identifier _initScli .
Changes done in order to compile the library :
a) I resolved the first problem just by commenting the #include sys/wait.h and the code from line 3538 to 3560 in data.c b) Copied parse-smi.c to parse-smi.tab.c and parse-sming.c to parse-sming.tab.c. This worked. c) dump-stools.c from earlier version was used. d) References to initScli() were removed from smidump.c and smidump.h.
After taking these measures, I could compile the smi.lib. I used this library in place of the earlier smi.lib (version 0.2.16), for my applications. I found that the memory leaks have reduced greatly. But at the same time, the library has become a bit unstable in the sense that it now crashes for certain mib files( e.g : for a combination of following modules, I got an unhandled exception in smiFreeData() : RFC1213-MIB, Modem-MIB, SNMPv2-MIB) and also for a large number of input mib files (for which version 0.2.16 worked fine) Has anybody worked with this library on Win32 and any remedy ?
Thanks, Abhay -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.
participants (3)
-
Deshmukh, Abhay
-
Frank Strauss
-
Yigal Hochberg