Burton, You mean the patch for Makefile.mingw, no I don't think so, may be update the Build-MinGW.txt I attached with more detailed info in it, look at it, may be you want to skip item 6 ( about the UnxUtils).
Did you apply the patch from JDR I added last time ?,ntop is still running fine in service mode. Jac -----Original Message----- From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]] Sent: Monday, June 17, 2002 10:22 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Ntop-dev] RE: MinGw Makefiles You know, I don't have a clue. My MinGW icon runs this: %SystemRoot%\system32\cmd.exe /K "d:\MinGW\bin\startup.bat" where d:\MinGW\bin\startup.bat is @echo off prompt $cMinGW$f $p$g path d:\MinGW\bin;%path% e: cd \data Fits with your discovery. And yet all pretty inocuous, right? I do have a random thought... If cmd.exe can't find something it's trying to execute via the path (without the trailing slash the concatenation doesn't work, e.g. concatenating c:\MinGW\bin + cmd.exe gives c:\MinGW\bincmd.exe which doesn't exist)?? Maybe there is a zsh (or subset) buried in MinGW or one of the tools. Anyway, glad that it's fixed it... Now, should I commit the patch anyway since it might protect others? -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jac Engel Sent: Monday, June 17, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: RE: [Ntop-dev] RE: MinGw Makefiles Burton, It was very suprising to me that you do not have the quote problems. Why me... So I did some investigation and found the problem by accident. I open a command box (cmd.exe) and to be sure the PATH is ONLY pointing to MINGW I executed in the command box: set PATH=C:\Mingw\bin\ I did a make of ntop (with my Makefile.mingw with the quotes) and the make failed due to the quotes...chips !! Then I removed all the quotes and could make ntop. I looked in the PATH variable of Windows and saw that I had entered there C:\Mingw\bin In command box I did : set PATH=c:\Mingw\bin and the make ntop (with makefile WITHOUT quotes ) failed : the ZSH errors came up. So after changing the PATH variable from C:\Mingw\bin to C:\Mingw\bin\ this fixed the problem and I can use now the Makefile.mingw WITHOUT quotes !!! I don't understand why the \ at the end is so important, the error is reproducable . As you know I use the latest single-file distribution MinGW-1.1.tar.gz !! So I installed the Mingw repository exactly with all packages you are using , the make of ntop always succeeds whether the PATH variable is with or without the last backslash ! I checked the make versions which are exactly the same. <grin>................. Jac -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Burton M. Strauss III Sent: Sunday, June 16, 2002 4:23 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Ntop-dev] RE: MinGw Makefiles Importance: High Jac: Actually, try this version, which does the buildDate piece too: version.c: @rm -f $@ [email protected] [email protected] # Create a file with the pieces and parts of the buildDate line # use ! vs double quotes because some echo's handle the quotes oddly # Remember each piece will end w/ CR LF, which we have to strip out! @echo.'char *buildDate = !' >> [email protected] @date /t >> [email protected] @echo.'at' >> [email protected] @time /t >> [email protected] @echo.'!;' >> [email protected] # Turn the !s into double quotes AND remove the extra CR LFs # Remember for below, this means version.c.dt has NO terminating CR LF @tr ! \42 < [email protected] | @tr -d \12\15 > [email protected] # # Now build the version.c file: # @rm -f [email protected] @echo 'char *version = "$(VERSION)";' >> [email protected] @cat <[email protected] >>[email protected] @echo.>>[email protected] @echo 'char *author = "Luca Deri <[EMAIL PROTECTED]>";' >> [email protected] @echo 'char *compiler_cflags = "$(CFLAGS)";' >> [email protected] @echo 'char *core_libs = "$(LIBS)";' >> [email protected] @echo 'char *system_libs = "$(LDIRS)";' >> [email protected] @echo Created [email protected] fixup # Strip off the single quotes that some versions put into the file @tr -d \47 < [email protected] > $@ @echo $@ complete: @rm -f [email protected] [email protected] -----Burton _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev
Jac Engel d.d. 02-06-14 Description how to build ntop on Win2k using the MinGW toolchain (MinGW allows you to build native win32 binaries linked against the Microsoft runtime and not the cygwin runtime). Building Ntop ------------- This was last tested against the 2002-06-13 snapshot from http://snapshot.ntop.org. Prerequisites: 1) MinGW (available from http://www.mingw.org) This was tested against MinGW-1.1.tar.gz Note: I unzipped (use folder names) it in C:\Mingw 2) GNU Make (available from http://www.mingw.org) This was tested with GNU Make v3.79.1, (comes with MinGW-1.1) 3) WinPCAP developer's pack (available from http://winpcap.polito.it/install/bin/WinPcap_2_3.zip This was tested with Release 2.3 of WinPcap Note: I unzipped (use folder names) it in C:\Mingw and executed C:\Mingw\WPdpack\Drivers\WinPcap_2_3.exe 4) gdbm for win32/mingw (from http://sourceforge.net/projects/mingwrep) This was tested with gdbm-1.8.0-20010430.zip Note: I unzipped (use folder names) it in C:\Mingw\gdbm 5) ntop (available from http://www.ntop.org) This was tested with http://snapshot.ntop.org/tgz/ntop-02-06-13.tgz Note: I unzipped (use folder names) in C:\ntop-02-06-13 6) UnxUtils package UnxUtils.zip at: http://www.wzw.tu-muenchen.de/~syring/win32/UnxUtils.html Note : I unzipped only patch.exe and rm.exe to C:\mingw\bin rm.exe is required as defined in ntop\makefile.mingw to make ntop. Patch.exe is only required if diff files are available. Steps 1) Install all prerequisites and Open Dos command box and CD to C:\ntop-02-06-1\ntop-current Add to PATH variable C:\Mingw\bin\ path C:\MinGW\bin\;%path% ( don't forget the last backslash !) 2) Edit the ntop/Makefile.mingw and fill in the following values: INC_GDBM (where the gdbm header files can be found) INC_WPDPACK (where the winpcap header files can be found) LIB_GDBM (where libgdbm.a is found) LIB_WPDPACK (where libwpcap.a os found ) result : INC_GDBM=-Ic:/Mingw/gdbm/include INC_WPDPACK=-Ic:/Mingw/wpdpack/include LIB_GDBM=-Lc:/Mingw/gdbm/lib LIB_WPDPACK=-Lc:/Mingw/wpdpack/lib 3) Build the sub-components (starting from the ntop-current directory) 3a) Build zlib cd gdchart0.94c/zlib-1.1.4 make -f Makefile.mingw cd ../.. 3b) Build libpng cd gdchart0.94c/gd-1.8.3/libpng-1.2.1 make -f scripts/makefile.mingw cd ../../../ 3c) Build gd cd gdchart0.94c/gd-1.8.3 make -f Makefile.mingw cd ../.. 3d) Build gdchart cd gdchart0.94c make -f Makefile.mingw cd .. 4) Build ntop itself cd ntop make -f Makefile.mingw 5) Package ntop and the dependent files Create directory e.g. C:\ntop , copy ntop.exe and the html subdirectory hierarchy. Ntop dependent files are libgdm-2.dll and wpcap.dll. Copy libgdbm-2.dll (exists in C:\Mingw\gdbm\bin) to C:\ntop ( wpcap.dll exists in C:\WINNT\system32 after install of WinPcap2_3.exe , so this dir is already in your PATH variable ) . 6) Use it Execute ntop.exe from the install directory. Run ntop in console : ntop.exe /c <options> Run ntop as a service : ntop.exe /i <options> You can get command line help by running ntop.exe -h
