Tools
Introduction This chapter will provide you with information how to install the various tools needed for Ethereal development. None of the tools mentioned in this chapter is needed to run Ethereal, they are only needed to build it. All these tools have their roots on unix like platforms, but win32 ports are also available. Therefore the tools are available in different "flavours": Unix: as described above, the tools should be commonly available on the supported unix platforms, and for win32 platforms by the cygwin unix emulation Win32 native: some tools are available as native Win32 tools, no emulation is required The following sections will only do a very brief description of what the particular tool is doing, how it is used in the Ethereal project and how it can be installed and tested. Don't expect a lot of documentation regarding these tools in this document. If you need further documentation of a specific tool, you should find lot's of useful information on the web, as these tools are commonly used. As all of the tools are command line tools, you can try to get help with toolname --help or read the manpage man toolname. You will find explanations of the tool usage for some of the specific development tasks in . Some recommendations are given for the easiest way to get a win32 development platform up and running, see .
Installation The installation of the tools depend on the platform you use:
Unix All the tools required are usually installed on a unix developer machine. If a tool is not already installed on your system, you will typically use the installation package from your distribution. If an install package is not available, or you have a reason not to use it (maybe because it's simply too old), you can install that tool from source code, the following sections will provide you with the webpage addresses where you can get these sources.
Win32 Native The native tools will typically be a bit faster, but more complicated to install. You will have to download a lot of tools from different webpages, and install them in the ways they have to be installed. The default installation location will typically not be the c:\program files folder. Have a look at for an overview of the recommended tools.
Win32 Cygwin Installation of the cygwin tools is very simple. As cygwin uses an unix emulation layer, it might be a bit slower compared to the native tools, but at an acceptable level. All tools will be installed into one base folder, the default is c:\cygwin. Cygwin provides a unix emulation layer with a lot of unix based tools on the win32 platform. Although cygwin consists of several seperate packages, the installation and update is done through only a single setup.exe, which acts similar like other web based installers. You will find this network based setup.exe at: click on one of the "Install Cygwin now" appearances, this will start the download of the setup.exe. After the download completed, start this setup.exe on your machine. It will ask you for some settings, the defaults should usually work well. The setup will then download and install a basic set of packages. Under: "Start -> Programs -> Cygwin -> Cygwin Bash Shell" you should now be able to start a new cygwin bash shell, which is similar to the command line (command.exe/cmd.exe) in win32, but much more powerful. If you want to add additional, update installed or remove packages, you should start the setup.exe again. At the "Select Packages" page, the entry in the "New" column will control what is done (or not) with the package. If a new version of a package is available, the new version number will be displayed, so it will be automatically updated. You can change the current setting by simply clicking at it, it will change between: a specific version number - this different package version will be installed Skip - not installed, no changes Keep - already installed, no changes Uninstall - uninstall this package Reinstall - reinstall this package You will find a list of required / recommended packages needed to develop Ethereal in .
Win32: Recommended tools As there are different forms of the Win32 tools available, the following will give an overview of the recommended tools (which are highlighted in bold face). The mandatory tools Tool Cygwin packet Win32 native bash - gcc cl.exe (MSVC) DDD integrated debugger (MSVC) make nmake.exe (MSVC) python perl sed - yacc - lexx -
The optional tools Tool Cygwin packet Win32 native svn TortoiseSVN diff - patch - wget - - NSIS
XXX - mark, which cygwin packages are installed by default.
bash The bash shell is needed to run several shell scripts.
Unix: GNU bash The bash is available for most of the unix-like platforms and as the bash package from the Cygwin setup. If the bash isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside any shell: $ bash --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any working win32 native bash implementation.
C compiler
Unix: GCC (GNU compiler collection) Win32 Note! Although some effort is currently made to use gcc from the cygwin environment, the mainline for several reasons is still using Microsoft Visual Studio's C compiler. The gcc C compiler is available for most of the unix-like platforms and as the gcc package from the Cygwin setup. If gcc isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ gcc --version should result in something like: However, the version string may vary.
Win32 native: Microsoft Visual Studio version 6 C compiler Note! The Microsoft Visual Studio is not free software. This is a tool you have to buy before you use it! The mainline for generating Ethereal on the windows platform, is using the compiler cl.exe from the Microsoft Visual Studio version 6 (and it's nmake, as described below). After correct installation, typing inside the command line (cmd.exe): > cl should result in something like: However, the version string may vary.
Win32 native: Microsoft Visual Studio .NET (and alike) C compilers Warning! The recent "Microsoft Visual Studio .NET" C compiler(s) currently cannot be used to compile Ethereal!!! The following is a problem summary for: Microsoft Visual Studio .NET Microsoft Visual C++ .NET Microsoft Visual C++ Toolkit 2003, freely available at: All containing version 7 or later of Microsoft's C compiler. It is reported that this compiler requires to ship a MSVCRT70.dll together with the compiled exe, which contains the C runtime library. This conflicts, as all required libraries currently compiled with (and uses) MSVCRT.dll (the older version 6 one). Example why this hurts: A dependant library might try to open a file using functions in MSVCRT.dll which creates an internal file handle and keeps information about that file. When Ethereal tries to read data from that file, it uses the functions from MSVCRT70.dll, which doesn't know anything about that previously opened file and returns an error code. There where also attempts to bring the compiler to use only the old MSVCRT.dll but they seemed to fail :-( It's also still unsure, if shipping the MSVCRT70.dll together with Ethereal is compatible with the GPL license at all. Note! This isn't an Ethereal specific problem. Any software project trying to use the version 7 C compiler will have the problems described above! XXX - what about the legal issue, as the MSVCRT70.dll had to be shipped with Ethereal.
Debugger Well, using a good debugger can save you a lot of development time. However some people still think it's use is optional. The debugger you use must match the C compiler Ethereal was compiled with, otherwise the debugger will simply fail or you will only see a lot of garbage.
Unix: GNU gdb gdb is the debugger for the gcc compiler. It is available for many (if not all) unix-like platforms and as the gdb package from the Cygwin setup If you don't like debugging using the command line, there are some GUI frontends for it available, most notably GNU DDD. If gdb isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ gdb --version should result in something like: However, the version string may vary.
Unix: GNU DDD The GNU Data Display Debugger is a good GUI frontend for gdb (and a lot of other command line debuggers), so you have to install gdb first. It is available for many unix-like platforms and as the ddd package from the Cygwin setup. If GNU DDD isn't already installed and also not available as a package for your platform, you can get it at: .
Win32 native: Microsoft Visual Studio debugger You can use the integrated debugger of Visual Studio. However, setting up the environment is a bit tricky, as the win32 build process is using makefiles instead of the .dsp/.dsw files usually used. XXX - add instructions how to do it.
Win32 native: Microsoft Debugging Tools for Windows You could also use the Microsoft debugging tools, which is a GUI debugger. As it's not that comfortable compared to debugging in visual studio, it can be helpful if you have to debug on a different machine. You can get it free of charge at: (as links to microsoft pages changes from time to time, search for "Debugging Tools" at their page if this link should be outdated).
make
Unix: GNU make Win32 Note! Although some effort is made to use make from the cygwin environment, the mainline is still using Microsoft Visual Studio's nmake. GNU make is available for most of the unix-like platforms and also as the make package from the Cygwin setup. If GNU make isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ make --version should result in something like: However, the version string may vary.
Win32 native: nmake from MSVC nmake is part of the Microsoft Visual Studio suite, see comment above. Instead of using the the workspace (.dsw) and projects (.dsp) files, the traditional nmake makefiles are used. This has one main reason: it makes it much easier to maintain changes simultaneous with the gcc toolchain makefile.am files as both file formats are similar. However, as no Visual Studio workspace/project files are available, this makes it hard to use the Visual Studio IDE e.g. for using the integrated debugging feature. After correct installation, typing inside the command line (cmd.exe): > nmake should result in something like: However, the version string may vary.
Win32 native: nmake from microsoft.com Warning! It is recommended to use the Microsoft Visual Studio version 6 to compile Ethereal for Win32, see . Don't follow the instructions in this section, until you now what you are doing. NMAKE 1.5 can be downloaded from Microsoft.com if you search for "KB132084". Unpack the archive by running it, and drop the 3 extracted files in the MSVC++ Toolkit "bin" directory. You will also need win32.mak, which you can get from the MS Win Platform SDK by browsing to where you select the "Core SDK" and only tick the "Build Environment" (31MB) option. After a while, this SDK will be installed. From the start menu, choose "Programs" -> "Microsoft Platform SDK February 2003" -> "Open build environment window" -> (choose your OS Win2K/WinXP/Win2003)
python Python is an interpreter based programming language. The homepage of the python project is: . Python is used to XXX. Python version 2.2 and above should be working fine.
Unix: python Python is available for most of the unix-like platforms and as the python package from the Cygwin setup If Python isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ python -V should result in something like: Python 2.3.3 However, the version string may vary.
Win32 native: python Have a look at to download the latest stable release. You can download a setup there, which will install the python system typically into: C:\python23 or similiar.
perl Perl is an interpreter based programming language. The homepage of the perl project is: . Perl is used to XXX. Perl version XXX and above should be working fine.
Unix: perl Perl is available for most of the unix-like platforms and as the perl package from the Cygwin setup. If Perl isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ perl --version should result in something like: However, the version string may vary.
Win32 native: perl A native Win32 perl package can be obtained from . The installation should be straightforward. After correct installation, typing inside the command line (cmd.exe): > perl -v should result in something like: However, the version string may vary.
sed Sed it the streaming editor. It makes it easy for example to replace specially marked texts inside a source code file. The Ethereal build process uses this to stamp version strings into various places.
Unix: sed Sed is available for most of the unix-like platforms and as the sed package from the Cygwin setup. If Sed isn't already installed and also not available as a package for your platform, you can get it at: (XXX - is this the official home?). After correct installation, typing inside the bash: $ sed --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any working win32 native sed implementation.
yacc (bison) Bison is a free implementation of yacc.
Unix: bison Bison is available for most of the unix-like platforms and as the bison package from the Cygwin setup. If GNU Bison isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ bison --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any working win32 native yacc/bison implementation.
lexx (flex) Flex is a free implementation of lexx.
Unix: flex Flex is available for most of the unix-like platforms and as the flex package from the Cygwin setup. If GNU Flex isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ flexx --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any working win32 native lexx/flex implementation.
Subversion (SVN) client (optional) The Ethereal project uses it's own subversion (or short SVN) server to keep track of all the changes done to the source code. Details about the usage of subversion in the Ethereal project can be found in . If you want to work with the source code and planning to commit your changes back to the Ethereal community, it is recommended to use a SVN client to get the latest source files. For detailed information about the different ways to obtain the Ethereal sources, see . Along with the traditional command-line client, several GUI clients are available for a number of platforms, see . You will find more instructions in how to use the subversion client.
Unix: svn SVN is available for most of the unix-like platforms and as the SVN package from the Cygwin setup If Subversion isn't already installed and also not available as a package for your platform, you can get it at: (together with the server software). After correct installation, typing inside the bash: $ svn --version should result in something like: However, the version string may vary.
Win32 native: TortoiseSVN A good subversion client for Win32 can be found at: . It will nicely integrate into the windows Explorer window.
diff (optional) Diff is used to get a file of all differences between two source files/trees (sometimes called a patch). The diff tool isn't needed for building ethereal, but it's needed if you are going to commit your changes back to the ethereal community. Note! The recommended way to build patches is using the subversion client, see for details. You will find more instructions in how to use the diff tool.
Unix: GNU diff Diff is available for most of the unix-like platforms and as the diffutils package from the Cygwin setup. If GNU diff isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ diff --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any win32 native command line diff implementation. The subversion client TortoiseSVN has a build in diff feature, see . If this can be used to create diff files in the required format, so other persons can use them, is currently unknown.
patch (optional) The patch utility is used to merge a diff file into your own source tree. This tool is only needed, if you want to apply a patch (diff file) from someone else (probably from the developer mailing list) to try out in your own private source tree. Tip! Unless you are in the rare case needing to apply a patch to your private source tree, you won't need the patch tool installed. You will find more instructions in how to use the patch tool.
Unix: patch Patch is available for most of the unix-like platforms and as the patch package from the Cygwin setup. If GNU patch isn't already installed and also not available as a package for your platform, you can get it at: . After correct installation, typing inside the bash: $ patch --version should result in something like: However, the version string may vary.
Win32 native: - The authors don't know of any working win32 native patch implementation. The subversion client TortoiseSVN has a build in patch feature, see . The last time tested (Version 1.1.0), this feature failed to apply patches known to be ok.
Win32: GNU wget (optional) GNU wget is used to download files from the internet using the command line. GNU wget is available for most of the unix-like platforms and as the wget package from the Cygwin setup. You will only need wget, if you want to use the win32 automated library download, see for details. If GNU wget isn't already installed and also not available as a package for your platform (well, for win32 it is available as a cygwin package), you can get it at: . If wget is trying to download files but fails to do so, your internet connection might use a HTTP proxy. Some internet providers using such a proxy and it is common for company networks today. In this case, you must set the environment variable http_proxy before using wget. For example, if you are behind proxy.com which is listening on port 8080, you have to set it to something like: set HTTP_PROXY=http://proxy.com:8080/ If you are unsure about the settings, you might ask your system administrator.
Win32: NSIS (optional) The NSIS (Nullsoft Scriptable Install System) is used to generate a setup.exe from all the files needed to be installed, including all required DLL's and such. To install it, simply download the latest released version (currently: 2.0 final) from and start the downloaded installer. You will need NSIS version 2 final or higher. You will find more instructions in how to use the NSIS tool.
Obsolete: CVS client Some time ago, the Ethereal project was using CVS to keep track of all the source code changes. As now subversion (SVN) is used, a CVS client is no longer helpful, see for details about subversion clients.
Win32: Verify installed tools After you've installed the Ethereal sources (see ), you can check the correct installation of all tools by using the verify_tools target of the Makefile.nmake from the source package. Warning! You will need the Ethereal sources and some tools (nmake, bash) installed, before this verification is able to work. Enter at the command line: > nmake -f Makefile.nmake verify_tools This will check for the various tools needed to build Ethereal: