1
Please note that ntop appears to have stopped being compilable
2
under MinGW after 2.1.3. These instructions are retained for
3
historical usage. If somebody wants to attempt to revise them
4
for 2.2.1+, we would love the contribution.
9
This note describes how to build ntop on win2k using the MinGW
10
toolchain (MinGW allows you to build native win32 binaries linked
11
against the Microsoft runtime and not the cygwin runtime).
15
Tested notes updated for ntop version 2.0.99RC2 and for ntop cvs snapshot
16
as of 15jun2002 (courtesy of Jac Engel).
18
(Most MinGW software is now available through SourceForge at
19
http://sourceforge.net/project/showfiles.php?group_id=2435, or
20
the MinGW packages repository at http://sourceforge.net/projects/mingwrep/)
22
Note that as you unzip archives, use the folder names!
23
It's suggested that everything be unzipped under a base name of C:\MinGW.
25
1) MinGW (available from http://www.mingw.org)
26
Tested against mingw-runtime-1.3.tar.gz
28
2) GNU C compiler, gcc
29
The MinGW port, gcc-2.95.3-20011106.tar.gz was used for testing
31
3) GNU Make (available from http://www.mingw.org)
32
This was tested with GNU Make v3.79.1
34
4) The following packages from the repository were used for testing,
35
honestly, I don't know which are required - I think only libcrypt,
36
and w32api, but the others may make it much easier to work under MinGW:
38
binutils-2.11.90-20010915.tar.gz
39
libcrypt-2.17-20010126.zip
40
readline-4.2-20010727.zip
41
textutils-2.0-mingw32.zip
46
1..4) A prepackaged release of MinGW, MinGW-1.1.tar.gz (which is
47
available from http://www.mingw.org) can also be used (it just installs
48
more "stuff", but it's an integrated set and may be less trouble.
51
5) WinPCAP developer's pack (available from
52
This was tested with Release 2.3 of WinPcap, available at
53
http://netgroup-serv.polito.it/winpcap/install/bin/WPdpack_2_3.zip
55
Note: unzip (use folder names) into C:\Mingw and execute
56
C:\Mingw\WPdpack\Drivers\WinPcap_2_3.exe
58
6) gdbm for win32/mingw (from http://sourceforge.net/projects/mingwrep)
59
This was tested with gdbm-1.8.0-20010430.zip
61
Note: unzip (use folder names) into C:\Mingw\gdbm
63
7) ntop (available from http://www.ntop.org)
64
This was last tested with http://snapshot.ntop.org/tgz/ntop-02-06-13.tgz
66
Note: unzip (use folder names) into C:\ntop-02-06-13.
68
8) rm (normally part of fileutils, but seemingly not available for MinGW).
69
There is a "usable" version of rm (rm.bat) in the utils/ directory.
70
If you don't have a real version of rm, copy this file to somewhere
75
8) UnxUtils package UnxUtils.zip at:
76
http://www.wzw.tu-muenchen.de/~syring/win32/UnxUtils.html
78
Note: unzip only patch.exe and rm.exe to C:\mingw\bin
79
rm.exe is required as defined in ntop\makefile.mingw to make ntop.
80
patch.exe is only required if diff files are available/required.
84
1) Install all prerequisites
86
2) Edit the ntop/Makefile.mingw and fill in the following values:
88
INC_GDBM (where the gdbm header files can be found)
89
INC_WPDPACK (where the winpcap header files can be found)
90
LIB_GDBM (where libgdbm.a is found)
91
LIB_WPDPACK (where libpcap.a is found)
95
INC_GDBM=-Ic:/Mingw/gdbm/include
96
INC_WPDPACK=-Ic:/Mingw/wpdpack/include
97
LIB_GDBM=-Lc:/Mingw/gdbm/lib
98
LIB_WPDPACK=-Lc:/Mingw/wpdpack/lib
101
3) Build the sub-components (starting from the ntop-current directory)
105
cd gdchart0.94c/zlib-1.1.4
106
make -f Makefile.mingw
111
cd gdchart0.94c/gd-1.8.3/libpng-1.2.4
112
make -f scripts/makefile.mingw
117
cd gdchart0.94c/gd-1.8.3
118
make -f Makefile.mingw
124
make -f Makefile.mingw
127
5) Install ntop and the dependent files
129
Create a directory e.g. C:\ntop and copy ntop.exe and the WHOLE html
130
subdirectory hierarchy into it.
132
Ensure that the appropriate DLL's are in your path. For this
133
build, that includes libgdbm-2.dll and wpcap.dll.
135
Copy libgdbm-2.dll (exists in C:\Mingw\gdbm\bin) to C:\ntop
137
wpcap.dll is installed into C:\WINNT\system32 by WinPcap2_3.exe, so
138
this file is should already be available through your path.
140
If you have grep installed, the following commandline will tell
141
you which files need to be in either the same directory as
142
ntop.exe or in the path:
144
objdump -p ntop.exe |grep "DLL Name"
148
Execute ntop.exe from the install directory. You can get command
149
line help by running ntop.exe -h and from the EXTENSIVE entries
150
about Win32 in docs/FAQ.
158
Under Win98/98SE (and probably other 9x platforms), unknown gdbm error occurs:
160
Wait please: ntop is coming up...
161
18/Nov/2002 14:23:05 Initializing IP services...
162
18/Nov/2002 14:23:05 Initializing GDBM...
163
18/Nov/2002 14:23:05 Database './addressCache.db' open failed: unknown gdbm errno
164
18/Nov/2002 14:23:05 Possible solution: please use '-P <directory>'
166
Serge traced the problem to gdbm-1.8.0-20010430.zip.
167
Solution: Revert to the older version, gdbm-1.8.0-20010126.zip
169
Releases of gdbm for MinGW are available at SourceForge,
170
http://sourceforge.net/project/showfiles.php?group_id=7382
173
November 2001 - Scott Renfro <scott@renfro.org>
174
June 2002 - Burton M. Strauss III <Burton@ntopsupport.com>
175
September 2002 - Burton M. Strauss III <Burton@ntopsupport.com> with help from Jac Engel.
176
November 2002 - BMSIII - Win9x problem report from Serge Couture <scouture@dgeq.qc.ca>