Ethereal-dev: Re: [Ethereal-dev] Compiling plug-ins fails on OSX

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 30 Mar 2002 02:53:18 -0800
On Sat, Mar 30, 2002 at 12:38:26AM -0500, Jeffrey Fanelli wrote:
> I can compile the latest build (0.9.2) of ethereal without problems on my
> OSX 10.1.3 (latest Dec devtools) as long as I use the --without-plugins
> option for my ./configure.
> 
> Attempts to "make" with the plugins, or manually compile the plugins after
> the fact product the following output (last few lines of my make follow):
> 
> rm -fr .libs/gryphon.la .libs/gryphon.* .libs/gryphon.*
> cc -bundle -undefined suppress -o .libs/gryphon.so  packet-gryphon.lo
> -L/usr/local/lib -lc -install_name
> /usr/local/lib/ethereal/plugins/0.9.2/gryphon.so
> /usr/bin/ld: -undefined error must be used when -twolevel_namespace is in
> effect

("make" was in some form of double-quote characters, I presume, in the
second paragraph above; you might want to configure your mail software,
or the software you use to compose mail messages, to use ASCII rather
than non-ISO extended character sets, or configure it to ASCIIify
outgoing mail messages.)

A Google search for

	"undefined" "error" "twolevel_namespace"

found a bunch of items; it appears rather a lot of pieces of free
software - or, at least, pieces of free software that use run-time
linking - have been tripped up by MacOS X.

Some of them suggest using the "-flat_namespace" flag.

Try:

	installing autoconf, automake, and libtool 1.4.2 on your
	machine, if they're not already installed - and if you have a
	pre-1.4.2 libtool, uninstall it and install 1.4.2 or update it
	to 1.4.2;

	run "make distclean";

	run "./autogen.sh";

	rebuild.

It appears that 1.4.2 adds the "-flat_namespace" flag in some cases,
whereas 1.4 doesn't; the "-bundle -undefine suppress" comes, it
appears, from libtool.  Ethereal 0.9.2 appears to have been built with
libtool 1.4, from the "ltmain.sh" file.

Note, however, that, unless either

	1) Darwin/MacOS X supports the "dlopen()"/"dlsym()" API, or
	   HP-UX's dynamic loading API, or Win32's dynamic loading API

or

	2) the version of GLib you're using has had support for whatever
	   Darwin/MacOS X's dynamic loading API is

you won't be able to *use* the plugins.

> Jeffrey Fanelli
> Manager of Systems Engineering (Sniffer)
> Network Associates Inc.

Competitive analysis division? :-)