Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!! - Mailing list pgsql-hackers

From Constantin Teodorescu
Subject Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!
Date
Msg-id 3642B0F1.F5357EA5@flex.ro
Whole thread Raw
In response to Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!
List pgsql-hackers
Tom Lane wrote:
>
> I don't think that's the right approach.  libpgtcl doesn't depend on
> libcrypt.  libpq does, and that's where we need to fix this, or else
> we'll see the same problem with any other shared library that depends
> on libpq.
>
> Would you check whether it works to add the following patch to
> src/interfaces/libpq's Makefile, and then build libpgtcl *without*
> a reference to crypt?  (I can't test it here since crypt is part of
> libc on my machine...)

Completely delete postgresql from my machine and any trace of libpq and
libpgtcl
Untarred the 6.4 final distribution
apply the patch
compiled from scratch
installed

Got :

[teo@teo teo]$ Error in startup script: couldn't load file
"libpgtcl.so": /usr/local/pgsql/lib/libpgtcl.so: undefined symbol: crypt
    while executing
"load libpgtcl.so"
    (procedure "main" line 3)
    invoked from within
"main $argc $argv"
    (file "pgaccess.tcl" line 4813)


When modify the Makefile from libpgtcl adding -lcrypt , recompile,
install . Everything it's ok.




>
> *** Makefile.in~        Thu Nov  5 18:08:26 1998
> --- Makefile.in Thu Nov  5 18:11:43 1998
> ***************
> *** 34,39 ****
> --- 34,43 ----
>   OBJS+= common.o wchar.o conv.o
>   endif
>
> + # If crypt is a separate library, rather than part of libc,
> + # make sure it gets included in shared libpq.
> + SHLIB_LINK= $(findstring -lcrypt,$(LIBS))
> +
>   # Shared library stuff, also default 'all' target
>   include $(SRCDIR)/Makefile.shlib
>
>
>                         regards, tom lane

--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA

pgsql-hackers by date:

Previous
From: Constantin Teodorescu
Date:
Subject: A plpgsql question !
Next
From: Oleg Broytmann
Date:
Subject: v6.4 - duplicate entries in announce