~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to docs/BUILD-MinGW.txt

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-01-30 21:59:13 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050130215913-xc3ke963bw49b3k4
Tags: 2:3.0-5
* Updated README.Debian file so users will understand what to do at
  install, closes: #291794, #287802.
* Updated ntop init script to give better output.
* Also changed log directory from /var/lib/ntop to /var/log/ntop,
  closes: #252352.
* Quoted the interface list to allow whitespace, closes: #267248.
* Added a couple of logcheck ignores, closes: #269321, #269319.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
5
 
 
6
 
 
7
 
 
8
 
 
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).
 
12
 
 
13
Prerequistes:
 
14
 
 
15
Tested notes updated for ntop version 2.0.99RC2 and for ntop cvs snapshot
 
16
as of 15jun2002 (courtesy of Jac Engel).
 
17
 
 
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/)
 
21
 
 
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.
 
24
 
 
25
  1) MinGW      (available from http://www.mingw.org)
 
26
     Tested against mingw-runtime-1.3.tar.gz
 
27
 
 
28
  2) GNU C compiler, gcc
 
29
     The MinGW port, gcc-2.95.3-20011106.tar.gz was used for testing
 
30
 
 
31
  3) GNU Make   (available from http://www.mingw.org)
 
32
     This was tested with GNU Make v3.79.1
 
33
 
 
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:
 
37
 
 
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
 
42
          w32api-1.4-2.tar.gz
 
43
 
 
44
OR:
 
45
 
 
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.
 
49
 
 
50
 
 
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
 
54
 
 
55
     Note: unzip (use folder names) into C:\Mingw and execute 
 
56
           C:\Mingw\WPdpack\Drivers\WinPcap_2_3.exe
 
57
 
 
58
  6) gdbm for win32/mingw (from http://sourceforge.net/projects/mingwrep)
 
59
     This was tested with gdbm-1.8.0-20010430.zip
 
60
 
 
61
     Note: unzip (use folder names) into C:\Mingw\gdbm
 
62
 
 
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
 
65
 
 
66
     Note: unzip (use folder names) into C:\ntop-02-06-13.
 
67
 
 
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
 
71
      on your MinGW path.
 
72
 
 
73
OR:
 
74
 
 
75
  8) UnxUtils package UnxUtils.zip at:
 
76
     http://www.wzw.tu-muenchen.de/~syring/win32/UnxUtils.html
 
77
 
 
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.
 
81
 
 
82
Steps
 
83
 
 
84
  1) Install all prerequisites
 
85
 
 
86
  2) Edit the ntop/Makefile.mingw and fill in the following values:
 
87
 
 
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)
 
92
 
 
93
    e.g.:
 
94
 
 
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
 
99
 
 
100
 
 
101
  3) Build the sub-components (starting from the ntop-current directory)
 
102
 
 
103
     3a) Build zlib
 
104
 
 
105
         cd gdchart0.94c/zlib-1.1.4
 
106
         make -f Makefile.mingw
 
107
         cd ../..
 
108
 
 
109
     3b) Build libpng
 
110
 
 
111
         cd gdchart0.94c/gd-1.8.3/libpng-1.2.4
 
112
         make -f scripts/makefile.mingw
 
113
         cd ../../..
 
114
 
 
115
     3c) Build gd
 
116
 
 
117
         cd gdchart0.94c/gd-1.8.3
 
118
         make -f Makefile.mingw
 
119
         cd ../..
 
120
 
 
121
  4) Build ntop itself
 
122
 
 
123
     cd ntop
 
124
     make -f Makefile.mingw
 
125
 
 
126
 
 
127
  5) Install ntop and the dependent files
 
128
 
 
129
     Create a directory e.g. C:\ntop and copy ntop.exe and the WHOLE html
 
130
     subdirectory hierarchy into it.
 
131
 
 
132
     Ensure that the appropriate DLL's are in your path.  For this
 
133
     build, that includes libgdbm-2.dll and wpcap.dll.
 
134
 
 
135
     Copy libgdbm-2.dll (exists in C:\Mingw\gdbm\bin) to C:\ntop
 
136
 
 
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.
 
139
 
 
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:
 
143
 
 
144
         objdump -p ntop.exe |grep "DLL Name"
 
145
 
 
146
  6) Use it
 
147
 
 
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.
 
151
 
 
152
KNOWN PROBLEMS
 
153
==============
 
154
 
 
155
Win9x (ME?) and gdbm
 
156
--------------------
 
157
 
 
158
Under Win98/98SE (and probably other 9x platforms), unknown gdbm error occurs:
 
159
 
 
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>' 
 
165
 
 
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
 
168
 
 
169
Releases of gdbm for MinGW are available at SourceForge,
 
170
http://sourceforge.net/project/showfiles.php?group_id=7382
 
171
 
 
172
-- 
 
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>
 
177
 
 
178