unable to use pgSQL due to undefined symbol - Mailing list pgsql-hackers

From evazquez@inflow.com (E A Vazquez Jr)
Subject unable to use pgSQL due to undefined symbol
Date
Msg-id Xns90A9B218AFEE7evazquezinflowcom@206.221.255.129
Whole thread Raw
List pgsql-hackers
I asked this question on General/Questions about a week ago, I've done 
a bit more testing since, but still can't get things to work properly.  
Noone answered on the other group and a search of the archives did not 
turn up anything even remotely similar.

System:

Solaris 7, patched through 01May2001
gcc 2.95.3 release
automake 1.4
autoconf 2.13
readline 4.2
openssl 0.9.6a
GNU ld 2.11
GNU make 3.79.1

./configure options:
--sysconfdir=/etc
--docdir=/usr/share/doc
--mandir=/usr/share/man
--enable-debug
--enable-depend
--enable-cassert
--with-perl
--with-openssl
--enable-odbc
--with-gnu-ld
--enable-syslog

I have also tried changing --with-perl to --without-perl and removing -
-with-gnu-ld (changing my path to point to /usr/ccs/bin/ld and 
/usr/ucb/ld and rebuilding after each change to use the different ld).

I also have tried both the GNU make and the included Sun make.

I have successfully built and can use:
Apache 1.3.19 with SSL
Snort 1.7 with SSL
PHP 4.05 with SSL
OpenSSH v2.9p1
Perl v5.6.1

However, when I build out PostgreSQL (for the express purpose of using
it in conjunction with Snort and the Advanced Console for Intrusion
Databases (ACID), I get an error on starting httpd that says:

root@slowlaris:/# httpsdctl start
Syntax error on line 307 of /etc/apache/httpd.conf:
Cannot load /usr/apache/libexec/libphp4.so into server: ld.so.1:   /usr/apache/bin/httpsd: fatal: relocation error:
file/usr/local/pgsql/lib/libpq.so.2: symbol main:   referenced symbol not
 
found /usr/apache/bin/httpsdctl start: httpsd could not be started
root@slowlaris:/#

So I did an ld test:

root@slowlaris:/# /usr/ucb/ld -lpq
Undefined                       first referencedsymbol                             in file
main                                /usr/local/pgsql/lib/libpq.so
ld: fatal: Symbol referencing errors. No output written to a.out

(also happens with /usr/local/bin/ld (GNU) and /usr/ccs/bin/ld)
I have tried back versions to v7.0 and up versions to the latest CVS,
all give this error on running after compilation.  I did double check 
and copy libpq.so.2.1 and it's sym-links into /usr/lib to see if the 
binary was hard coding the path - no luck.

Pathing is correct, I can execute psql from the prompt and init /
install a working database for Snort to use, but even though I can 
query directly and see that the database is accepting data and storing 
it correctly.

It appears to only be this library that is not complete.

Any ideas on what I might try to fix this?  Am I missing something 
blindingly obvious?

- Ed


pgsql-hackers by date:

Previous
From: "Brian Hirt"
Date:
Subject: Problem with plpgsql functions and foreign key constraints.
Next
From: John Reid
Date:
Subject: uml diagrams of system catalogues