Обсуждение: Re: [QUESTIONS] pgaccess (libpgtcl) on Solaris?

Поиск
Список
Период
Сортировка

Re: [QUESTIONS] pgaccess (libpgtcl) on Solaris?

От
Constantin Teodorescu
Дата:
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

Re: [QUESTIONS] pgaccess (libpgtcl) on Solaris?

От
Palle Girgensohn
Дата:
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