Re: Kerberos libs dependancy in linking with mmc created module

David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Sun, 2 Feb 2003 17:05:44 -0500
Newsgroups gmane.comp.lang.moto.devel
Message-ID <[email protected]>
Ok, so the way to get things working on your system is to modify 
mx/codex/db/pgsql/PGSQL.i adding the appropriate Library or Archive. So 
if the symbols you need were defined in libkerberos.so you would add:

Library: -lkerberos

at the top of the PGSQL.i file

The bigger question is "How do we identify the postgres drivers 
dependencies on any particular platform and build a moto driver that 
reflects those dependencies ?". Right now there is a configure.in file 
in the pgsql extension which does:

AC_CHECK_LIB(crypt,crypt,[MXLIBCRYPT="Library: -lcrypt"])
AC_CHECK_LIB(crypto,ERR_reason_error_string,[MXLIBCRYPTO="Library: 
-lcrypto"])
AC_CHECK_LIB(ssl,SSL_free,[MXLIBSSL="Library: -lssl"])

These configure variables get substituted into PGSQL.i.in

@MXLIBCRYPT@
@MXLIBSSL@
@MXLIBCRYPTO@

That result in a configured PGSQL.i that looks like

Library: -lssl
Library: -lcrypto

So what's going on now is that the driver is being built with at least 
some of the possible dependencies for postgres. But on certain systems 
postgres doesn't depend on libcrypt/libcrypto/or libssl ... and on 
other systems like yours it depends on further additional libraries. 
What the configure script should be doing is identifying the 
dependencies for pgsql on the system moto is being built on and 
including those (and only those) in the moto driver.

Let me know the name of the library the kerberos dependencies are 
defined in so it can be added to the pgsql configuration process in the 
future.

-Dave


On Sunday, February 2, 2003, at 05:44  PM, Stefano Corsi wrote:

>> Are you sure its libcodex ? If so than this is a big problem, libcodex
>> should in no way be relying on any sort of crypto libs. See if you can
>> verify this by using the 'nm' utility on libcodex.a . My suspicion is
>> still that the problem is with the moto postgres driver.
>
> I meaned that one, sorry, I didn't mean the main libcodex.
> This is how I began suspecting on a dependence:
>
> [root@localhost root]# grep -r krb /usr/mx/codex/
> Binary file /usr/mx/codex/db/pgsql/libmx_codex_db_pgsql.so.1.0 matches
> Binary file /usr/mx/codex/db/pgsql/libmx_codex_db_pgsql.so.1 matches
> Binary file /usr/mx/codex/db/pgsql/libmx_codex_db_pgsql.so matches
>
> Doesn't this mean that libmx_codex_db_pgsql.so is using some krb 
> symbols (or
> more probably linking them from some postgres library)?
>
> Stefano
>
>