[OpenAFS-devel] symbol _error_message conflict on 10.3

Marcus Watts mdw@umich.edu
Tue, 20 Feb 2007 16:56:49 -0500


...
> what's more interesting is that under 10.4, stuff builds. It appears that using
> the 10.4SDK, xcode is able to do its two level namespace trick and just gives
> an ld warning that that symbol is there multiple times.
> 
> Under 10.3SDK, however, (even when building on a 10.4 box), it seems that this
> doesn't work, even if I specify the twolevel namespace linker option. So,
> something is different under 10.3, but what? Could it have something to do w.
> the way the afs libs or the kerberos framework is built under 10.3?
...

sure, it's possible.
	man ld
describes these:
	env LD_TWOLEVEL_NAMESPACE=1
	-twolevel_namespace
	-multiply_defined warning
which will certainly modify that "two level namespace trick" so probably
affect the results.  There looks to be quite a few more related ld
options as well, which might possibly affect how libraries are built (and
hence explain the behavior you are seeing).  'otool' is at least capable
of printing the two-level namespace hints.

There's a pretty good chance that the object you built under 10.4 isn't
completely healthy.  Most likely, one set or the other of error messages
won't be visible - which set is visible may depend on which namespace
was visible to the routine calling error_message().  This may not
matter greatly to you - if you are getting link errors mainly or only
on of aklog, then you may not care because the distribution versions of
aklog don't usually try to lookup kerberos errors.

				-Marcus Watts