Forum OpenACS Q&A: Gmake of pgdriver failing

Collapse
Posted by Caroline Fields on
Folks, I'm trying to install OpenACS on AIX5L. I've got postgres installed, and most of aolserver ( I got the source from Matt's aolserver dist http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz). pgdriver is giving me pains, though. Following is the meat of the error I'm getting when I do a gmake:
   >nsadmin:/usr/local/src/aolserver/pgdriver>gmake
   gcc  -shared -I/usr/local/pgsql/include -I../aolserver/include -  I-/usr/include  -o postgres.so postgres.o    /usr/local/pgsql/lib/libpq.so   -lpthread
   ld: 0711-317 ERROR: Undefined symbol: .Ns_DbRegisterDriver
   ld: 0711-317 ERROR: Undefined symbol: .Ns_Log
   ld: 0711-317 ERROR: Undefined symbol: .Ns_ConfigGetValue
      [bunches more of these]
   ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetInt
   ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendElement
   ld: 0711-317 ERROR: Undefined symbol: .ns_realloc
   ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more    information.
   collect2: ld returned 8 exit status
   gmake: *** [postgres.so] Error 1
I'm not sure how to "define" the symbols. I saw one message from Freddie Mendoza on the aolserver mail archive about creating a calls.imp file, but I'm not clear on how/why to do that. Any suggestions would be much appreciated. Thanks, Caroline caroline_fields@mech.disa.mil
Collapse
Posted by David Walker on
Is the aolserver source located at ../aolserver?
Collapse
Posted by Caroline Fields on
../aolserver equates to /usr/local/src/aolserver/aolserver. This directory contains the following dirs.
nslog/               nsunix/              tcl8.3.2/
DISTRIBUTION.patch   calls.imp            nscgi/               nsodbc/              nsvhr/               tests/
DISTRIBUTION.txt     doc/                 nscp/                nspd/                scripts/             thread/
LICENSE.txt          encoding-doc.html    nsd/                 nsperm/              tcl/                 win32/
Makefile             include/             nsext/               nssock/              tcl7.6/              windows-nsd.tcl
The actual nsd executable and source for it is in /usr/local/src/aolserver/aolserver/nsd/ dir.
Collapse
Posted by Caroline Fields on
I got it compiled using the -bloadmap, -berok suggestions. Here is my command:

gcc -shared -I/usr/local/pgsql/include -I../aolserver/include -I-/usr/include -Wl,-bimport:./calls.imp -Wl,-bloadmap:loadmap.out -Wl,-berok -o postgres.so postgres.o /usr/local/pgsql/lib/libpq.so -lpthread

I don't know if it will ultimately work, but it did compile. I populated the calls.imp file with all the undefined symbols I got in my errors, e.g.

#!.
Ns_ConfigGetValue
Tcl_GetInt
NS_DbRegisterDriver
etc, etc.


Thank you all for your help!!
Caroline