From: "Ara.T.Howard" Date: 2004-10-12T03:24:38+09:00 Subject: postgresql compilation problem am i doing something stupid here? ~/ruby-postgres-0.7.1 > ruby extconf.rb --with-pgsql-lib-dir=/usr/lib/ checking for cygwin32_socket() in -lwsock32... no checking for socket() in -lsocket... no checking for gethostbyname() in -linet... no checking for gethostbyname() in -lnsl... yes checking for sys/un.h... yes checking for socket()... yes checking for hsterror()... no checking for gethostname()... yes Using PostgreSQL lib directory: /usr/lib/ checking for PQsetdbLogin() in -lpq... no Could not find PostgreSQL libraries: Makefile not created ~/ruby-postgres-0.7.1 > strings /usr/lib/libpq.so.3 | grep PQsetdbLogin PQsetdbLogin from mkmf.log: have_library: checking for PQsetdbLogin() in -lpq... -------------------- no "gcc -o conftest -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux conftest.c -L"/usr/local/lib" -L/usr/lib/ -lnsl -lruby-static -lpq -lnsl -ldl -lcrypt -lm -lc" /usr/bin/ld: cannot find -lpq collect2: ld returned 1 exit status checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { PQsetdbLogin(); return 0; } /* end */ "gcc -o conftest -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/local/lib/ruby/1.8/i686-linux conftest.c -L"/usr/local/lib" -L/usr/lib/ -lnsl -lruby-static -lpq -lnsl -ldl -lcrypt -lm -lc" conftest.c: In function `t': conftest.c:5: `PQsetdbLogin' undeclared (first use in this function) conftest.c:5: (Each undeclared identifier is reported only once conftest.c:5: for each function it appears in.) checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { void ((*volatile p)()); p = (void ((*)()))PQsetdbLogin; return 0; } /* end */ -------------------- what's going on here? the linking flags (-L /usr/lib) should be picking up the lib - but seem not to? confused. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================