postgresql compilation problem

A

Ara.T.Howard

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
===============================================================================
 
D

Dick Davies

* Ara.T.Howard said:
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

Just a guess, but is there a /usr/lib/libpq.so there (symlinked to
the above )? If not, try making one.
 
A

Ara.T.Howard

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?

thanks a bunch.

-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
===============================================================================
 
D

Dick Davies

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...
 
A

Ara.T.Howard

Depends on the system :)

If it's a Linux you often need to run ldconfig to redo the links after
installing new software...

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 ;-)

thanks for the help.

-a
--
===============================================================================
| 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
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,245
Latest member
Evelyne64L

Latest Threads

Top