~/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
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
~/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
--
If we can hit that bull's-eye, the rest of the dominoes will fall like a
house of cards... Checkmate! - Zapp. Brannigan
Rasputin :: Jack of All Trades - Master of Nuns
I don't think you did anything wrong. I had the same problem and the following solution worked for me:
Edit extconf.rb and set the CLAGS and LDFLAGS as this blog indicates
<http://blog.humlab.umu.se/samuel/archives/000019.html>
Jean-pierre
that was it alright. i was staring right at that and didn't see it - odd that
the default system install would be like that eh?
thanks a bunch.
-a
···
On Tue, 12 Oct 2004, Dick Davies wrote:
Just a guess, but is there a /usr/lib/libpq.so there (symlinked to the above
)? If not, try making one.
--
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
right - what i was getting at is that my postgresql install on this box is the
one that came with the system and i have not installed it. so either the
intial install is incorrect or something else strange happened. if history is
any indicator i probably messed it up somehow
Just a guess, but is there a /usr/lib/libpq.so there (symlinked to the
above
)? If not, try making one.
that was it alright. i was staring right at that and didn't see it - odd
that
the default system install would be like that eh?
Depends on the system
If it's a Linux you often need to run ldconfig to redo the links after
installing new software...
--
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
When you do something, you should burn yourself completely, like a good
bonfire, leaving no trace of yourself. --Shunryu Suzuki