Thread: Re: [PORTS] RE: pgaccess doesn't run on -current anymore, possib

Re: [PORTS] RE: pgaccess doesn't run on -current anymore, possib

From
Bruce Momjian
Date:
> > cvsup is updated now.
>
> Almost exactly the same result:  The library will not install in ~pgsql/lib.
> I installed by hand;  cd ~/src/pgsql/src/interfaces/libpgtcl;make install.
> I specified in configure --with-tcl, which to my narrow mind, heavily
> influenced with the 6.2 behavior, it sounds like a bug.

OK, did you remove config.cache before running configure, and supply the
include and library directories when prompted by configure, and do you
have tcl.h, tk.h, libtcl.[a,so] and libtk.[a,so] in one of those
directories.  If you do all those things, it should find it.  You may
want to add a set -x to configure just before the tcl/tk probing to see
what it is doing.

> > I think that is all it takes.
>
> Nope.  I also did (as root :-), ldconfig -m ~pgsql/lib, and added
> ~pgsql/lib to LD_LIBRARY_PATH.

Under BSDI, we don't have dynamic shared libraries for performance
reasons, but have a more SVr3 shared library that is created using a
special shlicc command.  You specify that result library on the link
line, and it works.

The shame of it is that every OS seems to have different way to load
dynamic libraries, and with/pgaccess need those types of libraries, so
there is no boilerplate solution to this.

> > The executable is src/bin/pgaccess/pgaccess.tcl.  I have to find the
> > libpqtcl.so line, and edit it.
>
> Not so simple.  first, I added both known Unix methods of broadcasting a
> library (LD_LIBRARY_PATH, and ldconfig), to no avail.
> Then, I edit pgaccess.tcl, to have the library explicitly specified.
>
> Now I get:
>
> $ /usr/local/bin/wish8.1 src/pgsql/src/bin/pgaccess/pgaccess.tcl
> Error in startup script: couldn't load file
> "/usr/local/pgsql/lib/libpgtcl.so": Undefined symbol "_PQnotifies" in
> wish8.1:/usr/local/pgsql/lib/libpgtcl.so
>     while executing
> "load /usr/local/pgsql/lib/libpgtcl.so"
>     (procedure "main" line 3)
>     invoked from within
> "main $argc $argv
> "

It actually looks like it found libpgtcl.so, but not cannot load libpq,
which is referenced by libpgtcl.so.  I recommend you try that and see if
it works.  I don't do that step here, but it sounds like you may need to
do it.

> This holds true for wish 8.1, 8.0, 4.2, 4.1
>
> This is why I love TCL so much.  The concept of backwards compatability, or
> inter-port compatability has not been discovered yet.  I have a customer
> who needs/likes pgaccess.  Any help will be appreciated.

Yea, this tcl/tk version thing is pretty pathetic.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [PORTS] RE: pgaccess doesn't run on -current anymore, possib

From
Simon Shapiro
Date:
On 23-Mar-98 Bruce Momjian wrote:
>> > cvsup is updated now.
>>
>> Almost exactly the same result:  The library will not install in
>> ~pgsql/lib.
>> I installed by hand;  cd ~/src/pgsql/src/interfaces/libpgtcl;make
>> install.
>> I specified in configure --with-tcl, which to my narrow mind, heavily
>> influenced with the 6.2 behavior, it sounds like a bug.
>
> OK, did you remove config.cache before running configure, and supply the
> include and library directories when prompted by configure, and do you
> have tcl.h, tk.h, libtcl.[a,so] and libtk.[a,so] in one of those
> directories.  If you do all those things, it should find it.  You may
> want to add a set -x to configure just before the tcl/tk probing to see
> what it is doing.

I did rm -rf ~pgsql/src/pgsql which should be almost as good.
config did not complain about anything missing.  I have now explicitly
included the paths (the problem is most likely FreeBSD removing things like
/usr/local/include/{tcl,tk}.h).  Configure did NOT complain loudly
enough about not finding things.  IMHO, if I specify --with-tcl and tcl.h
is not found, this should be a fatal error in configure, or at least in
make all, or in make install.


>> > I think that is all it takes.
>>
>> Nope.  I also did (as root :-), ldconfig -m ~pgsql/lib, and added
>> ~pgsql/lib to LD_LIBRARY_PATH.
>
> Under BSDI, we don't have dynamic shared libraries for performance
> reasons, but have a more SVr3 shared library that is created using a
> special shlicc command.  You specify that result library on the link
> line, and it works.
>
> The shame of it is that every OS seems to have different way to load
> dynamic libraries, and with/pgaccess need those types of libraries, so
> there is no boilerplate solution to this.

Somehow, 6.2.1 builds and compiles correctly, so something can be done.
The only thing I worry about is repeatability;  The next build will go all
over this mess again, unless we document it here.  I am naive enough to
belive that Makefiles are intended for this purpose :-)

 ...

> It actually looks like it found libpgtcl.so, but not cannot load libpq,
> which is referenced by libpgtcl.so.  I recommend you try that and see if
> it works.  I don't do that step here, but it sounds like you may need to
> do it.

This is odd, as all the other executables find the library.  Postgres works.

I modified pgaccess.tcl to load the library explicitly.  Then it fails on
_PQnotifies.  I add an explicit load for libpq. and it fails on _crypt.
All this with wish{4.1,4.2,8.0,8.1}.
So, smart simon tries pgtclsh, that simply gives me a % prompt.
OK, how about pgtksh?

Error in startup script: couldn't find procedure Pq_Init
    while executing
"load /usr/local/pgsql/lib/libpq.so"
    (procedure "main" line 3)
    invoked from within
"main $argc $argv
"
    (file "bin/pgaccess/pgaccess.tcl" line 4506)

I'd say something is sick here.


> Yea, this tcl/tk version thing is pretty pathetic.

I am relived to hear this is not the ignorant observation of the clueless
(me).
>
> --
> Bruce Momjian                          |  830 Blythe Avenue
> maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
>   +  If your life is a hard drive,     |  (610) 353-9879(w)
>   +  Christ can be your backup.        |  (610) 853-3000(h)

----------


Sincerely Yours,

Simon Shapiro
Shimon@Simon-Shapiro.ORG                      Voice:   503.799.2313