pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux
3+ messages / 3 participants
[nested] [flat]

* Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux
@ 1998-04-20 15:00 Constantin Teodorescu <teo@flex.ro>
  1998-04-20 18:54 ` Re: [INTERFACES] Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Alvin van Raalte <alvin@camberlo.demon.co.uk>
  0 siblings, 1 reply; 3+ messages in thread

From: Constantin Teodorescu @ 1998-04-20 15:00 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: PostgreSQL Questions <pgsql-questions@postgresql.org>

Hello all,

I have downloaded today 6.3.2 and try to compile it.

I have a RedHat 4.2 i386 Linux on a Pentium 200 MMX machine. On the same
system, 6.3 and 6.3.1 have been compiled without errors.

When I tried to compile now PostgreSQL 6.3.2 I got the following errors
:

1. I was logged in as a normal user then su to root. I ran ./configure
and then gmake. He said that I am not running GNUmake and he wants me to
find it !!?!!? I succeed passing this one by logging in directly as root
and running again ./configure


2. The compilation was fine, I delete the old binaries and install the
new one. Tried my databases with psql, everything was fine. I tried to
run PgAccess and it fails. Looking into interfaces/libpgtcl/ I have
discovered that libpgtcl.so has not been generated. Also in
interfaces/libpq was missing libpq.so. I tried to make them by hand  (ld
-shared -L../../interfaces/libpq -lpq -o libpgtcl.so pgtcl.o pgtclCmds.o
pgtclId.o) and then copy libpgtcl.so into my /lib directory. I made the
same thing for libpq in order to get libpq.so.

When I run PgAccess, there are a lot of errors :

wish: can't resolve symbol 'PQexec'
wish: can't resolve symbol 'PQclear'
...
wish: can't resolve symbol 'PQfinish'
couldn't load file "libpgtcl.so": Unable to resolve symbol 

I took a look to Makefile.global and I noticed that there isn't defined
there the symbol LINUX_ELF.

Could you give me some help please ?

-- 
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux
  1998-04-20 15:00 Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Constantin Teodorescu <teo@flex.ro>
@ 1998-04-20 18:54 ` Alvin van Raalte <alvin@camberlo.demon.co.uk>
  1998-04-21 02:21   ` Re: [INTERFACES] Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Kristofer A. E. Peterson <bepeterson@taconic.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvin van Raalte @ 1998-04-20 18:54 UTC (permalink / raw)
  To: Constantin Teodorescu <teo@flex.ro>; +Cc: pgsql-interfaces; PostgreSQL Questions <pgsql-questions@postgreSQL.org>

I think we must be the only people left using tcl under Linux. This 
hasn't worked for at least a month. In fact I cant recall any 6.3 
version working.

However attached is a patch that I submitted a while ago that fixes the 
problem.

Alvin.

Attachments:

postgresql-patch-7 (text/plain, 2.2K) download diff -ur /home/postgres/pgsql/src/interfaces/ecpg/lib/Makefile.in ./src/interfaces/ecpg/lib/Makefile.in --- /home/postgres/pgsql/src/interfaces/ecpg/lib/Makefile.in Tue Apr 7 11:35:31 1998 +++ ./src/interfaces/ecpg/lib/Makefile.in Mon Apr 13 11:17:14 1998 @@ -16,12 +16,10 @@ shlib := install-shlib-dep := ifeq ($(PORTNAME), linux) - ifdef LINUX_ELF - install-shlib-dep := install-shlib - shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LDFLAGS_SL = -shared -soname libecpg.so.$(SO_MAJOR_VERSION) - CFLAGS += $(CFLAGS_SL) - endif + install-shlib-dep := install-shlib + shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) + LDFLAGS_SL = -shared -soname libecpg.so.$(SO_MAJOR_VERSION) + CFLAGS += $(CFLAGS_SL) endif ifeq ($(PORTNAME), bsd) ifdef BSD_SHLIB diff -ur /home/postgres/pgsql/src/interfaces/libpgtcl/Makefile.in ./src/interfaces/libpgtcl/Makefile.in --- /home/postgres/pgsql/src/interfaces/libpgtcl/Makefile.in Tue Apr 7 11:35:33 1998 +++ ./src/interfaces/libpgtcl/Makefile.in Mon Apr 13 11:16:03 1998 @@ -34,12 +34,10 @@ LIBPQ = -L $(SRCDIR)/interfaces/libpq -lpq ifeq ($(PORTNAME), linux) - ifdef LINUX_ELF - install-shlib-dep := install-shlib - shlib := libpgtcl.so.1 - CFLAGS += $(CFLAGS_SL) - LDFLAGS_SL = -shared - endif + install-shlib-dep := install-shlib + shlib := libpgtcl.so.1 + CFLAGS += $(CFLAGS_SL) + LDFLAGS_SL = -shared endif ifeq ($(PORTNAME), bsd) diff -ur /home/postgres/pgsql/src/interfaces/libpq/Makefile.in ./src/interfaces/libpq/Makefile.in --- /home/postgres/pgsql/src/interfaces/libpq/Makefile.in Tue Apr 7 11:35:33 1998 +++ ./src/interfaces/libpq/Makefile.in Mon Apr 13 11:17:43 1998 @@ -32,12 +32,10 @@ shlib := install-shlib-dep := ifeq ($(PORTNAME), linux) - ifdef LINUX_ELF - install-shlib-dep := install-shlib - shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LDFLAGS_SL = -shared -soname libpq.so.$(SO_MAJOR_VERSION) - CFLAGS += $(CFLAGS_SL) - endif + install-shlib-dep := install-shlib + shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) + LDFLAGS_SL = -shared -soname libpq.so.$(SO_MAJOR_VERSION) + CFLAGS += $(CFLAGS_SL) endif ifeq ($(PORTNAME), bsd) ifdef BSD_SHLIB
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: [INTERFACES] Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux
  1998-04-20 15:00 Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Constantin Teodorescu <teo@flex.ro>
  1998-04-20 18:54 ` Re: [INTERFACES] Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Alvin van Raalte <alvin@camberlo.demon.co.uk>
