[patch] to fix MS build with nmake and gmake

Hi,
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
Too there was a problem with 'make checkdist' on unix (MAC-OX)
//regards
Claus
Changelog: Missing files in libsmi-0.4.8.tar.gz:
dump-svg-script.h config.nmake smi.def Note
that some files needs to be patched (CK)
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include DEFINES = $(DEBUG) -D_CRT_SECURE_NO_DEPRECATE=1 -DYY_NO_UNISTD_H GNUmakefile and Makefile:
substitude 'rm -f' with '$(RM)' to fix nmake clean config INSTROOT = c:\usr config MIBDIR = $(INSTROOT)\share\smi\mibs ignore errors with MKDIR! install smi.h to $(INCDIR) config.h.in change default config path prefix to c:\usr\etc\smi
win.h add missing functions:
#define isatty _isatty #define fileno _fileno ../lib/smi.h.in rename c++ reserved parameter class to classname:
extern SmiClass *smiGetClass(SmiModule *smiModulePtr,char *classname); ../lib/util.c:
#include win.h ../tools/Makefile.am comment out the line with 'MOSTLYCLEANFILES = dump-svg-script.h'

On Sat, Dec 26, 2009 at 12:10:53PM +0100, Claus Klein wrote:
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
I have tried to incorporate the changes as far as I understood them. The change of the installation target from c:\smi to a more Unix style c:\usr installation setup I think first needs agreement by the Windows users on this list. So any comments on the suggested change below?
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include
I also might have missed something else; please check and send me a unified context diff.
/js

On Mon, Dec 28, 2009 at 8:56 PM, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Sat, Dec 26, 2009 at 12:10:53PM +0100, Claus Klein wrote:
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
I have tried to incorporate the changes as far as I understood them. The change of the installation target from c:\smi to a more Unix style c:\usr installation setup I think first needs agreement by the Windows users on this list. So any comments on the suggested change below?
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include
I also might have missed something else; please check and send me a unified context diff.
Somewhat related to this: I have a CMake build system for libsmi, which works on Linux and Windows. It should work on other platforms, too, but I have not tried.
Instead of maintaining two build systems (one for Unix, one for Windows), only one (the CMake one) would have to be maintained. See http://www.elpauer.org/stuff/learning_cmake.pdf if you don't know CMake (slide 10 shows the workflow with CMake).
It's a bit outdated (I developed it in late-July) but I could update it if you are interested in replacing autotools + NMake with CMake.

On Mon, Dec 28, 2009 at 10:04:24PM +0100, Pau Garcia i Quiles wrote:
Somewhat related to this: I have a CMake build system for libsmi, which works on Linux and Windows. It should work on other platforms, too, but I have not tried.
Instead of maintaining two build systems (one for Unix, one for Windows), only one (the CMake one) would have to be maintained. See http://www.elpauer.org/stuff/learning_cmake.pdf if you don't know CMake (slide 10 shows the workflow with CMake).
It's a bit outdated (I developed it in late-July) but I could update it if you are interested in replacing autotools + NMake with CMake.
I have no cmake experience but I am open to better built systems as long as I do not have to spend much time on a transition. So what would I think is needed is a proof of concept that we can look at and run on various platforms and then we can take an informed decision to move to a new built system, replacing automake and friends.
/js

On Tue, Dec 29, 2009 at 11:29 AM, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Mon, Dec 28, 2009 at 10:04:24PM +0100, Pau Garcia i Quiles wrote:
Somewhat related to this: I have a CMake build system for libsmi, which works on Linux and Windows. It should work on other platforms, too, but I have not tried.
Instead of maintaining two build systems (one for Unix, one for Windows), only one (the CMake one) would have to be maintained. See http://www.elpauer.org/stuff/learning_cmake.pdf if you don't know CMake (slide 10 shows the workflow with CMake).
It's a bit outdated (I developed it in late-July) but I could update it if you are interested in replacing autotools + NMake with CMake.
I have no cmake experience but I am open to better built systems as long as I do not have to spend much time on a transition. So what would I think is needed is a proof of concept that we can look at and run on various platforms and then we can take an informed decision to move to a new built system, replacing automake and friends.
See my answer to Claus. If you like what you see, tell me and I can bring the CMake stuff up to date.
PS: the tarball available from my website still contains the autotools build system but it's of course not required at all

