Ethereal-dev: Re: [Ethereal-dev] Compiling on cygwin does not work anymore

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

From: Lars Roland <Lars.Roland@xxxxxxx>
Date: Thu, 18 Mar 2004 01:06:08 +0100
Hello Olivier,

Biot Olivier wrote:
(snip)

CygWin does *not* allow building shared libraries with undefined symbols as
can be read from the libtool warning below:
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared libraries
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.

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. :(

You can work around the second issue on Cygwin if you do not need the diameter and the plugin dissectors.

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. :(

Regards,

Lars

Attachment: diff.tar.gz
Description: GNU Zip compressed data