@ 1998-04-21 02:21   ` Kristofer A. E. Peterson <bepeterson@taconic.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Kristofer A. E. Peterson @ 1998-04-21 02:21 UTC (permalink / raw)
  To: Alvin van Raalte <alvin@camberlo.demon.co.uk>; Constantin Teodorescu <teo@flex.ro>; +Cc: PostgreSQL Questions <pgsql-questions@postgreSQL.org>; pgsql-interfaces

Alvin van Raalte wrote:
> 
> I think we must be the only people left using tcl under Linux. This
> hasn't worked for at least a month. In fact I cant recall any 6.3
> version working.
> 
> However attached is a patch that I submitted a while ago that fixes the
> problem.
> 
> Alvin.
> 
>   ------------------------------------------------------------------------
> 
>                                Name: postgresql-patch-7
>    postgresql-patch-7          Type: Plain Text (text/plain)
>                         Description: postgresql-patch-7

Rather than applying that patch, it would probably be easier creating a
'Makefile.custom' file in the postgresql-6.3.2/src (which get included
by Makefile.global, and thus every Makefile in the tree). Set
LINUX_ELF=true in Makefile.custom, and you won't have to patch all of
the shared library makefiles. You can also specify CUSTOM_CC and
CUSTOM_COPT in Makefile.custom to specify your compiler and compile
flags, respectively.

As for libpgtcl.so and unresolved symbols, I run a Redhat 5.0 system
where the crypt() function lives in its own library (libcrypt) and not
libc. libpgtcl.so is linked to libpq.so, which is statically linked.
crypt() is probably used by libpq.so for passwords, etc, but since
libpq.so is *not* linked with libcrypt, you must link libcrypt.so as
well libpq.so into your app. The Tk shell, wish8.0, is *not* linked to
libcrypt.so. Thus, when pgaccess.tcl loads the libpgtcl.so library, the
system can't resolve the calls to crypt(). One solution is to run
pgaccess.tcl with pgtksh, which *is* linked with libcrypt.so. Just
change the first line of pgaccess.tcl to #!/usr/local/pgsql/bin/pgtksh
(or where ever you installed postgresql). You could also link
libpgtcl.so manually, adding the '-lcrypt' crypt option, which would let
you run pgaccess.tcl and any other postgresql tcl scripts with wish and
tclsh.

Hope this helps...

- Kris



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1998-04-21 02:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-04-20 15:00 Configuration & libpgtcl.so problems in PostgreSQL 6.3.2 on Linux Constantin Teodorescu <teo@flex.ro>
1998-04-20 18:54 ` Alvin van Raalte <alvin@camberlo.demon.co.uk>
1998-04-21 02:21   ` Kristofer A. E. Peterson <bepeterson@taconic.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox