Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 1995 08:46:32 -0600
From:      nate@sneezy.sri.com (Nate Williams)
To:        "Amancio Hasty Jr." <hasty@rah.star-gate.com>
Cc:        hackers@FreeBSD.org
Subject:   Re: ld.so: ivs: libcompat.so.2.0: Undefined error: 0 
Message-ID:  <199507271446.IAA01203@rocky.sri.MT.net>
In-Reply-To: <199507270644.XAA00489@rah.star-gate.com>
References:  <Pine.BSF.3.91.950727101600.967A-100000@winjef.somerset> <199507270644.XAA00489@rah.star-gate.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> So whats the story with libcompat?

It needs to be compiled static and not shared. :)

> I tried to compile it as a shareable object:
>  make
> building shared compat library (version 2.0)
> regex.so: Definition of symbol `_regerror' (multiply defined)
> regerror.so: Definition of symbol `_regerror' (multiply defined)
> *** Error code 1

That is why it must be compiled shared.  A *bug* in the loader prior to
2.0.5 allowed it to build shlibs with symbols that had multiple
definitions.  So, the symbol which was used depended on it's position in
the build at creation time.  In all honesty, this problem still exists
with the static libraries as well, but since the loader isn't aware of
multiply defined symbols because each .o file is unique it's not seen.

The solution is to remove the dependency of libcompat in whatever
program requires libcompat and send the changes back to the maintainer.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507271446.IAA01203>