Ethereal-dev: Re: [Ethereal-dev] Compiling Ethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ed Warnicke <hagbard@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Dec 2000 07:15:03 -0500 (EST)
Comments inline...

On Wed, 27 Dec 2000, Guillaume Le Malet wrote:

> First, thank you for your help. ;) I really need it.                  
> I use Mandrake 7.0, I've installed flex, bison, and python            
> in /usr/bin as you told me.                                           

I hope you installed these via rpm?

> Glib.h is in /usr/include/glib.h.                                     
> I'm now able to build:                                                
> 	-dfilter-grammar.y                                                   
> 	-dfilter-scanner.l                                                   
> 	-wiretap/ascend-grammar.y                                            
> 	-wiretap/ascend-scanner.l                                            
> 	-make-reg-dotc, packet*.c                                            
> 	-ncp2222.py                                                          
> But I still have an error when I comeback under windows:              
>                                                                       
>                                                                       
> "mkstemp.c                                                            
>         rc  /r image\ethereal                                         
>  NMAKE : fatal error U1073: don't know how to make                    
> 'wiretap\libwtap.lib'                                                 
>  Stop."                                                               

Again, I wish I could help you, but I don't work with Windows.

>                                                                       
> So I guess I should compile it complitly under Linux first.           
>                                                                       
> I've got a few questions about it:                                    
> 	-I did not understand:"you should just be able to check the source   
> out of CVS"                                                  

Ah.  CVS (Concurent Version System) is a mechanism for allowing multiple 
people to work on the source code of a project at the same time.  The
basic idea is that when you wish to work on the code you check a copy
out of the CVS repository, and when you wish to merge your changes 
back into the repository you check them back in.  There are instructions 
for checking the source code out of the CVS repository at 
http://www.ethereal.com/development.html#anoncvs 

Since you didn't check the code out of CVS I presume you downloaded the 
tarball of the source for ethereal-8.14?   This should be fine as 
a starting place for writing a new dissector, but eventually you should 
probably learn to use CVS.
         
> 	-When I type:"./autogen.sh" it tells me that there is no such        
> file.It's the                                                         
> 	same for "make", and it tells me that there is nothing to do for     
> 	"install".                                                           

This is probably because you downloaded the tarball instead of checking 
the code out of CVS.  This is not a problem, I just need to provide
slightly different instructions.  

Here's how I would go about the process of compiling from the tar ball.

Download ethereal-0.8.14.tar.gz from 
http://www.ethereal.com/distribution/
into your home directory.  cd into your home directory by typing 

cd

make a built directory by typing 

mkdir build

make two subdirectories of your build directory by typing 

mkdir build/src
mkdir build/root

cd into build/src by typing 

cd build/src

untar ethereal into build src by typing 

tar -xzvf ../../ethereal-0.8.14.tar.gz

cd into the ethereal directory by typing 

cd ethereal

configure ethereal to install into the build/root directory by typing

./configure --prefix=${HOME}/build/root

this will cause all kinds of stuff to scroll by as ethereal finds out
about your system.

now to compile type 

make

when that is finished ( and it takes a while ) to install type 

make install

you should now have a version of ethereal compiled and installed into 
the build root directory.  You will find the ethereal executable in 
build/root/bin

Let me know if you have any further difficulty with this.  I'd be glad 
to clarify anything that might be confusing or unclear.


>                                                                       
> Thanks for your help.                                                 
>                                                                       
> Guillaume                                                             
>                                                                       
> P.S: I did not include a file containing a trace of the build process 
> because I wrote all the errors I had.                                 

No problem.  Hope this helps.

Ed