Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Building 0.99.4 under MacOS X (fixes)

From: Andreas Fink <andreas@xxxxxxxx>
Date: Thu, 4 Jan 2007 12:24:10 +0100
Hi folks,

After receiving a newer MacBook pro, I'm installing wireshark and all its dependencies again (gtk+ 2 this time so over 20 libs to compile), so I can finalize a doubleclickable installer which is independent of any packaging system like "fink" or "ports" so anyone can use wireshark. I'm doing this as universal binary (ppc & intel) on MacOS 10.4.8 so some tweaking where necessary on some libs. I now am at the point to compile wireshark which I took a fresh download.

I'm hitting two issues which should be fixed in the CVS.

Here is how I configure

export PATH="/usr/X11R6/bin:/usr/bin:/bin:/usr/local/bin:/sbin:/usr/ sbin:/usr/local/sbin" export LDFLAGS="-lz -L/usr/local/lib -Wl,-search_paths_first -Wl,- single_module" export CFLAGS="-arch ppc -arch i386 -g -Os -fno-omit-frame-pointer - Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -I/usr/local/include/ cairo"
export CPPFLAGS=""
export CXXFLAGS="-arch ppc -arch i386 -g -Os fno-omit-frame-pointer - fno-exceptions -fno-rtti -Wl,-syslibroot,/Developer/SDKs/ MacOSX10.4u.sdk -I/usr/local/include/cairo" ./configure --mandir=/usr/share/man --with-ssl --enable-threads -- enable-usr-local --with-lua --enable-adns --disable-dependency-tracking


Problem #1: LDFLAGS make ./configure fail.

I would need to add -Wl,-single_module to LDFLAGS (otherwise we get errors speaking about multi module)
I can not do this like above because ./configure not wanting to compile.
Solution is to add it to the LDFLAGS lines of wiretap/Makefile and epan/Makefile after the ./configure by hand.


Problem #2: Missing LUA files

The files wslua/dtd_gen.lua and wslua/console.lua seem to be missing (Make looks for them) Copying them over from the previous install directory solves this. Why are those missing?


Problem #3: IRDA plugin fails complaining about _proto_reg_handoff_sir multiple defined.

/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/usr/local/include -I/usr/local/include -g -Os -pipe -DBUILD=19.1 -DMACOSX_DEPLOYMENT_TARGET=10.4 -I/System/Library/ Frameworks/System.framework/PrivateHeaders -pipe -Ddarwin8 -I. -I/usr/ include -I/usr/include -DINET6 -no-cpp-precomp -D_U_="__attribute__ ((unused))" -Wall -Wpointer-arith -W -arch ppc -arch i386 -g -Os - fno-omit-frame-pointer -Wl,-syslibroot,/Developer/SDKs/ MacOSX10.4u.sdk -I/usr/local/include/cairo -I/usr/local/include - D_REENTRANT -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/ include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/ usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/ local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/ libpng12 -g -Os -pipe -DBUILD=19.1 -DMACOSX_DEPLOYMENT_TARGET=10.4 - I/System/Library/Frameworks/System.framework/PrivateHeaders -pipe - Ddarwin8 -I. -I/usr/include -I/usr/include -c -o packet-sir.lo packet- sir.c gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/usr/local/include -I/ usr/local/include -g -Os -pipe -DBUILD=19.1 - DMACOSX_DEPLOYMENT_TARGET=10.4 -I/System/Library/Frameworks/ System.framework/PrivateHeaders -pipe -Ddarwin8 -I. -I/usr/include -I/ usr/include -DINET6 -no-cpp-precomp "-D_U_=__attribute__((unused))" - Wall -Wpointer-arith -W -arch ppc -arch i386 -g -Os -fno-omit-frame- pointer -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -I/usr/local/ include/cairo -I/usr/local/include -D_REENTRANT -I/usr/local/include/ gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/ local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/ include -I/usr/local/include/libpng12 -g -Os -pipe -DBUILD=19.1 - DMACOSX_DEPLOYMENT_TARGET=10.4 -I/System/Library/Frameworks/ System.framework/PrivateHeaders -pipe -Ddarwin8 -I. -I/usr/include -I/ usr/include -c packet-sir.c -DPIC -o .libs/packet-sir.o powerpc-apple-darwin8-gcc-4.0.1: -syslibroot: linker input file unused because linking not done powerpc-apple-darwin8-gcc-4.0.1: /Developer/SDKs/MacOSX10.4u.sdk: linker input file unused because linking not done i686-apple-darwin8-gcc-4.0.1: -syslibroot: linker input file unused because linking not done i686-apple-darwin8-gcc-4.0.1: /Developer/SDKs/MacOSX10.4u.sdk: linker input file unused because linking not done