Hi,
I would be interested to use CMake. I have bin started with CMake a view years ago and we use it for our project to. If you send me the CMakeLists.txt files, I will check it on MAC, cygwin and MSVC the next week.
If WIN32 is a Target too, in my experience, CMAKE are better than GNU autotools.
PS: I used the c:\usr prefix because the net-snmp WIN32 binary distribution use this prefix too.
//claus
On 28.12.2009, at 22:04, Pau Garcia i Quiles wrote:
On Mon, Dec 28, 2009 at 8:56 PM, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Sat, Dec 26, 2009 at 12:10:53PM +0100, Claus Klein wrote:
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
I have tried to incorporate the changes as far as I understood them. The change of the installation target from c:\smi to a more Unix style c:\usr installation setup I think first needs agreement by the Windows users on this list. So any comments on the suggested change below?
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include
I also might have missed something else; please check and send me a unified context diff.
Somewhat related to this: I have a CMake build system for libsmi, which works on Linux and Windows. It should work on other platforms, too, but I have not tried.
Instead of maintaining two build systems (one for Unix, one for Windows), only one (the CMake one) would have to be maintained. See http://www.elpauer.org/stuff/learning_cmake.pdf if you don't know CMake (slide 10 shows the workflow with CMake).
It's a bit outdated (I developed it in late-July) but I could update it if you are interested in replacing autotools + NMake with CMake.
-- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)

Hello,
I've uploaded the full tarball of libsmi late july 2009 + CMake build system to my website. It's not just one CMakeLists.txt but a few CMakeLists.txt and a few parametrized .cmake files, similar to the .in files for autotools. The "TODOs" at the top of the main CMakeLists.txt are probably outdated.
To build it:
1. Download and install CMake form http://www.cmake.org or your favorite distribution 2. Download $ wget http://elpauer.org/tmp/libsmi-latejuly09-cmake.tar.bz2 3. Untar $ tar xf libsmi-latejuly09-cmake.tar.bz2 4. Create build directory for out-of-source build $ mkdir build $ cd build 5. Configure $ cmake ../libsmi-latejuly09-cmake 6. Build $ make
You can change options using "ccmake ." (on Unix-based systems) or "cmake-gui ." (on Unix-based systems and Windows). I implemented the very same options that were available at the time with autotools:
OPTION( BACKEND_SMI "SMIv1/v2 parser support" ON ) OPTION( BACKEND_SMING "SMIng parser support" OFF ) SET( MIBDIR "${CMAKE_INSTALL_PREFIX}/share/mibs" CACHE PATH "Where to install libsmi MIB modules [MIBDIR/mibs]" ) SET( PIBDIR "${CMAKE_INSTALL_PREFIX}/share/pibs" CACHE PATH "Where to install libsmi PIB modules [PIBDIR/pibs]" ) SET( DEFAULT_ERRORLEVEL 3 CACHE STRING "Default error level at libsmi initialization" ) SET( DEFAULT_GLOBALCONFIG "${CMAKE_INSTALL_PREFIX}/smi.conf" CACHE STRING "Full pathname of the global configuration file" ) SET( DEFAULT_SMIPATH "${MIBDIR}/ietf;${MIBDIR}/iana;${MIBDIR}/irtf;${MIBDIR}/site:${MIBDIR}/tubs:${PIBDIR}/ietf:${PIBDIR}/site:${PIBDIR}/tubs" CACHE STRING "Default search path to lookup SMI module files" ) SET( DEFAULT_USERCONFIG ".smirc" CACHE STRING "Basename of the per-user configuration file searched in $HOME" ) IF( WIN32 ) SET( _PATH_SEPARATOR ";" ) ELSE( WIN32 ) SET( _PATH_SEPARATOR ":" ) ENDIF( WIN32 ) SET( PATH_SEPARATOR "${_PATH_SEPARATOR}" CACHE STRING "Default path separator character" )
SET( MAX_LEX_DEPTH 30 CACHE STRING "Maximum module import recursion depth" )
Of course you can also set the value for an option directly on CMake invocation:
$ cmake -DBACKEND_SMI:BOOL=OFF -DBACKEND_SMING:BOOL=ON -DDEFAULT_ERRORLEVEL=2 -DMAX_LEX_DEPTH=20 ../libsmi-latejuly09-cmake
etc
On Tue, Dec 29, 2009 at 11:42 AM, Claus Klein claus.klein@arcormail.de wrote:
Hi,
I would be interested to use CMake. I have bin started with CMake a view years ago and we use it for our project to. If you send me the CMakeLists.txt files, I will check it on MAC, cygwin and MSVC the next week.
If WIN32 is a Target too, in my experience, CMAKE are better than GNU autotools.
PS: I used the c:\usr prefix because the net-snmp WIN32 binary distribution use this prefix too.
//claus
On 28.12.2009, at 22:04, Pau Garcia i Quiles wrote:
On Mon, Dec 28, 2009 at 8:56 PM, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Sat, Dec 26, 2009 at 12:10:53PM +0100, Claus Klein wrote:
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
I have tried to incorporate the changes as far as I understood them. The change of the installation target from c:\smi to a more Unix style c:\usr installation setup I think first needs agreement by the Windows users on this list. So any comments on the suggested change below?
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include
I also might have missed something else; please check and send me a unified context diff.
Somewhat related to this: I have a CMake build system for libsmi, which works on Linux and Windows. It should work on other platforms, too, but I have not tried.
Instead of maintaining two build systems (one for Unix, one for Windows), only one (the CMake one) would have to be maintained. See http://www.elpauer.org/stuff/learning_cmake.pdf if you don't know CMake (slide 10 shows the workflow with CMake).
It's a bit outdated (I developed it in late-July) but I could update it if you are interested in replacing autotools + NMake with CMake.
-- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.

On Wed, Dec 30, 2009 at 01:20:46AM +0100, Pau Garcia i Quiles wrote:
I've uploaded the full tarball of libsmi late july 2009 + CMake build system to my website. It's not just one CMakeLists.txt but a few CMakeLists.txt and a few parametrized .cmake files, similar to the .in files for autotools. The "TODOs" at the top of the main CMakeLists.txt are probably outdated.
Thanks for sharing this. Would be cool if people can take a look at this.
To build it:
- Download and install CMake form http://www.cmake.org or your
favorite distribution 2. Download $ wget http://elpauer.org/tmp/libsmi-latejuly09-cmake.tar.bz2 3. Untar $ tar xf libsmi-latejuly09-cmake.tar.bz2 4. Create build directory for out-of-source build $ mkdir build $ cd build 5. Configure $ cmake ../libsmi-latejuly09-cmake
I think this is just 'cmake ..', right?
- Build $ make
You can change options using "ccmake ." (on Unix-based systems) or "cmake-gui ." (on Unix-based systems and Windows). I implemented the very same options that were available at the time with autotools:
[...]
By default, it seems to built static libraries and link the programs against it. Is there something similar to autotools --enable-shared? There is a definition for "smi" in the CMakeLists but the rules for the binaries depend on "smi_static". Is there an easy way to change this?
A perhaps more difficult question: Can I get cmake to generate a Makefile for cross compiling using mingw? There seems to be a ""MinGW Makefiles" generator but only for Windows.
/js

