Ethereal-users: Re: [ethereal-users] has anyone managed to compile statically on solaris 2.6

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Fri, 17 Mar 2000 10:14:39 -0800
> 	I am trying to compile the target ethereal_static on a 2.6 solaris
> machine, but I fairly quickly stumble into problems with undefined
> symbol dlopen/dlclose....

SunOS 5.x does *NOT* particularly like statically-linked programs, and
especially doesn't like them if they try to do run-time linking, given
that statically-linked programs, unlike dynamically-linked programs,
don't include the run-time linker....

In general, what people really want is *NOT* statically-linked programs,
in the sense of programs not dynamically linked with any library; for
example, I don't think Sun guarantees that a program statically linked
on SunOS 5.x will run on SunOS 5.y, for y > x, as they may well change
undocumented interfaces (such as system call trap interfaces) in ways
that require library changes, e.g. changes to the standard C library.

What they really want is generally libraries that are statically linked
with *particular* libraries.  To build Ethereal with particular
libraries linked in statically, you could either:

	1) tweak the Makefile by hand to pass

		-Wl,-B,static

	   before libraries to be statically linked in and

		-Wl,-B,dynamic

	   after those libraries (this is the right way to do it on
	   SunOS 5.x; it's not necessarily the same on other OSes, so
	   this is not a *portable* way to do it, and thus the configure
	   script, etc. can't just blindly use it);

	2) temporarily rename the ".so" forms of the libraries with
	   which you want to statically link to ".so.no" or something
	   such as that (and hope that, while you're in the middle of
	   doing that, nobody wants to run a program dynamically linked
	   with any of those libraries), build Ethereal, and then rename
	   the libraries back.