/bin/sh ../../libtool --tag=CC --mode=link gcc -DINET6 -no-cpp- precomp -D_U_="__attribute__((unused))" -Wall -Wpointer-arith -W - arch ppc -arch i386 -g -Os -fno-omit-frame-pointer -Wl,-syslibroot,/ Developer/SDKs/MacOSX10.4u.sdk -I/usr/local/include/cairo -I/usr/ local/include -D_REENTRANT -I/usr/local/include/gtk-2.0 -I/usr/local/ lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/ cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/ usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/ include/libpng12 -g -Os -pipe -DBUILD=19.1 - DMACOSX_DEPLOYMENT_TARGET=10.4 -I/System/Library/Frameworks/ System.framework/PrivateHeaders -pipe -Ddarwin8 -I. -I/usr/include -I/ usr/include -lz -L/usr/local/lib -Wl,-search_paths_first -L/usr/ local/lib -L/usr/local/lib -o irda.la -rpath /usr/local/lib/wireshark/ plugins/0.99.4 -module -avoid-version plugin.lo packet-ircomm.lo packet-irda.lo packet-sir.lo -L../../epan -lwireshark -L/usr/local/ lib -lgmodule-2.0 -lglib-2.0 -lintl -liconv gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/ irda.so -bundle .libs/plugin.o .libs/packet-ircomm.o .libs/packet- irda.o .libs/packet-sir.o -lz -L/usr/local/lib -L/Users/afink/ development/wireshark-0.99.4/epan /usr/local/lib/libwireshark.dylib / usr/local/lib/libpcre.dylib -L/usr/lib /usr/lib/libkrb5.dylib /usr/ lib/libk5crypto.dylib /usr/lib/libkrb5support.dylib /usr/lib/ libcom_err.dylib /usr/lib/libresolv.dylib /usr/lib/libnetsnmp.dylib / usr/lib/libcrypto.dylib /usr/lib/libm.dylib /usr/lib/libz.dylib /usr/ local/lib/libgmodule-2.0.dylib /usr/lib/libc.dylib /usr/local/lib/ libglib-2.0.dylib /usr/local/lib/libintl.dylib /usr/lib/ libiconv.dylib -arch ppc -arch i386 -Wl,-syslibroot -Wl,/Developer/ SDKs/MacOSX10.4u.sdk -Wl,-search_paths_first
/usr/bin/ld: for architecture i386
/usr/bin/ld: multiple definitions of symbol _proto_reg_handoff_sir
.libs/packet-sir.o definition of _proto_reg_handoff_sir in section (__TEXT,__text) /usr/local/lib/libwireshark.dylib(single module) definition of _proto_reg_handoff_sir
collect2: ld returned 1 exit status
/usr/bin/ld: for architecture ppc
/usr/bin/ld: multiple definitions of symbol _proto_reg_handoff_sir
.libs/packet-sir.o definition of _proto_reg_handoff_sir in section (__TEXT,__text) /usr/local/lib/libwireshark.dylib(single module) definition of _proto_reg_handoff_sir
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccjV0zf9.out (No such file or directory)
make[3]: *** [irda.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


fix: edit file packet-sir.c and rename the function "proto_reg_handoff_sir to irda_proto_reg_handoff_sir and the only call to it in proto_register_irsir as well
(or maybe call the function in libwiretap instead?)


I have one last issue that wireshark crashes at startup now inside FcPatternPosition() calling strcmp() but I guess thats FontConfig which has an issue...(looking to that one now....)