Problem building an API program against 1.4.1
Buck Huppmann
buckh at pobox.com
Sun Jul 31 19:18:09 EDT 2005
On Sun, Jul 31, 2005 at 01:44:09PM -0700, Mike Friedman wrote:
> >Mike Friedman <mikef at ack.Berkeley.EDU> writes:
> >
> >>Thanks, that fixed it! I must say, I didn't even know about the -R
> >>option to gcc and can't find it in the gcc man page. What does -R do
> >>anyway?
> >
> >>I had just assumed that the '-L/usr/local/kerberos/lib' would be
> >>sufficient to tell the linker where to find the libraries. Why did
> >>only libk5crypto have a problem and not, for example, libkrb5?
> Actually, it's a bit scarier than that. When I first had the problem, I
> used ldd to see which shared libraries were needed or expected by my
> module. And only libk5crypto showed as 'not found'. There was an entry
> for libkrb5. However, what I didn't notice was that the latter was the
> version in /usr/lib, which comes installed with FreeBSD and is not the MIT
> version. That's why I say 'scary', because if not for the missing
> libk5crypto, I might never have noticed that I wasn't using the correct
> libkrb5 either. Whether or not this would have caused more subtle
> problems later I can't really say.
>
> Anyway, thanks for the pointer to info about -R. I now see that -R
> appears in the Makefiles used in the MIT K5 build as well.
i won't comment on how capable your system's runtime linker is in using
your vendor's libkrb5.so.${version} in lieu of a your newly installed
version (i would sorta winsomely hope that it's doing the right thing,
given the versioning info built into the libraries and their $(version)
extensions and such forth, but that's why my-administered machines
aren't launching rockets and stuff, and i guess maybe API compatibility
is a completely different fruit from feature compatibility, anyway),
but couldn't all the problems have been avoided by building with
gcc -c ${source} `${newly_installed_krb5}/bin/krb5-config --cflags`
...
gcc -o ${target} ${objects} \
`${newly_installed_krb5}/bin/krb5-config --libs`
? or (to possibly uncover a bone of contention) does krb5-config not
emit -R options?
i didn't know that FreeBSD exhibited the Solaris-ish non-infection-of-
runtime-linking-path-without--R-option, so thanks for cluing me in to that
anyway, and i'll be watching whom my dynamic executables are runtime-link-
ing with like a hawk from now on
More information about the Kerberos
mailing list