Forum OpenACS Q&A: Re: compiling nspostgres

Collapse
7: Re: compiling nspostgres (response to 1)
Posted by Phillip Harrington on
Hello,

I hope to God someone picks this reply up in "new responses." I've been trying to get nspostgres to compile and I can't. I did the MODLIBS hack mentioned above (since I'm using AOLserver 4).

#MODLIBS  = -L$(PGLIB) -lpq
MODLIBS  = -L$(PGLIB) -lpq -lnsdb

Anyway when I run:
# make INST=/usr/local/aolserver/ POSTGRES=/usr/local/pgsql ACS=1

I get a bunch of errors like below (this isn't the top of the errors unfortunately PuTTY's buffer for copy/paste craps out):

I'm on Red Hat 7.3 posgresql 7.4 and aolserver 4.

nspostgres.h:157: warning: (near initialization for `PgProcs[11]')
nspostgres.h:157: warning: excess elements in scalar initializer
nspostgres.h:157: warning: (near initialization for `PgProcs[11]')
nspostgres.h:158: warning: data definition has no type or storage class
nspostgres.c: In function `Ns_DbDriverInit':
nspostgres.c:49: warning: implicit declaration of function `Ns_DbRegisterDriver'
nspostgres.c: At top level:
nspostgres.c:88: parse error before `*'
nspostgres.c:97: parse error before `*'
nspostgres.c:106: parse error before `*'
nspostgres.c: In function `Ns_PgOpenDb':
nspostgres.c:116: `handle' undeclared (first use in this function)
nspostgres.c:116: (Each undeclared identifier is reported only once
nspostgres.c:116: for each function it appears in.)
nspostgres.c:158: `NS_DML' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:175: parse error before `*'
nspostgres.c: In function `Ns_PgCloseDb':
nspostgres.c:180: `handle' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:207: parse error before `*'
nspostgres.c: In function `Ns_PgSetErrorstate':
nspostgres.c:209: `handle' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:243: parse error before `*'
nspostgres.c: In function `set_transaction_state':
nspostgres.c:244: `handle' undeclared (first use in this function)
nspostgres.c:245: `sql' undeclared (first use in this function)
nspostgres.c:248: `asfuncname' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:272: parse error before `*'
nspostgres.c: In function `Ns_PgExec':
nspostgres.c:278: `sql' undeclared (first use in this function)
nspostgres.c:283: `handle' undeclared (first use in this function)
nspostgres.c:399: `NS_ROWS' undeclared (first use in this function)
nspostgres.c:403: `NS_DML' undeclared (first use in this function)
nspostgres.c:416: warning: control reaches end of non-void function
nspostgres.c: At top level:
nspostgres.c:420: parse error before `*'
nspostgres.c: In function `Ns_PgResetHandle':
nspostgres.c:424: `handle' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:456: parse error before `*'
nspostgres.c: In function `Ns_PgSelect':
nspostgres.c:463: `handle' undeclared (first use in this function)
nspostgres.c:468: `sql' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:502: parse error before `*'
nspostgres.c: In function `Ns_PgGetRow':
nspostgres.c:508: `handle' undeclared (first use in this function)
nspostgres.c:513: `row' undeclared (first use in this function)
nspostgres.c:529: `NS_END_DATA' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:547: parse error before `*'
nspostgres.c: In function `Ns_PgFlush':
nspostgres.c:552: `handle' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:574: parse error before `*'
nspostgres.c:575: parse error before `*'
nspostgres.c:575: warning: return type defaults to `int'
nspostgres.c: In function `Ns_PgGetTableInfo':
nspostgres.c:580: `Ns_DbTableInfo' undeclared (first use in this function)
nspostgres.c:580: `tinfo' undeclared (first use in this function)
nspostgres.c:580: invalid lvalue in assignment
nspostgres.c:581: parse error before `int'
nspostgres.c:585: `handle' undeclared (first use in this function)
nspostgres.c:590: `table' undeclared (first use in this function)
nspostgres.c:606: `status' undeclared (first use in this function)
nspostgres.c:607: `name' undeclared (first use in this function)
nspostgres.c:608: `type' undeclared (first use in this function)
nspostgres.c:630: `NS_END_DATA' undeclared (first use in this function)
nspostgres.c:637: warning: control reaches end of non-void function
nspostgres.c: At top level:
nspostgres.c:643: parse error before `Ns_DbHandle'
nspostgres.c: In function `Ns_PgTableList':
nspostgres.c:651: `pds' undeclared (first use in this function)
nspostgres.c:656: `handle' undeclared (first use in this function)
nspostgres.c:664: `fSystemTables' undeclared (first use in this function)
nspostgres.c:672: warning: implicit declaration of function `Ns_DbGetRow'
nspostgres.c:678: warning: passing arg 3 of `Tcl_DStringAppend' as signed due to prototype
nspostgres.c:682: `NS_END_DATA' undeclared (first use in this function)
nspostgres.c: In function `encode3':
nspostgres.c:748: warning: passing arg 1 of `enc_one' with different width due to prototype
nspostgres.c:749: warning: passing arg 1 of `enc_one' with different width due to prototype
nspostgres.c:750: warning: passing arg 1 of `enc_one' with different width due to prototype
nspostgres.c:751: warning: passing arg 1 of `enc_one' with different width due to prototype
nspostgres.c: In function `decode3':
nspostgres.c:771: warning: passing arg 1 of `get_one' with different width due to prototype
nspostgres.c:772: warning: passing arg 1 of `get_one' with different width due to prototype
nspostgres.c:773: warning: passing arg 1 of `get_one' with different width due to prototype
nspostgres.c:774: warning: passing arg 1 of `get_one' with different width due to prototype
nspostgres.c: At top level:
nspostgres.c:789: parse error before `Ns_DbHandle'
nspostgres.c: In function `blob_get':
nspostgres.c:791: `handle' undeclared (first use in this function)
nspostgres.c:800: `lob_id' undeclared (first use in this function)
nspostgres.c:812: `NS_ROWS' undeclared (first use in this function)
nspostgres.c:813: `interp' undeclared (first use in this function)
nspostgres.c: In function `stream_actually_write':
nspostgres.c:863: warning: passing arg 3 of `write' as unsigned due to prototype
nspostgres.c: At top level:
nspostgres.c:876: parse error before `Ns_DbHandle'
nspostgres.c: In function `blob_put':
nspostgres.c:883: `value' undeclared (first use in this function)
nspostgres.c:887: `blob_id' undeclared (first use in this function)
nspostgres.c:900: `handle' undeclared (first use in this function)
nspostgres.c:900: `NS_DML' undeclared (first use in this function)
nspostgres.c:901: `interp' undeclared (first use in this function)
nspostgres.c:881: warning: `value_ptr' might be used uninitialized in this function
nspostgres.c: At top level:
nspostgres.c:916: parse error before `Ns_DbHandle'
nspostgres.c: In function `blob_dml_file':
nspostgres.c:923: `filename' undeclared (first use in this function)
nspostgres.c:929: `interp' undeclared (first use in this function)
nspostgres.c:935: `blob_id' undeclared (first use in this function)
nspostgres.c:947: `handle' undeclared (first use in this function)
nspostgres.c:947: `NS_DML' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:973: parse error before `Ns_DbHandle'
nspostgres.c: In function `blob_send_to_stream':
nspostgres.c:976: `handle' undeclared (first use in this function)
nspostgres.c:983: `to_conn_p' undeclared (first use in this function)
nspostgres.c:985: `interp' undeclared (first use in this function)
nspostgres.c:996: `filename' undeclared (first use in this function)
nspostgres.c:1020: `lob_id' undeclared (first use in this function)
nspostgres.c:1032: `NS_ROWS' undeclared (first use in this function)
nspostgres.c:979: warning: `fd' might be used uninitialized in this function
nspostgres.c: At top level:
nspostgres.c:1113: parse error before `Ns_DbHandle'
nspostgres.c: In function `DbFail':
nspostgres.c:1115: `handle' undeclared (first use in this function)
nspostgres.c:1118: `interp' undeclared (first use in this function)
nspostgres.c:1118: `cmd' undeclared (first use in this function)
nspostgres.c:1135: `sql' undeclared (first use in this function)
nspostgres.c: In function `parse_bind_variables':
nspostgres.c:1210: warning: unused variable `first_bind'
nspostgres.c: In function `PgBindCmd':
nspostgres.c:1319: `Ns_DbHandle' undeclared (first use in this function)
nspostgres.c:1319: `handle' undeclared (first use in this function)
nspostgres.c:1319: warning: statement with no effect
nspostgres.c:1320: parse error before `*'
nspostgres.c:1333: warning: implicit declaration of function `Ns_TclDbGetHandle'
nspostgres.c:1345: warning: implicit declaration of function `Ns_DbDriverName'
nspostgres.c:1345: warning: comparison between pointer and integer
nspostgres.c:1351: `cmd' undeclared (first use in this function)
nspostgres.c:1354: `set' undeclared (first use in this function)
nspostgres.c:1359: `sql' undeclared (first use in this function)
nspostgres.c:1391: `value' undeclared (first use in this function)
nspostgres.c:1426: `p' undeclared (first use in this function)
nspostgres.c:1461: warning: implicit declaration of function `Ns_DbDML'
nspostgres.c:1465: `rowPtr' undeclared (first use in this function)
nspostgres.c:1465: warning: implicit declaration of function `Ns_Db1Row'
nspostgres.c:1474: warning: implicit declaration of function `Ns_Db0or1Row'
nspostgres.c:1485: warning: implicit declaration of function `Ns_DbSelect'
nspostgres.c:1492: warning: implicit declaration of function `Ns_DbExec'
nspostgres.c:1493: `NS_DML' undeclared (first use in this function)
nspostgres.c:1496: `NS_ROWS' undeclared (first use in this function)
nspostgres.c:1494: warning: unreachable code at beginning of switch statement
nspostgres.c: In function `PgCmd':
nspostgres.c:1522: `Ns_DbHandle' undeclared (first use in this function)
nspostgres.c:1522: `handle' undeclared (first use in this function)
nspostgres.c:1522: warning: statement with no effect
nspostgres.c:1523: parse error before `*'
nspostgres.c:1529: `pgconn' undeclared (first use in this function)
nspostgres.c:1535: warning: comparison between pointer and integer
nspostgres.c: At top level:
nspostgres.c:1670: parse error before `*'
nspostgres.c: In function `Ns_PgBindRow':
nspostgres.c:1677: `handle' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:1750: parse error before `Ns_DbTableInfo'
nspostgres.c: In function `pg_get_column_index':
nspostgres.c:1755: `interp' undeclared (first use in this function)
nspostgres.c:1755: `indexStr' undeclared (first use in this function)
nspostgres.c:1755: warning: passing arg 3 of `Tcl_GetInt' from incompatible pointer type
nspostgres.c:1760: `tinfo' undeclared (first use in this function)
nspostgres.c: In function `pg_column_command':
nspostgres.c:1786: `Ns_DbHandle' undeclared (first use in this function)
nspostgres.c:1786: `handle' undeclared (first use in this function)
nspostgres.c:1786: warning: statement with no effect
nspostgres.c:1787: `Ns_DbTableInfo' undeclared (first use in this function)
nspostgres.c:1787: `tinfo' undeclared (first use in this function)
nspostgres.c:1787: invalid lvalue in assignment
nspostgres.c:1788: parse error before `int'
nspostgres.c:1831: `colindex' undeclared (first use in this function)
nspostgres.c: In function `pg_table_command':
nspostgres.c:1949: `Ns_DbHandle' undeclared (first use in this function)
nspostgres.c:1949: `handle' undeclared (first use in this function)
nspostgres.c:1949: warning: statement with no effect
nspostgres.c: At top level:
nspostgres.c:2072: parse error before `*'
nspostgres.c:2074: warning: return type defaults to `int'
nspostgres.c: In function `Ns_DbNewTableInfo':
nspostgres.c:2075: `Ns_DbTableInfo' undeclared (first use in this function)
nspostgres.c:2075: `tinfo' undeclared (first use in this function)
nspostgres.c:2075: warning: statement with no effect
nspostgres.c:2086: warning: control reaches end of non-void function
nspostgres.c: At top level:
nspostgres.c:2091: parse error before `*'
nspostgres.c: In function `Ns_DbAddColumnInfo':
nspostgres.c:2093: `tinfo' undeclared (first use in this function)
nspostgres.c:2101: `column_info' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:2108: parse error before `*'
nspostgres.c: In function `Ns_DbFreeTableInfo':
nspostgres.c:2112: `tinfo' undeclared (first use in this function)
nspostgres.c: At top level:
nspostgres.c:2128: parse error before `*'
nspostgres.c: In function `Ns_DbColumnIndex':
nspostgres.c:2133: `tinfo' undeclared (first use in this function)
nspostgres.c:2136: `name' undeclared (first use in this function)
make: *** [nspostgres.o] Error 1

Collapse
8: Re: compiling nspostgres (response to 7)
Posted by Phillip Harrington on
I ended up using nspostgres 40beta1 and got it to compile. Thanks for the help everyone (offline emails 😃)!

Phil