On 31.12.2009, at 07:24, Juergen Schoenwaelder wrote:
On Wed, Dec 30, 2009 at 01:20:46AM +0100, Pau Garcia i Quiles wrote:
I've uploaded the full tarball of libsmi late july 2009 + CMake build system to my website. It's not just one CMakeLists.txt but a few CMakeLists.txt and a few parametrized .cmake files, similar to the .in files for autotools. The "TODOs" at the top of the main CMakeLists.txt are probably outdated.
Thanks for sharing this. Would be cool if people can take a look at this.
To build it:
- Download and install CMake form http://www.cmake.org or your
favorite distribution 2. Download $ wget http://elpauer.org/tmp/libsmi-latejuly09-cmake.tar.bz2 3. Untar $ tar xf libsmi-latejuly09-cmake.tar.bz2 4. Create build directory for out-of-source build $ mkdir build $ cd build 5. Configure $ cmake ../libsmi-latejuly09-cmake
I think this is just 'cmake ..', right?
- Build
$ make
You can change options using "ccmake ." (on Unix-based systems) or "cmake-gui ." (on Unix-based systems and Windows). I implemented the very same options that were available at the time with autotools:
[...]
By default, it seems to built static libraries and link the programs against it. Is there something similar to autotools --enable-shared? There is a definition for "smi" in the CMakeLists but the rules for the binaries depend on "smi_static". Is there an easy way to change this?
That my be useful at the toplevel (PROJECT) CMakeLists.txt file: # setup the build configuration option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(CMAKE_USE_RELATIVE_PATHS "Use relative paths in makefiles" ON) if (MSVC) set(CMAKE_INSTALL_PREFIX "C:/usr" CACHE STRING "Install path prefix" FORCE) endif (MSVC) set(CMAKE_VERBOSE_MAKEFILE ON CACHE INTERNAL "Setup makefile to verbose" FORCE) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) endif(NOT CMAKE_BUILD_TYPE)
A perhaps more difficult question: Can I get cmake to generate a Makefile for cross compiling using mingw? There seems to be a ""MinGW Makefiles" generator but only for Windows.
this page may help: http://www.cmake.org/Wiki/CMake_Cross_Compiling
I think you should try to define your MinGW cross compiler (perhaps with path) and generate 'Unix Makefiles' if you are working under Unix: mkdir crossbuild && cd crossbuild cmake -DCMAKE_C_COMPILER=MinGW-gcc -DCMAKE_CXX_COMPILER=MinGW-c++ .. but I have never used MinGW :-(( //regards Claus

Hello Pau,
thanks for the good work!
I have downloaded your tar file and tested on my MAC today. Than I changed some points to get it work with current svn sources and dit a little cleanup. I hope you agree ;-))
I did not understand why you are working with static and dynamic libs both? And what do you mean with "make download"? The MIBS should be installed too, but not today by my.
I send you my cmake files only, so you can test if you want. (without PDF file) ck
The current state is good, but no complete.
claus-kleins-macbook-pro:trunk clausklein$ head -20 CMakeLists.txt PROJECT( LIBSMI )
# TODO if bison, flex, diff/gdiff, awk found, generate .c/.h from .y/.l (see configure.in) # TODO CMake-ify "test" directory # TODO "make download" to download MIBs (and PIBs ? ) # TODO Paths in the man pages *.3.cmake - "${CMAKE_PREFIX_PATH}/ include" is not what should go there # TODO Install manpages (partly done) ck # TODO Test on Linux # TODO: lib/CMakeLists.txt generate dump-svg-script.h from dump-svg- script.js if SED_BINARY is found # changelog # Done Generate the .pc file for pkg-config and install it; ck # Done Create FindLibSmi.cmake finder, like the libsmi.m4 for autotools; ck # Done Test on MAC OS X; ck # and install smi.conf-example libsmi.m4 too
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET( LIBSMI_MAJOR 0 ) SET( LIBSMI_MINOR 4 ) SET( LIBSMI_PATCHLEVEL 8 ) claus-kleins-macbook-pro:trunk clausklein$
have a look at the log files to see all details.
//regards
Claus --------------------------------------------------------------
claus-kleins-macbook-pro:trunk clausklein$ tail -75 make-install.log [ 94%] Built target smiquery Scanning dependencies of target smixlate [ 96%] Building C object tools/CMakeFiles/smixlate.dir/smixlate.c.o [ 98%] Building C object tools/CMakeFiles/smixlate.dir/dstring.c.o [100%] Building C object tools/CMakeFiles/smixlate.dir/shhopt.c.o Linking C executable smixlate [100%] Built target smixlate Install the project... -- Install configuration: "Release" -- Installing: /tmp/cmake/usr/local/lib/pkgconfig/libsmi.pc -- Installing: /tmp/cmake/opt/local/share/cmake-2.8/Modules/ FindLibSmi.cmake -- Installing: /tmp/cmake/usr/local/etc/smi/smi.conf-example -- Installing: /tmp/cmake/usr/local/share/aclocal/libsmi.m4 -- Installing: /tmp/cmake/usr/local/lib/libsmi.dylib -- Installing: /tmp/cmake/usr/local/include/smi.h -- Installing: /tmp/cmake/usr/local/share/man/man3/lib -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/CMakeFiles -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/CMakeFiles/ smi.dir -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/libsmi.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_attribute.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_class.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_config.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_event.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_identity.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_macro.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_module.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_node.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_render.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_type.3 -- Installing: /tmp/cmake/usr/local/share/man/man3/lib/smi_util.3 -- Installing: /tmp/cmake/usr/local/bin/smiquery -- Installing: /tmp/cmake/usr/local/bin/smilint -- Installing: /tmp/cmake/usr/local/bin/smidump -- Installing: /tmp/cmake/usr/local/bin/smidiff -- Installing: /tmp/cmake/usr/local/bin/smixlate Scanning dependencies of target uninstall -- Uninstalling "/tmp/cmake/usr/local/lib/pkgconfig/libsmi.pc" -- Uninstalling "/tmp/cmake/opt/local/share/cmake-2.8/Modules/ FindLibSmi.cmake" -- Uninstalling "/tmp/cmake/usr/local/etc/smi/smi.conf-example" -- Uninstalling "/tmp/cmake/usr/local/share/aclocal/libsmi.m4" -- Uninstalling "/tmp/cmake/usr/local/lib/libsmi.dylib" -- Uninstalling "/tmp/cmake/usr/local/include/smi.h" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/libsmi.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_attribute. 3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_class.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_config.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_event.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_identity.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_macro.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_module.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_node.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_render.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_type.3" -- Uninstalling "/tmp/cmake/usr/local/share/man/man3/lib/smi_util.3" -- Uninstalling "/tmp/cmake/usr/local/bin/smiquery" -- Uninstalling "/tmp/cmake/usr/local/bin/smilint" -- Uninstalling "/tmp/cmake/usr/local/bin/smidump" -- Uninstalling "/tmp/cmake/usr/local/bin/smidiff" -- Uninstalling "/tmp/cmake/usr/local/bin/smixlate" Built target uninstall prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include
Name: libsmi Description: SMI parser library Requires: Version: .. Libs: -L${libdir} -lsmi Cflags: -I${includedir}
ProductName: Mac OS X ProductVersion: 10.5.8 BuildVersion: 9L30 claus-kleins-macbook-pro:trunk clausklein$
On 30.12.2009, at 01:20, Pau Garcia i Quiles wrote:
Hello,
I've uploaded the full tarball of libsmi late july 2009 + CMake build system to my website. It's not just one CMakeLists.txt but a few CMakeLists.txt and a few parametrized .cmake files, similar to the .in files for autotools. The "TODOs" at the top of the main CMakeLists.txt are probably outdated.
To build it:
- Download and install CMake form http://www.cmake.org or your
favorite distribution 2. Download $ wget http://elpauer.org/tmp/libsmi-latejuly09-cmake.tar.bz2 3. Untar $ tar xf libsmi-latejuly09-cmake.tar.bz2 4. Create build directory for out-of-source build $ mkdir build $ cd build 5. Configure $ cmake ../libsmi-latejuly09-cmake 6. Build $ make

