Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] lo_export & pgaccess

From: "Ken J(dot) Wright" <ken(at)ori-ind(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] lo_export & pgaccess
Date: 1999-06-30 14:44:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
At 17:51 06/29/1999 -0400, you wrote:
>"Ken J. Wright" <ken(at)ori-ind(dot)com> writes:
>> Got it!!!
>> libpgtcl's Makefile points to ../libpq -lpq, but 2 things:
>> 1) there is not a sym link to in this directory, so it fails.
>Hmm.  Now that you mention it, that does sound like it could be a
>problem.  (Perhaps this is what Tom Lockhart has been complaining about
>when he asserts that the shlib is not built until install time --- it
>*is* built, but the makefile doesn't create a full set of symlink
>aliases for it in the libpq source directory.  That might be a problem
>on some systems.)

This actually (above) is the whole problem.

>Say what?  Makefile.shlib does not "redefine" SHLIB_LINK.  For linux
>(only) it does do
>	  SHLIB_LINK		+= -lc
>which *adds onto* any preexisting definition of SHLIB_LINK.

This turns out to have been a typo on my part. In modifying Makefile.shlib
to add the -lcrypt, I inadvertently changed the += to a :=. Another case of
an end user creating their own problems ;-). But...... this crypt problem
has been hanging around for some time. And I do wonder why it can't just be
a permanent entry in the *linux* section of Makefile.shlib?

>It seems to me that if you did reshuffle the commands as you suggest,
>you'd end up with "-lc" before "-lpq" and "-lcrypt", which I'd expect
>not to work, or at least be risky.

Hmm... did not present a problem immediately, but yes, I'm placing a mental
bookmark on *risky*.

>I'm not a Linux guru, but I suspect that ldconfig's cache is used at
>execution time by the dynamic shlib loader, *not* at link time.

Yes, this seems to be true, and I suppose sensibly so, although it does
appear to use /usr/lib as a default path.

>At this point I believe that the correct fix is for libpq's Makefile
>to create the extra symlinks in the libpq source directory at build time,
>not merely in the install directory at install time.  (Actually, this
>probably ought to happen for all the shlibs, so we really want to modify
>Makefile.shlib to do it.)  I believe that it should *not* be necessary
>to modify libpgtcl's Makefile.  Would you try that and see if it works?
>(If you don't want to mess with Makefile.shlib, just create the extra
>symlinks by hand after building libpq, then see if libpgtcl's Makefile
>creates a working

Hold on a sec..... YES.
Using the distribution make files, all that has to change (for Linux
anyway) is to add -lcrypt to SHLIB_LINK in Makefile.shlib and have the
extra sym links created. I just did this and all went well.

Thanks again,


In response to

pgsql-interfaces by date

Next:From: Thomas LockhartDate: 1999-06-30 14:47:13
Subject: Re: [INTERFACES] lo_export & pgaccess
Previous:From: Tom LaneDate: 1999-06-30 14:06:10
Subject: Re: [INTERFACES] Problem with regression test

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group