libpgtcl on aix

Started by Tim Dunningtonover 25 years ago3 messages
#1Tim Dunnington
timbert@timshouse.com
1 attachment(s)

First:

1. We're compiling on AIX 4.3.3, 64-bit, using the native compiler and gmake.
2. I'm not an AIX compiler guru :-)

History:

1. Built postgres but failed on libpgtcl, error was a number of unrecognized symbols. This happened when we linked from libpgtcl.a to libpgtcl.so. See attachment for details.

2. I hacked the src/interfaces/libpgtcl/Makefile to add "LDFLAGS+= -ltcl8.0", and added the directory in --with-libraries directive in configure.

3. Run gmake again and it compiled, but failed with the exact same error on pltcl.

4. Made the same hack to the pltcl Makefile and compiled and it works.

I can run pgtclsh just fine. However, our product has embedded tcl and a number of extensions (incrtcl, tcl++, tix, tclx, and more). I'm building off of the libtcl8.0.a build for our product.

So when I try "load libpgtcl.so", I get the following error:

Error: couldn't load file "./libpgtcl.so": 0509-130 Symbol resolution faile
d for ./libpgtcl.so because:
0509-136 Symbol __start (number 0) is not exported from
dependent module /home/postgres/postgresql/bin/postgres.
0509-192 Examine .loader section symbols with the
'dump -Tv' command.

I did the dump command on the postgres executable and found:

[177]: 0x20022eb0 .data ENTpt DS SECdef [noIMid] __start

I'm sure there are more questions coming, but this is at least a start. The bottom line is that I need to be able to use libpgtcl with our tclshell. Also note that we setup a number of environment variables, pointing our tclshell to various directories with our libraries in them.

Thanks for the help in advance!

Tim

Attachments:

[PORTS] Fw Help compiling postgres libpgtcl.so on AIX.emlmessage/rfc822; name="[PORTS] Fw Help compiling postgres libpgtcl.so on AIX.eml"Download
#2Zeugswetter Andreas SB
ZeugswetterA@wien.spardat.at
In reply to: Tim Dunnington (#1)
AW: libpgtcl on aix

Looks like your postgres binary is not the correct one.
That is: the make step for the target postgres.imp failed or went into the
wrong directory, and you thus have a postgres binary that is not converted
to export all symbols.

This is one point that bugs me in the aix port. Maybe we should do it
like other ports do it, first create a postgres.a then postgres.imp
and finally postgres from postgres.a and postgres.imp.

Comments ?
Andreas

PS: I do not think that you can successfully run all regression tests
with your current installation. Can you confirm ?

So when I try "load libpgtcl.so", I get the following error:

Error: couldn't load file "./libpgtcl.so": 0509-130 Symbol resolution
faile
d for ./libpgtcl.so because:
0509-136 Symbol __start (number 0) is not exported from
dependent module /home/postgres/postgresql/bin/postgres.
0509-192 Examine .loader section symbols with the
'dump -Tv' command.

I did the dump command on the postgres executable and found:

[177]: 0x20022eb0 .data ENTpt DS SECdef [noIMid] __start

#3Tim Dunnington
timbert@timshouse.com
In reply to: Zeugswetter Andreas SB (#2)
Re: AW: libpgtcl on aix

And that was the problem!!! Each time I recompiled (and finally got
everything to compile properly), I did a gmake install. What I didn't
realize was that, instead of overwriting the previous installation with the
new installation, it would simply skip it. Hence I was using a new
libpgtcl.so with a postgres not compiled for it.

Soooo...when I deleted the existing postgres installation and did a gmake
install, it worked fine.

Could use a gmake uninstall...

Tim

Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> said:

Looks like your postgres binary is not the correct one.
That is: the make step for the target postgres.imp failed or went into the
wrong directory, and you thus have a postgres binary that is not converted
to export all symbols.

This is one point that bugs me in the aix port. Maybe we should do it
like other ports do it, first create a postgres.a then postgres.imp
and finally postgres from postgres.a and postgres.imp.

Comments ?
Andreas

PS: I do not think that you can successfully run all regression tests
with your current installation. Can you confirm ?

So when I try "load libpgtcl.so", I get the following error:

Error: couldn't load file "./libpgtcl.so": 0509-130 Symbol resolution
faile
d for ./libpgtcl.so because:
0509-136 Symbol __start (number 0) is not exported from
dependent module /home/postgres/postgresql/bin/postgres.
0509-192 Examine .loader section symbols with the
'dump -Tv' command.

I did the dump command on the postgres executable and found:

[177] 0x20022eb0 .data ENTpt DS SECdef [noIMid] __start

--
Tim Dunnington
Sr. Integration Engineer
Healthcare.com
804-239-7650