Forum OpenACS Q&A: Pg driver: undefined symbol: Ns_DbAddColumnInfo

Installing the new release, upgraded AOLserver from 2.3 to 3.0. When running with the default nsd.tcl file, the server starts and serves up the default AOLserver page on port 8000. When starting AOLserver with a file based on the sample OpenACS nsd.tcl from OpenACS.org, the postgres driver doesn't load:
[01/Jul/2000:03:00:00][4542.1024][-main-] Notice: 
loading: /home/aolserver/bin/postgres.so
[01/Jul/2000:03:00:00][4542.1024][-main-] Warning: could not 
load /home/aolserver/bin/postgres.so:  /home/aolserver/bin/postgres.so
: undefined symbol: Ns_DbAddColumnInfo
[01/Jul/2000:03:00:00][4542.1024][-main-] Error: nsd.db: could not 
load driver: postgres
[01/Jul/2000:03:00:00][4542.1024][-main-] Error: nsd.db: no such 
default pool: main
Installed the most recent as-pg driver, but get the same result. I'm running a Postgres 7.0 snapshot just before beta 2, and will upgrade shortly (real shortly if its recommended here), but didn't think that was related to this problem.
I would upgrade to pg 7.0, but that's probably not your problem here. However I think you do need the new as-pg driver. I think Roberto said something about aolserver using our driver for postgres, but I'm not sure about that. Anyway when you compile your driver, your should see something like the following:
%make
gcc -DFOR_ACS_USE -I/usr/local/aolserver/aolserver3_0/include -Wall
-fpic -shared -I/usr/local/pgsql/include -I/home/nsadmin/include -I-/usr/include   -c postgres.c -o postgres.o
gcc -shared -I/usr/local/include -I/usr/local/aolserver/aolserver3_0/include -I-/usr/include -o postgres.so postgres.o /usr/local/lib/libpq.so
   
The key is the -DFOR_ACS_USE symbol definition. Ns_DbAddColumnInfo is conditionally defined using FOR_ACS_USE. In our driver make file FOR_ACS_USE is defined as a CFLAG option by default. Check your driver makefile.
I'm using the 3/16/00 as-pg 1.0.1 driver from this site: https://openacs.org/sdm/one-package-release.tcl?release_id=8 I don't see a reference to FOR_ACS_USE in the makefile for this release, but when I add one to the CFLAGS, then make, I see this:
gcc -I/home/aolserver/include -Wall -fpic -shared -I/usr/local/pgsql/include -I/
home/aolserver/include -I-/usr/include  -DFOR_ACS_USE   -c postgres.c -o postgres.o
gcc -shared -I/usr/local/pgsql/include -I/home/aolserver/include -I-/usr/include -o postgres.so postgres.o /usr/local/pgsql/lib/libpq.so
After a make install, firing up AOLserver still yields the undefined symbol: Ns_DbAddColumnInfo message.
You're right.  The version you're using is based on postgres.c version 1.15, whereas I'm using postgres.c version 1.20, which is the latest from cvs.  There were some changes in between the two versions which resulted in the build process changing slightly.  version 1.15 depends on the variable NS_AOLSERVER_3_PLUS being defined.  Check the ns.h file in your include path and make sure that it has NS_AOLSERVER_3_PLUS defined.  It's possible you're building against the old 2.3 include file.
Exactly, the include path was pointing to the old stuff. Thanks for your help!