From: Bernd E. <eid...@we...> - 2007-09-10 18:05:12
|
> Ah well, we found some new bugs anyway... Apropos :-) I have plenty of bugs that break down to (my) human failure in fact, here's= =20 another... My best friend is the compiling-the-postgres-driver-situation. Vlad knows, he often helps me with that but it's a neverending story. The base of the problem is we always compile Postgres from source and have = no=20 default installation directories. Example: Naviserver in /usr/local/nsroot_production Postgres in /u01/pgsql8.2.4-dev Say I checkout the modules/nsdbpg and try to compile, giving only the=20 NAVISERVER variable: gmake NAVISERVER=3D/usr/local/nsroot_production/ gcc -pipe -O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC -pipe -I= /usr/local/nsroot_production//include -I"/usr/local/nsroot_production/inclu= de" -DHAVE_CONFIG_H -c -o=20 nsdbpg.o nsdbpg.c In file included from nsdbpg.c:37: dbpg.h:44:22: error: libpq-fe.h: No such file or directory In file included from nsdbpg.c:37: dbpg.h:52: error: expected specifier-qualifier-list before =E2=80=98PGconn= =E2=80=99 [... lots of errors following] I try to be more specific: gmake NAVISERVER=3D/usr/local/nsroot_production \ CFLAGS=3D"-I/u01/pgsql8.2.4-dev/lib \ =2DI/u01/pgsql8.2.4-dev/include \ =2DI/usr/local/nsroot_staging/include" (Some warnings, but finally:) gcc -pipe -shared -nostartfiles -L/usr/local/nsroot_production/lib -o=20 nsdbpg.so nsdbpg.o=20 tclcmds.o -lnsdb -lpq -lnsthread -lnsd -L/usr/local/nsroot_production/lib -= ltcl8.4 -ldl -lgcc_s -lieee -lm -Wl,--export-dynamic -L/usr/local/nsroot= _production/lib -Wl,-rpath,/usr/local/nsroot_production/lib /usr/lib/gcc/i586-suse-linux/4.1.0/../../../../i586-suse-linux/bin/ld: cann= ot=20 find -lpq collect2: ld returned 1 exit status make: *** [nsdbpg.so] Error 1 So, after trying various things, I edited the Makefile and changed the line: MODLIBS =3D -lnsdb -lpq to MODLIBS =3D -L/usr/local/nsroot_production/include/nsdb.h -L/u01/pgsql8.2.4-dev/lib= /libpq.a (or) =3D -lnsdb -L/u01/pgsql8.2.4-dev/lib/libpq.a and hey! that does it - theres the nsdbpg.so But: ldd nsdbpg.so linux-gate.so.1 =3D>=20 libnsdb.so =3D> /usr/local/nsroot_production/lib/libnsdb.so=20 libnsthread.so =3D> /usr/local/nsroot_production/lib/libnsthread.so= =20 libnsd.so =3D> /usr/local/nsroot_production/lib/libnsd.so=20 libtcl8.4.so =3D> /usr/local/nsroot_production/lib/libtcl8.4.so=20 libdl.so.2 =3D> /lib/libdl.so.2=20 libgcc_s.so.1 =3D> /lib/libgcc_s.so.1=20 libm.so.6 =3D> /lib/libm.so.6=20 libc.so.6 =3D> /lib/libc.so.6=20 libz.so.1 =3D> /lib/libz.so.1=20 libcrypt.so.1 =3D> /lib/libcrypt.so.1=20 libpthread.so.0 =3D> /lib/libpthread.so.0=20 /lib/ld-linux.so.2=20 This one does not work (" undefined symbol: PQsetdbLogin"), because of libp= q=20 et. al. missing. If I compare it with this working driver (and I simpy can't tell anymore w= hat=20 I made different with that one): (ignore the "not found" messages as I don't set the LD_LIBRARY_PATH, but th= is=20 driver works then): linux-gate.so.1 =3D> =20 libnsdb.so =3D> not found libpq.so.4 =3D> /usr/lib/libpq.so.4=20 libnsthread.so =3D> not found libnsd.so =3D> not found libtcl8.4.so =3D> /usr/lib/libtcl8.4.so=20 libdl.so.2 =3D> /lib/libdl.so.2=20 libcrypt.so.1 =3D> /lib/libcrypt.so.1=20 libz.so.1 =3D> /lib/libz.so.1=20 libgcc_s.so.1 =3D> /lib/libgcc_s.so.1=20 libm.so.6 =3D> /lib/libm.so.6=20 libc.so.6 =3D> /lib/libc.so.6=20 libssl.so.0.9.8 =3D> /usr/lib/libssl.so.0.9.8=20 libcrypto.so.0.9.8 =3D> /usr/lib/libcrypto.so.0.9.8=20 libkrb5.so.3 =3D> /usr/lib/libkrb5.so.3=20 libresolv.so.2 =3D> /lib/libresolv.so.2=20 libnsl.so.1 =3D> /lib/libnsl.so.1=20 libpthread.so.0 =3D> /lib/libpthread.so.0=20 /lib/ld-linux.so.2=20 libk5crypto.so.3 =3D> /usr/lib/libk5crypto.so.3=20 libcom_err.so.2 =3D> /lib/libcom_err.so.2=20 libkrb5support.so.0 =3D> /usr/lib/libkrb5support.so.0=20 Maybe it's something really simple to change? Something obvious? Bernd. |