Personal computing discussed

Moderators: SecretSquirrel, notfred

 
Kreshna Aryaguna Nurzaman
Gerbil XP
Topic Author
Posts: 406
Joined: Mon Apr 11, 2005 2:05 am

./configure cannot find certain .so file

Tue Nov 17, 2009 8:40 am

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


Yet I keep getting this error message:
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:
#!/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:
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?
 
notfred
Maximum Gerbil
Posts: 4198
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: ./configure cannot find certain .so file

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.
 
Kreshna Aryaguna Nurzaman
Gerbil XP
Topic Author
Posts: 406
Joined: Mon Apr 11, 2005 2:05 am

Re: ./configure cannot find certain .so file

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. :(
 
bthylafh
Grand Gerbil Poohbah
Posts: 3716
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: ./configure cannot find certain .so file

Tue Nov 17, 2009 9:31 pm

Have you tried running ldconfig to refresh your system's idea of which libraries exist?
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Kreshna Aryaguna Nurzaman
Gerbil XP
Topic Author
Posts: 406
Joined: Mon Apr 11, 2005 2:05 am

Re: ./configure cannot find certain .so file

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++.
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?
 
bthylafh
Grand Gerbil Poohbah
Posts: 3716
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: ./configure cannot find certain .so file

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?
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
just brew it!
Gold subscriber
Administrator
Posts: 44587
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: ./configure cannot find certain .so file

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).
The years just pass like trains. I wave, but they don't slow down.
-- Steven Wilson
 
Nitrodist
Grand Gerbil Poohbah
Posts: 3281
Joined: Wed Jul 19, 2006 1:51 am
Location: Minnesota

Re: ./configure cannot find certain .so file

Wed Nov 18, 2009 6:22 pm

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

Re: ./configure cannot find certain .so file

Thu Nov 19, 2009 4:44 pm

Well? Was the issue resolved?
Image
 
just brew it!
Gold subscriber
Administrator
Posts: 44587
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: ./configure cannot find certain .so file

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.
The years just pass like trains. I wave, but they don't slow down.
-- Steven Wilson

Who is online

Users browsing this forum: No registered users and 1 guest