./configure cannot find certain .so file

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

./configure cannot find certain .so file

Postposted on Tue Nov 17, 2009 8:40 am

I'm compiling PostGIS with the following command:
Code: Select all
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config


Yet I keep getting this error message:
Code: Select all
configure: error: could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig


The problem is: libgeos_c.so does indeed exist in the /usr/local/lib/. Also, geos-config points to the right direction. Here is the first four lines of geos-config:
Code: Select all
#!/bin/sh
prefix=/usr/local
exec_prefix=${prefix}
libdir=/usr/local/lib


Furthermore, I have checked /etc/ld.so.conf, and /usr/local/lib exists in the file:
Code: Select all
include ld.so.conf.d/*.conf
/usr/local/lib
/usr/local/BerkeleyDB.4.7/lib

I also have run ldconfig ad nauseam.

By the way, I'm using PostGIS 1.4.0 and Geos 3.1.1. My linux version is CentOS release 4.2 (Final). What happens?
Kreshna Aryaguna Nurzaman
Gerbil XP
 
Posts: 394
Joined: Mon Apr 11, 2005 2:05 am

Re: ./configure cannot find certain .so file

Postposted on Tue Nov 17, 2009 9:20 am

Kreshna Aryaguna Nurzaman wrote:--with-geosconfig=/usr/local/bin/geos-config
you may need to specify the directory of a geos-config file using --with-geosconfig

Looks like it wants the directory and you are giving it the actual file.
notfred
Grand Gerbil Poohbah
 
Posts: 3712
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: ./configure cannot find certain .so file

Postposted on Tue Nov 17, 2009 9:14 pm

notfred wrote:
Kreshna Aryaguna Nurzaman wrote:--with-geosconfig=/usr/local/bin/geos-config
you may need to specify the directory of a geos-config file using --with-geosconfig

Looks like it wants the directory and you are giving it the actual file.

I have tried giving it the directory too, but still no dice. :(
Kreshna Aryaguna Nurzaman
Gerbil XP
 
Posts: 394
Joined: Mon Apr 11, 2005 2:05 am

Re: ./configure cannot find certain .so file

Postposted on Tue Nov 17, 2009 9:31 pm

Have you tried running ldconfig to refresh your system's idea of which libraries exist?
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3130
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: ./configure cannot find certain .so file

Postposted on Wed Nov 18, 2009 12:21 am

bthylafh wrote:Have you tried running ldconfig to refresh your system's idea of which libraries exist?

Yes, ad nauseam :( And /usr/local/lib/ folder, where libgeos_c.so resides, is already there in the /etc/ld.so.conf. I've also tried ldconfig -v and it didn't help either.

However, someone from postGIS mailing list told me to compile the sofware with LDFLAGS=-lstdc++.
Code: Select all
LDFLAGS=-lstdc++ ./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config

I tried, and then the whole compilation process went smoothly.

I still don't understand though: why? Why does it need LDFLAGS? What does it mean?
Kreshna Aryaguna Nurzaman
Gerbil XP
 
Posts: 394
Joined: Mon Apr 11, 2005 2:05 am

Re: ./configure cannot find certain .so file

Postposted on Wed Nov 18, 2009 12:25 am

Not sure, but my spidey sense tells me that the program's Makefile (or configure script) is broken. At any rate, there should have been a stanza in your Makefile that included those libs.

LDFLAGS is a set of arguments that get passed to your linker (ld) once compilation is done.

File a bug report?
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3130
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: ./configure cannot find certain .so file

Postposted on Wed Nov 18, 2009 12:30 am

Well, the LDFLAGS is forcing the linker to search the Standard C++ library in addition to any other libraries it may be searching. The fact that this application apparently needs something in the Standard C++ library but doesn't search it by default may be an indication that the Makefile is busted (as bthylafh indicated).
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37501
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: ./configure cannot find certain .so file

Postposted on Wed Nov 18, 2009 6:22 pm

Image
Nitrodist
Grand Gerbil Poohbah
 
Posts: 3280
Joined: Wed Jul 19, 2006 1:51 am
Location: Minnesota

Re: ./configure cannot find certain .so file

Postposted on Thu Nov 19, 2009 4:44 pm

Well? Was the issue resolved?
Image
Nitrodist
Grand Gerbil Poohbah
 
Posts: 3280
Joined: Wed Jul 19, 2006 1:51 am
Location: Minnesota

Re: ./configure cannot find certain .so file

Postposted on Thu Nov 19, 2009 5:47 pm

Nitrodist wrote:Well? Was the issue resolved?

Umm...

The OP said it was resolved, both in this thread and the one you linked.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37501
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 1 guest