Personal computing discussed

Moderators: renee, 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: 4610
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
Maximum Gerbil
Posts: 4320
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!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
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
Maximum Gerbil
Posts: 4320
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!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
just brew it!
Administrator
Posts: 54500
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).
Nostalgia isn't what it used to be.
 
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!
Administrator
Posts: 54500
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.
Nostalgia isn't what it used to be.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On