Thread: Overly enthusiastic use of pg_config

Overly enthusiastic use of pg_config

From
Peter Eisentraut
Date:
What was the point of this change?

http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/psqlodbc/psqlodbc/configure.ac.diff?r1=1.52&r2=1.53

This ends up linking psqlodbc against all kinds of garbage.

AFAICT, we did fine without that.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: Overly enthusiastic use of pg_config

From
"Hiroshi Saito"
Date:
Hi.

From: "Peter Eisentraut"


> What was the point of this change?
>
> http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/psqlodbc/psqlodbc/configure.ac.diff?r1=1.52&r2=1.53
>
> This ends up linking psqlodbc against all kinds of garbage.
>
> AFAICT, we did fine without that.

Umm,  It had one problem when it being nothing and building.

See,
gcc -shared  .libs/info.o .libs/bind.o .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o
.libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o .libs/misc.o .libs/options.o .libs/pgtypes.o
.libs/psqlodbc.o .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .libs/statement.o .libs/tuple.o
.libs/dlg_specific.o .libs/loadlib.o .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o
.libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o
.libs/win_unicode.o  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib
-L/usr/local/pgsql/lib 
 -lpthread /usr/local/lib/libiodbcinst.so  -Wl,-soname -Wl,psqlodbcw.so -o .libs/psqlodbcw.so
creating psqlodbcw.la
(cd .libs && rm -f psqlodbcw.la && ln -s ../psqlodbcw.la psqlodbcw.la)
gmake[1]: Leaving directory `/usr/home/saito/PSQLODBC/psqlodbc-08020105'

---  run test ---

inet% iodbctest DSN=PostgreSQL
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
1: SQLDriverConnect = [iODBC][Driver Manager]/usr/home/saito/PSQLODBC/psqlodbc-08020105/.libs/psqlodbcw.so: Undefined
symbol "PQconnectdb" (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003

--- ldd check ---

inet% ldd /usr/home/saito/PSQLODBC/psqlodbc-08020105/.libs/psqlodbcw.so
/usr/home/saito/PSQLODBC/psqlodbc-08020105/.libs/psqlodbcw.so:
        libpthread.so.2 => /usr/lib/libpthread.so.2 (0x281b8000)
        libiodbcinst.so.3 => /usr/local/lib/libiodbcinst.so.3 (0x281dd000)

Regards,
Hiroshi Saito