The default capture buffer size is, in fact, *nominally* 1MB; however,
[obnox/wireshark/wip.git] / README.macos
1 $Id$
2
3 This file tries to help building Wireshark for Mac OS X (Wireshark does
4 not work on earlier versions of Mac OS).
5
6 In order to build Wireshark, you must have X11 and the X11 developer
7 headers and libraries installed; otherwise, you will not be able to
8 build or install GTK+, and will only be able to build TShark.  The X11
9 and X11 SDK that come with Mac OS X releases starting with Panther are
10 sufficient to build and run Wireshark.
11
12 The changes to enable libwiretap and libwireshark being built as shared
13 libraries have broken shared gtk1 builds on Mac OS X.  The GLib 1.x and
14 GTK+ 1.x release tarballs were built with an older version of libtool
15 that didn't support shared libraries on Mac OS X, so you can't build and
16 install them as shared libraries, but the shared-library build of
17 Wireshark requires GLib and GTK+, on Mac OS X, to be shared libraries. 
18 The alternative to build Wireshark as one big statically linked binary
19 isn't working either (and may never have worked on this OS).
20
21 The way out of this situation is to use gtk2 and associated libraries
22 which is known to work in this constellation:
23
24         GLib 2.4.0
25         Pango 1.4.0
26         GTK+ 2.4.0
27         ATK 1.6.0
28
29 and the corresponding dependency, which you can download from the
30 "dependencies" subdirectory of the GTK+ download directory on the GTK+
31 FTP site:
32
33         pkg-config
34
35 as well as GNU gettext, which isn't included in the directory of
36 dependencies on the GTK+ FTP site.
37
38 GTK+ can also be configured to include code to load various sorts of
39 images.  To do so, you would also need the following dependencies, also
40 available from the "dependencies" subdirectory of the GTK+ download
41 directory:
42
43         jpegsrc
44         libpng
45         tiff
46
47 However, on Tiger and later releases, it appears that the libraries
48 built and installed by those packages collide with libraries that come
49 with the OS, so you might have to configure GTK+ not to support loading
50 those images (Wireshark doesn't use the ability to load JPEG, PNG, or
51 TIFF images), by using the "--without-libpng", "--without-libjpeg", and
52 "---without-libtiff" flags when running "configure" in the GTK+ source
53 directory.
54
55 NOTE: you must set the PKG_CONFIG_PATH environment variable to include
56 "/usr/X11R6/lib/pkgconfig" (unless you've already set it, set it to
57 "/usr/X11R6/lib/pkgconfig") before running the Pango configuration
58 script, so that it can be configured to use the version of fontconfig
59 that comes with Mac OS X's X11. This is also needed for the GTK+
60 configuration.
61
62 NOTE: you must install the pkg-config dependency first; unless it is
63 installed, you cannot configure GLib or GTK+.  After that, you must
64 install GNU gettext; only after both of those have been built and
65 installed will you be able to configure GLib.  After configuring and
66 installing GLib, configure, build, and install Pango, ATK, jpegsrc,
67 libpng, tiff, and GTK+, in order.  (The exact order might not be
68 important, but you must configure, build, and install Pango and ATK
69 before configuring GTK+ and, if you want GTK+ to be able to use the
70 capabilities from the other libraries, you must configure, build, and
71 install them before configuring GTK+.)
72
73 You will need to do "make install-lib" for the JPEG library to install
74 its libraries - "make install" does not suffice.  You will also have to
75 do "sudo ranlib /usr/local/lib/libjpeg.a" after "make install-lib".
76
77 For libpng, use scripts/makefile.darwin, not scripts/makefile.macosx.
78
79 Finally run the configure script. By default it will use
80 the GLib2 and GTK+2 libraries. If you run Wireshark's configure script
81 with the "--disable-gtk2" argument it'll try to configure with GLib
82 1.2[.x] and GTK+ 1.2[.x], in which case:
83
84         if they're not installed, the configure script will fail;
85
86         if they are installed, the configure script will configure
87         Wireshark to build with them.
88
89 If you upgrade the major release of Mac OS X on which you are building
90 Wireshark, we advise that, before you do any builds after the upgrade,
91 you do, in the build directory:
92
93     If you are building from a release tarball:
94         make distclean
95
96     If you are building from SVN:
97         make maintainer-clean
98         ./autogen.sh
99
100 Then re-run the configure script and rebuild from scratch.
101
102 On Snow Leopard, if you are building on a machine with a 64-bit
103 processor (with the exception of the early Intel Core Duo and Intel Core
104 Solo machines, all Apple machines with Intel processors have 64-bit
105 processors), the C/C++/Objective-C compiler will build 64-bit by
106 default.
107
108 This means that you will, by default, get a 64-bit version of Wireshark.
109
110 One consequence of this is that, if you built and installed any required
111 or optional libraries for Wireshark on an earlier release of Mac OS X,
112 those are probably 32-bit versions of the libraries, and you will need
113 to un-install them and rebuild them on Snow Leopard, to get 64-bit
114 versions.
115
116 Some required and optional libraries require special attention if you
117 install them by building from source code on Snow Leopard:
118
119 GLib - the GLib configuration script determines whether the system's
120 libiconv is GNU iconv or not by checking whether it has libiconv_open(),
121 and the compile will fail if that test doesn't correctly indicate
122 whether libiconv is GNU iconv.  In Mac OS X, libiconv is GNU iconv, but
123 the 64-bit version doesn't have libiconv_open(); a workaround for this
124 is to replace all occurrences of "libiconv_open" with "iconv_open" in
125 the configure script before running the script.
126
127 libgcrypt - the libgcrypt configuration script attempts to determine
128 which flavor of assembler-language routines to use based on the platform
129 type determined by standard autoconf code.  That code uses uname to
130 determine the processor type; however, in Mac OS X, uname always reports
131 "i386" as the processor type on Intel machines, even Intel machines with
132 64-bit processors, so it will attempt to assemble the 32-bit x86
133 assembler-language routines, which will fail.  The workaround for this
134 is to run the configure script with the --disable-asm argument, so that
135 the assembler-language routines are not used.
136
137 PortAudio - when compiling on Darwin (e.g., on Mac OS X), the configure
138 script for the pa_stable_v19_20071207 version of PortAudio will cause
139 certain platform-dependent build environment #defines to be set in the
140 Makefile rules, and to cause a universal build to be done; those
141 #defines will be incorrect for all but one of the architectures for
142 which the build is being done, and that will cause a compile-time error
143 on Snow Leopard.  The current snapshot version of PortAudio still
144 defines those values in the Makefile, but it appears to use them in ways
145 that don't cause build problems; its configure script also has a
146 "--disable-mac-universal" flag that can cause the build not to be done
147 universal.