change

MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a

to

MODLIBS = -lnsdb -L/opt/pgsql8.2.11/lib -lpq


Bernd Eidenschink wrote:
> I'm cursed. I never can compile a postgres driver for naviserver
> from scratch.
> 
> Here's my tale - maybe you can hint me to an obvious mistake:
> 
> I compiled a Postgres 8.2.11 from source into
> /opt/pgsql8.2.11
> 
> Then I checked out /modules/nsdbpg.
> 
> I changed in the Makefile the line
> MODLIBS    = -lnsdb -lpq
> 
> to
> MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a
> 
> and started make with the line
> make NAVISERVER=/usr/local/ns 
> CFLAGS="-I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
> -I/usr/local/ns/include"
> 
> It compiles. The only output is:
> gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
>   -c -o 
> nsdbpg.o nsdbpg.c
> gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
>   -c -o 
> tclcmds.o tclcmds.c
> tclcmds.c: In function ‘stream_actually_write’:
> tclcmds.c:830: warning: ‘Ns_ConnWrite’ is deprecated (declared 
> at /usr/local/ns/include/ns.h:1111)
> /bin/rm -Rf nsdbpg.so
> gcc -shared -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
> -I/usr/local/ns/include  -L/usr/local/ns/lib -o 
> nsdbpg.so nsdbpg.o 
> tclcmds.o  -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a 
> -lnsthread -lnsd -L/usr/local/ns/lib -ltcl8.4 -ldl -lgcc_s  -lieee -lm  
> -Wl,--export-dynamic  -L/usr/local/ns/lib -Wl,-rpath,:/usr/local/ns/lib
> 
> So this warning about Ns_ConnWrite - ignored.
> 
> No doing a "ldd nsdbpg.so"
> returns
> 
> linux-gate.so.1 =>  (0xb7fce000)
> libnsthread.so => /usr/local/ns/lib/libnsthread.so (0xb7fbe000)
> libnsd.so => /usr/local/ns/lib/libnsd.so (0xb7f46000)
> libtcl8.4.so => /usr/local/ns/lib/libtcl8.4.so (0xb7e90000)
> libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e87000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e7c000)
> libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7e57000)
> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d08000)
> libz.so.1 => /usr/lib/libz.so.1 (0xb7cf2000)
> libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7cc0000)
> libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7ca8000)
> /lib/ld-linux.so.2 (0xb7fcf000)
> 
> 
> Hm. On another server "libpq" and "libnsdb" come up,
> missing here.
> 
> When trying to run naviserver, called from my startscript
> with an exported LD_LIBRARY_PATH of
> 
> export 
> LD_LIBRARY_PATH=/usr/local/ns/lib:/usr/local/ns/lib/xotcl1.6.2:/usr/local/ns/bin:/opt/pgsql8.2.11/lib:/usr/local/lib
> 
> including the postgres directory, I get:
> 
> [21/Nov/2008:18:23:52][5641.b7c426b0][-main-] Error: 
> modload: /usr/local/ns/bin/nsdbpg.so: couldn't load 
> file "/usr/local/ns/bin/nsdbpg.so": /usr/local/ns/bin/nsdbpg.so: undefined 
> symbol: PQsetdbLogin
> 
> Can you help me, Veronica Mars?
> 
> Bernd.
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to