Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Constantin Teodorescu <teo(at)flex(dot)ro>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!
Date: 1998-11-06 18:45:13
Message-ID: 15661.910377913@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Constantin Teodorescu <teo(at)flex(dot)ro> writes:
> [root(at)teo libpgtcl]# ldd libpgtcl.so.2.0
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x40014000)
> libc.so.6 => /lib/libc.so.6 (0x40041000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)

> [root(at)teo libpgtcl]# ldd ../libpq/libpq.so.2.0
> statically linked

Well, that's pretty interesting. Evidently you were able to persuade
the linker to dynamically link libpgtcl.so to libcrypt.so, but the patch
I suggested did *not* persuade the linker to dynamically link libpq.so
to libcrypt.so. Just exactly what change did you make in libpgtcl's
Makefile, anyway? I assumed it was simply adding -lcrypt, but now I
am not so sure.

It's also curious that libpq.so is not showing any dynamic dependency
on libc. I think we must have the wrong linker options for libpq.

> [root(at)teo libpgtcl]# vdir ../libpq/libpq.so.2.0
> -rwxr-xr-x 1 root root 50014 Nov 6 10:08
> ../libpq/libpq.so.2.0

> [root(at)teo libpgtcl]# vdir libpgtcl.so.2.0
> -rwxr-xr-x 1 root root 64725 Nov 6 10:19 libpgtcl.so.2.0

And we also need to figure out why the linker is including libpq.a into
libpgtcl.so, instead of creating a dynamic link from libpgtcl.so to
libpq.so like it did for libcrypt and libc.

(BTW, do you have a libcrypt.a in /lib, or just libcrypt.so?)

It seems clear from your ldd results that your machine is capable of
doing the right thing, but we aren't invoking the linker with the right
options. Where I want to get to is:

libpgtcl.so: dynamic dependency on libpq.so (and libc of course)

libpq.so: dynamic dependency on libcrypt.so (and libc of course)

It might be worth extracting the part of the "make all" log that shows
what commands are being used to build each of these libraries.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Terry Mackintosh 1998-11-06 19:39:30 SPI hacking
Previous Message Oleg Broytmann 1998-11-06 17:52:38 Re: [HACKERS] Doc's about setting the amount of shared memory

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Link 1998-11-06 21:22:53 null dates and '?' under pgdbi.
Previous Message Constantin Teodorescu 1998-11-06 15:49:59 Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!