Thursday, March 17, 2005

Yes, The ethereal works in my iBook

Yes, I finally had successfully made the ethereal work now. The Mac OS X in my iBook came with no X11 to me, and now I had the GUI ethereal inside. There are usually two ways to achieve it. The first one is to get the binary file, it means installing the binary file in the Fink package. The second one is to get the source code and compile it and usually comes with lots of troubles and problems to be solved by self.

To deal with X11 in Mac OS X, the fink package is a nice and convenient solution to it. But the flaw is what it gives is more than what you want and lacking of the experience of understanding and interacting with lower layers in Unix-like environment. To get the source code and to compile it is the way the geeks likes to go ahead. But it is fulled with lots of stones waiting to be moved away, such as lacking of some library when configuring another library.

I am so happy to finish it in this two weeks. In the meantime, I almost wanted to give up compiling the GUI ethereal code sometimes. Over here, I post the problems happened to me and my solutions to them.

First of all, download the ethereal source code from the official website, and then to compile it. If without X11 environment, it would complain a lot. My experience is to follow the complaint, and then the solution will be solved, but usually more complaints and problems occur. I think that's OK. Nothing worthy to worry, because starting from scratch always needs more efforts.

pkg-config must be install, because most configure files check the needed packages through it. Such as,

pkg-config --libs gtk+-2.0
pkg-config --clfags gtk+-2.0

pkg-config --list-all

will show the packages installed and pkg-config usually checks the directory /usr/local/lib/pkgconfig, and this directory path is depended during the installing option. Or set PKG_CONFIG_PATH also works.

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig"

Gtk+2.4
____GLib-2.6.3
________GNU gettext library
____atk
____pango
____fontconfig
________freetype2 library
________expat library
________ft2build.h
____TIFF library (libtiff)
____JPEG library (libjpeg)
____PNG library (libpng)
____xrender (libXrender)
____libX11 (<--I'm not sure if need it or not)
________libXrender
________xproto
________xextensions
________xtrans
________xau

XFree86-4.4.0-src-[1..7].tgz or the same as X11R6.8.2-src.tar.gz is installed.

The libraries hierarchy is simply like above. After installing the libraries, I had some problem like below.

$ otool -L `which gtk-demo.old`
usr/local/bin/gtk-demo.old:
...
/usr/local/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.1.0)
...

$ otool -L `which xlogo`
usr/X11R6/bin/xlogo:
...
/usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
...

$ gtk-demo.old
_X11TransOpen: Unable to find transport for local

Gtk-WARNING **: cannot open display


Recompiling Xrender xft pango Xcursor xfixes by linking to /usr/X11R6/lib/libX11.6.dylib

Finally, it appears.

ethereal

otool -L is the ldd program in Darwin.

find . -newer older ! -newer newer,
I used to find some files created between older and newer.

No comments: