From: Lars Roland
(snip)
| From: Olivier Biot
| > This implies that we *cannot* build the libethereal shared library
on cygwin
| > with the Ethereal code as it is today, as:
| >
| > 1. An external global variable 'timestamp_type' is *declared*
| > in epan/timestamp.h but not *defined* in any object used to
| > link epan/libethereal.la. It is defined in tethereal.c and
| > in gtk/main.c.
| >
| > 2. And finally, the report_open_failure() symbol is declared in
| > report_err.h and defined in alert_box.c. If I add alert_box.o
| > to the objects to be linked into libethereral.la the I get
| > the same reference issues with the simle_dialog symbol etc.
|
| Both issues also prevent MSVC users to build libethereal.dll. Cygwin
| probably does not have a linux like mechanism to link shared
libraries
| and relies on the M$ Windows mechanism. :(
| This means that it is difficult to export symbols from the
executable to
| a shared library with Cygwin, too.
|
| Attached patches should solve the first issue. I tested with MSVC.
| Please test on other platforms and check in.
Checked in.
| A solution for the second issue would be an own libethereal api that
| works in the same way as the plugin api on Windows using MSVC. But
that
| is a lot of work. Unfortunately I do not see any other solution for
this
| issue. :(
See the mail I sent out earlier today (shared libethereal TODOs).
Maybe it is not that hard to do so.
| You can work around the second issue on Cygwin if you do not need
the
| diameter and the plugin dissectors.
I'll give this a try (removed ../packet-diameter.c from
epan/Makefile.common).
| > Could any handsome expert provide helping programming hands here?
| >
| > I now strongly believe this is the reason why we can't build
plugin
| > dissectors on cygwin. Should this be true, then we finally reached
the Gates
| > of Oblivion which once traversed will give us plugin dissectors
when
| > compiling with gcc on CygWin!
|
| Perhaps you can make plugins compile on Cygwin when you compile the
| plugin api with the "Plugin Address Table" as MSVC does. But you
| probably have to tweak the makefiles and/or config files manually.
:(
There are some libtool options which are interesting. 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
[...]
Once libethereal is a true shared library, I'll have a look at this.
Regards,
Olivier