6d9da1884621faf694e9aecc23859680933e6d6c
[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 You must have the developer tools (called Xcode) installed. Xcode 3 should
7 be available on the install DVD. See
8
9         http://guide.macports.org/chunked/installing.xcode.html
10
11 for details.
12
13 You must have X11 and the X11 developer headers and libraries installed;
14 otherwise, you will not be able to build or install GTK+, and will only
15 be able to build TShark.  The X11 and X11 SDK that come with Mac OS X
16 releases starting with Panther can be used to build and run Wireshark.
17
18 You must also have GLib and, if you want to build Wireshark as well as
19 TShark, GTK+.  See
20
21         https://nplab.fh-muenster.de/groups/wiki/wiki/fb7a4/Building_Wireshark_on_SnowLeopard.html
22
23 for information on how to install GLib, GTK+'s dependencies, GTK+, and
24 some additional optional support libraries from source.
25 from source
26
27 If you are building from a Subversion tree, rather than from a source
28 distribution tarball, run the autogen.sh script.  This should not be
29 necessary if you're building from a source distribution tarball, unless
30 you've added new source files to the Wireshark source.
31
32 Then run the configure script, and run make to build Wireshark.
33
34 If you upgrade the major release of Mac OS X on which you are building
35 Wireshark, we advise that, before you do any builds after the upgrade,
36 you do, in the build directory:
37
38     If you are building from a release tarball:
39         make distclean
40
41     If you are building from SVN:
42         make maintainer-clean
43         ./autogen.sh
44
45 Then re-run the configure script and rebuild from scratch.
46
47 On Snow Leopard (10.6), if you are building on a machine with a 64-bit
48 processor (with the exception of the early Intel Core Duo and Intel Core
49 Solo machines, all Apple machines with Intel processors have 64-bit
50 processors), the C/C++/Objective-C compiler will build 64-bit by
51 default.
52
53 This means that you will, by default, get a 64-bit version of Wireshark.
54
55 One consequence of this is that, if you built and installed any required
56 or optional libraries for Wireshark on an earlier release of Mac OS X,
57 those are probably 32-bit versions of the libraries, and you will need
58 to un-install them and rebuild them on Snow Leopard (10.6), to get 64-bit
59 versions.
60
61 Some required and optional libraries require special attention if you
62 install them by building from source code on Snow Leopard:
63
64 GLib - the GLib configuration script determines whether the system's
65 libiconv is GNU iconv or not by checking whether it has libiconv_open(),
66 and the compile will fail if that test doesn't correctly indicate
67 whether libiconv is GNU iconv.  In Mac OS X, libiconv is GNU iconv, but
68 the 64-bit version doesn't have libiconv_open(); a workaround for this
69 is to replace all occurrences of "libiconv_open" with "iconv_open" in
70 the configure script before running the script.
71
72 libgcrypt - the libgcrypt configuration script attempts to determine
73 which flavor of assembler-language routines to use based on the platform
74 type determined by standard autoconf code.  That code uses uname to
75 determine the processor type; however, in Mac OS X, uname always reports
76 "i386" as the processor type on Intel machines, even Intel machines with
77 64-bit processors, so it will attempt to assemble the 32-bit x86
78 assembler-language routines, which will fail.  The workaround for this
79 is to run the configure script with the --disable-asm argument, so that
80 the assembler-language routines are not used.
81
82 PortAudio - when compiling on Mac OS X, the configure script for the
83 pa_stable_v19_20071207 version of PortAudio will cause certain
84 platform-dependent build environment #defines to be set in the
85 Makefile rules, and to cause a universal build to be done; those
86 #defines will be incorrect for all but one of the architectures for
87 which the build is being done, and that will cause a compile-time error
88 on Snow Leopard.  The current snapshot version of PortAudio still
89 defines those values in the Makefile, but it appears to use them in ways
90 that don't cause build problems; its configure script also has a
91 "--disable-mac-universal" flag that can cause the build not to be done
92 universal.