pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Palle Girgensohn <girgen@partitur.se>
To: Constantin Teodorescu <teo@flex.ro>
To: PostgreSQL Interfaces <pgsql-interfaces@postgreSQL.org>
Subject: Re: [QUESTIONS] pgaccess (libpgtcl) on Solaris?
Date: Wed, 07 Jan 1998 20:16:09 +0100
Message-ID: <34B3D479.38D572BA@partitur.se> (raw)
References: <34B3829D.204BC48B@partitur.se>
	<34B3917B.69446350@flex.ro>

Hello Constantin!

libpq.so was not found, indeed! It wasn't even created. sic! I am sorry
to have wasted your time. I just had libpq.a, and didn't realize this,
just saw the name libpq... =-|

Apparently, the Solaris port of Postgres doesn't create any shared
libraries by default, only libxxx.a files. Same for Tcl and Tk by the
way: they both require '--enable-shared' to create *.so. This I did
right away, and the same for libpgtcl. But as I said, I missed fixing
for the libpq.

Editing of postgres Makefiles for libtcl AND libpq adding same ld
parameters as for x86-solaris did the trick:

src/interfaces/libpq/Makefile:

...
ifeq ($(PORTNAME), sparc_solaris)
  install-shlib-dep := install-shlib
  shlib := libpq.so.1
  LDFLAGS_SL = -G -z text
  CFLAGS += $(CFLAGS_SL)
endif
...


src/interfaces/libpgtcl/Makefile:

...
ifeq ($(PORTNAME), sparc_solaris)
  ifeq ($(CC), gcc)
    CFLAGS += -fpic -fPIC
    shlib             := libpgtcl.so.1
    install-shlib-dep := install-shlib
    LDFLAGS           += -L $(SRCDIR)/interfaces/libpq -lpq
  endif
endif
...

If somebody with more experience in making shared libraries on Solaris
wan't to comment and/or change some of the LDFLAGS, please feel free to
do so. Tcl/Tk needs shared libaries, and won't settle for static (*.a),
right?

I also got the recommendation to use pgtksh instead of wish, but as I
don't know where to get pgtksh, I haven't tried this. PgAccess works
now, and I'm happy for it  :-)  Thanks!

/palle

Constantin Teodorescu wrote:
> 
> Palle Girgensohn wrote:
> >
> > I got no replies on this in the ports list, so forgive me for
> > crossposting to Questions, but I know I'm not the only one who has had
> > this problem.
> 
> there is a new mailing list for PgAccess and other interfaces :
> pgsql-interfaces@postgresql.org
> 
> Other info about subscribing :
> http://www.flex.ro/pgaccess/maillist.html
> 
> > >pgaccess
> > Error in startup script: couldn't load file
> > "/opt/pgsql/lib/libpgtcl.so": ld.so.1: /usr/local/bin/wish8.0: fatal:
> > relocation error: symbol not found: pgresStatus: referenced in
> > /opt/pgsql/lib/libpgtcl.so
> 
> This error shows that libpgtcl was loaded and when linker tried to solve
> some references to symbol pgresStatus he didn't find it.
> The symbol is pgresStatus, and it has to be found in libpq.so library.
> 
> You had some troubles loading libpgtcl.so library from a 'default'
> directory and probably you changed the source from PgAccess to load
> explicit from /opt/pgsql/lib
> 
> But the second library needed, libpq.so was not found due to the same
> reason that libpgtcl.so could not be loaded from default directories.
> I would recommend to start searching why those programs refuse to load
> libraries from /lib for example.
> 
> Please reply your answers to this questions also on
> pgsql-interfaces@postgresql.org list.
> 
> --
> Constantin Teodorescu
> FLEX Consulting Braila, ROMANIA



view thread (2+ messages)

Message-ID: <34B3D479.38D572BA@partitur.se>
Permalink:  ../34B3D479.38D572BA@partitur.se/
Also on:    postgresql.org/message-id/34B3D479.38D572BA@partitur.se

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: girgen@partitur.se, teo@flex.ro
  Subject: Re: [QUESTIONS] pgaccess (libpgtcl) on Solaris?
  In-Reply-To: <34B3D479.38D572BA@partitur.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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