ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Missing wspython symbols

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 7 Sep 2012 12:36:18 -0700
On Sep 7, 2012, at 12:26 AM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

> Note that the patch got backed out this morning as it broke several of the buildbots.

Note that a patch that unconditionally adds to libwireshark.def routines that are conditionally built obviously cannot work correctly with any linker for which, when building a library, saying "export this routine" when the routine doesn't exist is an error.

As per the logs Anders added to the bug, the OS X, Solaris, and MSVC++ linkers are linkers of that sort, even if the GNU linker doesn't happen to be one.

If, for example, py_dissect() must be exported from libwireshark.def to support Python dissectors, then either

	1) libwireshark.def must be generated from libwireshark.def.in by the configure script, so that it includes py_dissect() only if Python support is configured in

or

	2) py_dissect() must be defined even if Python support isn't configured in, even if it's just a stub routine in that case.

The same applies to all other routines added to libwireshark.def.