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

Ethereal-dev: RE: [Ethereal-dev] Compiling ethereal with GTK2 on Cygwin

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

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Sun, 21 Mar 2004 20:09:42 +0100
Hi Dave,

The problem you mention has been introduced while making libethereal a
shared library. The Win32 gcc builds of Ethereal apparently have more strict
requirements on what can or cannot be in a shared library. For example, the
diameter dissector uses error functions which are not part of the
libethereal API hence linking fails.

Unfortunately I am not an expert in libraries, so I cannot tell you exactly
what to do. However, you can try using the libtool "-no-undefined" flag in
the Win32 or cygwin builds. Quoting from a message I sent earlier this week:

Currently my configure.in file looks like this:
[...]
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
dnl Work around libtool bug (fixed in the version 1.5a?)
AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
AC_LIBTOOL_DLOPEN
case "$host_os" in
  cygwin*)
    CFLAGS="-mms-bitfields $CFLAGS"
    LDFLAGS="-no-undefined $LDFLAGS"
    AC_LIBTOOL_WIN32_DLL
    ;;
esac
AC_PROG_LIBTOOL
[...]

You need to run autogen.sh when you modify the configure.in files in the
ethereal root directory, epan and wiretap.

Regards,

Olivier

|-----Original Message-----
|From: Dave Wapstra [mailto:dave@xxxxxxxxx] 
|Sent: zaterdag 20 maart 2004 15:57
|To: ethereal-dev@xxxxxxxxxxxx
|Subject: [Ethereal-dev] Compiling ethereal with GTK2 on Cygwin
|
|
|All,
|
|I am trying to compile ethereal on cygwin with gtk2. I got the gtk2 
|libraries and related stuff from 
|http://web.sfc.keio.ac.jp/~s01397ms/cygwin/index.html.en and am using 
|cygwin as the environment to compile ethereal in. I took the 
|latest CVS 
|(ethereal-2004-03-19) tarball.
|
|Everything seems to compile ok, however when trying to link to 
|ethereal.exe I get undefined references.
|
|$ make ethereal.exe
|/bin/bash ./libtool --mode=link gcc  -D_U_="__attribute__((unused))" 
|-Wall -W -g -O2 -I/usr/local/include -pthreads 
|-I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/lib/gtk-2.0/include 
|-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
|-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    
|-L/usr/local/lib 
|-L/usr/local/lib -o ethereal.exe -export-dynamic pcap-util-unix.o 
|capture_stop_conditions.o cfile.o conditions.o disabled_protos.o 
|pcap-util.o print.o ps.o range.o ringbuffer.o timestats.o 
|version_info.o 
|alert_box.o capture.o file.o filters.o proto_hier_stats.o summary.o 
|epan/.libs/libethereal.a  wiretap/libwiretap.la gtk/libui.a 
|epan/libethereal.la  -Wl,--export-dynamic -pthreads -L/usr/X11R6/lib 
|-lgtk-x11-2.0 -lX11 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 
|-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 
|-lglib-2.0 -lintl -liconv -lm    -lz
|gcc "-D_U_=__attribute__((unused))" -Wall -W -g -O2 
|-I/usr/local/include 
|-pthreads -I/usr/X11R6/include/gtk-2.0 
|-I/usr/X11R6/lib/gtk-2.0/include 
|-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
|-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o ethereal.exe 
|pcap-util-unix.o capture_stop_conditions.o cfile.o conditions.o 
|disabled_protos.o pcap-util.o print.o ps.o range.o ringbuffer.o 
|timestats.o version_info.o alert_box.o capture.o file.o filters.o 
|proto_hier_stats.o summary.o -Wl,--export-dynamic -pthreads 
|-Wl,--export-dynamic  -L/usr/local/lib wiretap/.libs/libwiretap.a 
|-L/usr/lib gtk/libui.a epan/.libs/libethereal.a -L/usr/X11R6/lib 
|/usr/X11R6/lib/libgtk-x11-2.0.dll.a -lX11 
|/usr/X11R6/lib/libgdk-x11-2.0.dll.a /usr/lib/libatk-1.0.dll.a 
|/usr/lib/libgdk_pixbuf-2.0.dll.a /usr/lib/libpangox-1.0.dll.a 
|/usr/lib/libpango-1.0.dll.a /usr/lib/libgobject-2.0.dll.a 
|/usr/lib/libgmodule-2.0.dll.a /usr/lib/libgthread-2.0.dll.a 
|/usr/lib/libglib-2.0.dll.a -luser32 -lkernel32 /usr/lib/libintl.dll.a 
|/usr/lib/libiconv.dll.a -lz -Wl,--rpath -Wl,/usr/X11R6/lib -Wl,--rpath 
|-Wl,/usr/X11R6/lib
|gcc: unrecognized option `-pthreads'
|gcc: unrecognized option `-pthreads'
|disabled_protos.o(.text+0x52): In function `read_disabled_protos_list':
|/tmp/ethereal-2004-03-19/disabled_protos.c:80: undefined reference to 
|`_get_datafile_path'
|disabled_protos.o(.text+0xbc):/tmp/ethereal-2004-03-19/disabled
|_protos.c:109: 
|undefined reference to `_get_persconffile_path'
|disabled_protos.o(.text+0x4a8): In function `set_disabled_protos_list':
|/tmp/ethereal-2004-03-19/disabled_protos.c:274: undefined reference to 
|`_proto_get_id_by_filter_name'
|disabled_protos.o(.text+0x4b7):/tmp/ethereal-2004-03-19/disable
|d_protos.c:278: 
|undefined reference to `_proto_can_toggle_protocol'
|disabled_protos.o(.text+0x4f8):/tmp/ethereal-2004-03-19/disable
|d_protos.c:293: 
|undefined reference to `_proto_get_id_by_filter_name'
|disabled_protos.o(.text+0x507):/tmp/ethereal-2004-03-19/disable
|d_protos.c:297: 
|undefined reference to `_proto_can_toggle_protocol'
|disabled_protos.o(.text+0x524):/tmp/ethereal-2004-03-19/disable
|d_protos.c:298: 
|undefined reference to `_proto_set_decoding'
|disabled_protos.o(.text+0x52c):/tmp/ethereal-2004-03-19/disable
|d_protos.c:299: 
|undefined reference to `_proto_set_cant_toggle'
|disabled_protos.o(.text+0x53e):/tmp/ethereal-2004-03-19/disable
|d_protos.c:279: 
|undefined reference to `_proto_set_decoding'
|
|Any suggestions to move forward?
|
|Regards,
|Dave
|
|
|_______________________________________________
|Ethereal-dev mailing list
|Ethereal-dev@xxxxxxxxxxxx
|http://www.ethereal.com/mailman/listinfo/ethereal-dev
|