Hi Pau,
today I tested it with cygwin and MSVC studio 2005. cygwin works fine. MS needs little more love, but now it works too. (There are a lot of warnings)
We should use 'gcc -Wall -Wlong-long -pedantic -std=c99' to be save. Is someone able to check and fix it on svn trunk?
I will fist add the MIB installation. This weekend, I send you my final version.
What is about the man pages and docs, what is to be done? Can you do this?
It may be good to give me a feedback if I am on the right way?
1>------ Build started: Project: INSTALL, Configuration: Debug Win32 ------ 1> 1>Performing Post-Build Event... 1>-- Install configuration: "Debug" 1>-- Installing: C:/Programme/CMake 2.8/share/cmake-2.8/Modules/ FindLibSmi.cmake 1>-- Up-to-date: C:/usr/etc/smi/smi.conf-example 1>-- Installing: C:/usr/lib/smid.lib 1>-- Installing: C:/usr/bin/smid.dll 1>-- Installing: C:/usr/include/smi.h 1>-- Installing: C:/usr/bin/smiqueryd.exe 1>-- Installing: C:/usr/bin/smilintd.exe 1>-- Installing: C:/usr/bin/smidumpd.exe 1>-- Installing: C:/usr/bin/smidiffd.exe 1>-- Installing: C:/usr/bin/smixlated.exe 1>Build log was saved at "file://o:\DATEN\workspace\libsmi-0.4.8\build \INSTALL.dir\Debug\BuildLog.htm" 1>INSTALL - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 8 up-to-date, 0 skipped ==========
Claus
On 06.01.2010, at 21:29, Claus Klein wrote:
Hello Pau,
thanks for the good work!
I have downloaded your tar file and tested on my MAC today. Than I changed some points to get it work with current svn sources and dit a little cleanup. I hope you agree ;-))
I did not understand why you are working with static and dynamic libs both? And what do you mean with "make download"? The MIBS should be installed too, but not today by my.
I send you my cmake files only, so you can test if you want. (without PDF file) ck
The current state is good, but no complete.

