> -----Original Message-----
> From: Peter Eisentraut [mailto:peter_e@gmx.net]
> Sent: 07 October 2002 20:24
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Unix build
>
>
> I managed to find a Libtool version that works, so here's the
> independent build infrastructure for ODBC on Unix.
<...>
Hi Peter,
I finally got a chance to play with this, and ran into a few potential
issues, though I did end up with a libpsqlodbc.so (I can't easily check
it though as I don't use ODBC on unix).
Software wise, I have:
autoconf 2.53
automake 1.6.3
libtool 1.4.2 (snapshot download link was broken, and I didn't have time
to figure out how to install the cvs version)
PostgreSQL 7.3b2
I moved the current psqlODBC source into $PGSRC/src/interfaces/odbc, ran
the PostgreSQL configure script and then followed your instructions. The
only odd message I got was from libtoolize: 'You should update your
`aclocal.m4' by running aclocal.'. Noting your instructions, I tried the
libtool.m4 from my system, and the PostgreSQL source and found no
difference.
Build logs showing the errors are below. I suspect some of them may be
caused by Windows specific sources being compiled.
Any ideas?
Thanks, Dave.
root@snake:/usr/local/src/postgresql-7.3b2/src/interfaces/odbc# make
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o info.o info.c
info.c: In function `PGAPI_ProcedureColumns':
info.c:4192: warning: int format, long int arg (arg 3)
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o bind.o bind.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o columninfo.o
columninfo.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o connection.o
connection.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o convert.o convert.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o drvconn.o drvconn.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o environ.o environ.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o execute.o execute.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o lobj.o lobj.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o md5.o md5.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o misc.o misc.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o options.o options.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o pgtypes.o pgtypes.c
pgtypes.c: In function `getNumericColumnSize':
pgtypes.c:587: warning: unused variable `max_column_size'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o psqlodbc.o
psqlodbc.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o qresult.o qresult.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o results.o results.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o socket.o socket.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o parse.o parse.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o statement.o
statement.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o tuple.o tuple.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o tuplelist.o
tuplelist.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o dlg_specific.o
dlg_specific.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../../src/include -DFRONTEND -DMD5_ODBC -c -o odbcapi.o odbcapi.c
ar crs libpsqlodbc.a info.o bind.o columninfo.o connection.o convert.o
drvconn.o environ.o execute.o lobj.o md5.o misc.o options.o pgtypes.o
psqlodbc.o qresult.o results.o socket.o parse.o statement.o tuple.o
tuplelist.o dlg_specific.o odbcapi.o
ranlib libpsqlodbc.a
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -shared
-Wl,-soname,libpsqlodbc.so.0 -Wl,-Bsymbolic info.o bind.o columninfo.o
connection.o convert.o drvconn.o environ.o execute.o lobj.o md5.o misc.o
options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o
statement.o tuple.o tuplelist.o dlg_specific.o odbcapi.o -lnsl -lm
-Wl,-rpath,/usr/local/pgsql/lib -o libpsqlodbc.so.0.27
info.o: In function `reallyEscapeCatalogEscapes':
info.o(.text+0x255f): undefined reference to `encoded_str_constr'
info.o(.text+0x258c): undefined reference to `encoded_nextchar'
connection.o: In function `CC_connect':
connection.o(.text+0xde7): undefined reference to `pg_CS_code'
connection.o(.text+0xded): undefined reference to `pg_CS_name'
connection.o(.text+0xe54): undefined reference to `pg_CS_code'
connection.o(.text+0xe5a): undefined reference to `pg_CS_name'
connection.o(.text+0xeb4): undefined reference to `pg_CS_code'
connection.o(.text+0x1b1d): undefined reference to
`CC_lookup_characterset'
convert.o: In function `QP_initialize':
convert.o(.text+0x1cbc): undefined reference to `encoded_str_constr'
convert.o: In function `inner_process_tokens':
convert.o(.text+0x2932): undefined reference to `encoded_byte_check'
convert.o: In function `convert_escape':
convert.o(.text+0x4432): undefined reference to `pg_mbschr'
convert.o: In function `convert_special_chars':
convert.o(.text+0x502c): undefined reference to `encoded_str_constr'
convert.o(.text+0x5059): undefined reference to `encoded_nextchar'
parse.o: In function `getNextToken':
parse.o(.text+0x136): undefined reference to `encoded_str_constr'
parse.o(.text+0x158): undefined reference to `encoded_nextchar'
parse.o(.text+0x242): undefined reference to `encoded_nextchar'
parse.o: In function `parse_statement':
parse.o(.text+0x13bc): undefined reference to `encoded_str_constr'
parse.o(.text+0x13e5): undefined reference to `encoded_nextchar'
dlg_specific.o: In function `getDSNinfo':
dlg_specific.o(.text+0x1c32): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x1c77): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x1cbc): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x1d01): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x1d46): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x1d88): more undefined references to
`GetPrivateProfileString' follow
dlg_specific.o: In function `getDSNinfo':
dlg_specific.o(.text+0x227b): undefined reference to `pg_CS_code'
dlg_specific.o(.text+0x2281): undefined reference to `pg_CS_name'
dlg_specific.o(.text+0x2299): undefined reference to `pg_CS_code'
dlg_specific.o(.text+0x229f): undefined reference to `pg_CS_name'
dlg_specific.o: In function `writeDriverCommoninfo':
dlg_specific.o(.text+0x23b6): undefined reference to
`WritePrivateProfileString'
dlg_specific.o(.text+0x23e9): undefined reference to
`WritePrivateProfileString'
dlg_specific.o(.text+0x241c): undefined reference to
`WritePrivateProfileString'
dlg_specific.o(.text+0x244f): undefined reference to
`WritePrivateProfileString'
dlg_specific.o(.text+0x2482): undefined reference to
`WritePrivateProfileString'
dlg_specific.o(.text+0x24b5): more undefined references to
`WritePrivateProfileString' follow
dlg_specific.o: In function `getCommonDefaults':
dlg_specific.o(.text+0x2a06): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x2a72): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x2ad3): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x2b30): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x2ba7): undefined reference to
`GetPrivateProfileString'
dlg_specific.o(.text+0x2c01): more undefined references to
`GetPrivateProfileString' follow
rm -f libpsqlodbc.so.0
ln -s libpsqlodbc.so.0.27 libpsqlodbc.so.0
rm -f libpsqlodbc.so
ln -s libpsqlodbc.so.0.27 libpsqlodbc.so
sed -n '/^CREATE OR REPLACE FUNCTION/s/CREATE OR REPLACE FUNCTION \([^
(][^ (]*([^)]*)\).*/DROP FUNCTION \1;/p' odbc.sql >odbc-drop.sql