Hi all
tody I have finished my actions about cmake.
Now, the flex, bison, and sed generated files will be generated at the source dir. They must be available in SVN to have a default if the buildhost does not support this programs.
The Mib's Pib's will be installed too, TBD if the *.orig should installed?
This is the default install tree on UNIX: `-- usr |-- bin |-- etc | `-- smi |-- include |-- lib | `-- pkgconfig `-- share |-- aclocal |-- cmake | `-- Modules |-- man | `-- man3 |-- mibs | |-- iana | |-- ietf | |-- irtf | |-- site | `-- tubs `-- pibs |-- ietf |-- site `-- tubs
The following variables are visible in CMakeCache.txt and can be changed if needed: BACKEND_SMI:BOOL=ON BACKEND_SMING:BOOL=ON BUILD_SHARED_LIBS:BOOL=ON CMAKE_BUILD_TYPE:STRING=Release CMAKE_INSTALL_PREFIX:PATH=/usr DEFAULT_ERRORLEVEL:STRING=3 DEFAULT_USERCONFIG:STRING=.smirc DIFF_EXECUTABLE:FILEPATH=/usr/bin/diff DIR_SEPARATOR:STRING=/ LIBSMI_SYSTEMCONFIG:STRING=etc/smi LIBSMI_SYSTEM_MIBDIR:STRING=share MAX_LEX_DEPTH:STRING=30 PATH_SEPARATOR:STRING=:
# on my build host: ProductName: Mac OS X ProductVersion: 10.5.8 BuildVersion: 9L30
The following are some of the valid targets for generated Makefile: ... all (the default if no target is provided) ... clean ... depend ... edit_cache ... generated ... install ... install/local ... install/strip ... list_install_components ... rebuild_cache ... uninstall ... backend_smi_bison ... backend_smi_flex ... backend_sming_bison ... backend_sming_flex ... smi ... generate_dump_svg_script_h ... smidiff ... smidump ... smilint ... smiquery ... smixlate
to build on my MAC with minGW cross tools I do: cd build && cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc - DCMAKE_CXX_COMPILER=i386-mingw32-g++ \ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_INSTALL_PREFIX=C:/usr .. && make install
Attention: If a windows drive letter is given, the files are installed under build/C:/usr create a zip archive from usr (without C:/) and it works on Windows XP, nice ;-)
Test and distribution are open issues! I have to prevent that .svn files are installed with mibs, sorry, my fault! The handling with bison and flex should use the cmake macros! That would be clear and more portable.
The files are tested with last release (with a view lines commented out) and current trunk Revision 22530.
There are a view files you may have a lock at: CMakeFiles.sh CMakeLists.txt Darwin-install.log crosscompile.log
They show all the details what I have done.
//regards
Claus Klein
On 07.01.2010, at 22:48, Claus Klein wrote:
Hi Pau,
today I tested it with cygwin and MSVC studio 2005. cygwin works fine. MS needs little more love, but now it works too. (There are a lot of warnings)
We should use 'gcc -Wall -Wlong-long -pedantic -std=c99' to be save. Is someone able to check and fix it on svn trunk?
I will fist add the MIB installation. This weekend, I send you my final version.
What is about the man pages and docs, what is to be done? Can you do this?
It may be good to give me a feedback if I am on the right way?
1>------ Build started: Project: INSTALL, Configuration: Debug Win32
1> 1>Performing Post-Build Event... 1>-- Install configuration: "Debug" 1>-- Installing: C:/Programme/CMake 2.8/share/cmake-2.8/Modules/ FindLibSmi.cmake 1>-- Up-to-date: C:/usr/etc/smi/smi.conf-example 1>-- Installing: C:/usr/lib/smid.lib 1>-- Installing: C:/usr/bin/smid.dll 1>-- Installing: C:/usr/include/smi.h 1>-- Installing: C:/usr/bin/smiqueryd.exe 1>-- Installing: C:/usr/bin/smilintd.exe 1>-- Installing: C:/usr/bin/smidumpd.exe 1>-- Installing: C:/usr/bin/smidiffd.exe 1>-- Installing: C:/usr/bin/smixlated.exe 1>Build log was saved at "file://o:\DATEN\workspace \libsmi-0.4.8\build\INSTALL.dir\Debug\BuildLog.htm" 1>INSTALL - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 8 up-to-date, 0 skipped ==========
Claus
On 06.01.2010, at 21:29, Claus Klein wrote:
Hello Pau,
thanks for the good work!
I have downloaded your tar file and tested on my MAC today. Than I changed some points to get it work with current svn sources and dit a little cleanup. I hope you agree ;-))
I did not understand why you are working with static and dynamic libs both? And what do you mean with "make download"? The MIBS should be installed too, but not today by my.
I send you my cmake files only, so you can test if you want. (without PDF file) ck
The current state is good, but no complete.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to <libsmi-request@ibr.cs.tu-bs.de
!! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.

It may be good to give me a feedback if I am on the right way?
Sorry for the lack of response. I've been rather busy lately and this requires more than than a quick 3-lines answer. I'll try to review and answer all your e-mails this week (if we are lucky, tomorrow). Thank you for your effort.

Hi,
what are you missing too? I used the c:\usr prefix because the net-snmp WIN32 binary distribution use this prefix too.
It is not clear to me what I should do. Do you want a diff without the INSTROOT changes?
//regards claus
On 28.12.2009, at 20:56, Juergen Schoenwaelder wrote:
On Sat, Dec 26, 2009 at 12:10:53PM +0100, Claus Klein wrote:
I had to build libsmi with MSVC 2005 and had some little problems to build it from last released distribution.
I have tried to incorporate the changes as far as I understood them. The change of the installation target from c:\smi to a more Unix style c:\usr installation setup I think first needs agreement by the Windows users on this list. So any comments on the suggested change below?
config.nmake change default install path and add missing install dir:
MIBROOT = c:/usr/share/smi/mibs PIBROOT = c:/usr/share/smi/pibs INSTROOT = c:\usr INCDIR = $(INSTROOT)\include
I also might have missed something else; please check and send me a unified context diff.
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/

On Tue, Dec 29, 2009 at 11:47:27AM +0100, Claus Klein wrote:
It is not clear to me what I should do. Do you want a diff without the INSTROOT changes?
Please check what is now in the repository and if things are missing send me a unified context diff.
/js

OK, done
here is my diff.
Still there is a Problem with:
$> make ckeck and with the same reason, $> make distcheck fails too.
//ck
On 29.12.2009, at 12:02, Juergen Schoenwaelder wrote:
On Tue, Dec 29, 2009 at 11:47:27AM +0100, Claus Klein wrote:
It is not clear to me what I should do. Do you want a diff without the INSTROOT changes?
Please check what is now in the repository and if things are missing send me a unified context diff.
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/

On Wed, Dec 30, 2009 at 12:51:37AM +0100, Claus Klein wrote:
here is my diff.
Thanks, I have committed the changes.
Still there is a Problem with:
$> make ckeck and with the same reason, $> make distcheck fails too.
I have not looked into this yet.
/js
participants (3)
-
Claus Klein
-
Juergen Schoenwaelder
-
Pau Garcia i Quiles