LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-17-2009, 08:08 AM   #1
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Rep: Reputation: 15
Cannot find certain .so file, but it *exists* in /usr/local/lib/


I'm compiling PostGIS with the following command:
Code:
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config
Yet I keep getting this error message:
Code:
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:
#!/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:
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?
 
Old 11-17-2009, 09:29 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
The error message says "libgeos_c" not "libgeos_c.so". You might want to view the configure file to see for which file it is actually testing. It may simply be a typo in the configure file that you can manually edit.
 
Old 11-17-2009, 08:54 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,325

Rep: Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583
Postgis 1.4.0 : No problems, when /usr/local/lib/
is in the LD_LIBRARY_PATH. In CentOS4 : no.

Suggest : export LD_LIBRARY_PATH=/usr/local/lib/
or add /usr/local/lib/ to /etc/ld.so.conf

.. or ..
# yum search geos geos-devel
.. the epel repo has version 2.2.3
.. rpmforge.repo : 3.1.0

.. or : cd geos-3.1.1/
# make uninstall && exit
./configure --prefix=/usr/
.....

Last edited by knudfl; 11-18-2009 at 06:04 AM.
 
Old 11-19-2009, 12:33 AM   #4
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by knudfl View Post
Postgis 1.4.0 : No problems, when /usr/local/lib/
is in the LD_LIBRARY_PATH. In CentOS4 : no.

Suggest : export LD_LIBRARY_PATH=/usr/local/lib/
or add /usr/local/lib/ to /etc/ld.so.conf

.. or ..
# yum search geos geos-devel
.. the epel repo has version 2.2.3
.. rpmforge.repo : 3.1.0

.. or : cd geos-3.1.1/
# make uninstall && exit
./configure --prefix=/usr/
.....
Well I eventually managed to successfully compile postgis by using LDFLAGS=-lstdc++ ./configure. A helpful poster in postgis mailing list told me so, and I just followed his instruction. And everything compiled fine.

Yet I don't really have an idea what does it mean. Someone at TechReport said that LDFLAGS is forcing the linker to search the Standard C++ library in addition to any other libraries, but that's all he said. (sorry, I'm a noob)

(1) Is libgeos_c a standard C++ library? Probably it explains why ./configure failed to find the file, despite I have ran ldconfig ad nauseam.

(2) What is the drawback of using Standard C++ library? (LDFLAGS=-lstdc++)

(3) Is there any problem I have to anticipate in the future? I mean, during runtime?

(4) I will compile MapServer next week, which, by the way, need geos-3.1.1 as well. I have to specify --with-geosconfig=/usr/local/bin/geos-config again in ./configure. Will this problem persists? Should I use LDFLAGS=-lstdc++ ./configure again? Should I use LD_LIBRARY_PATH? But I read in Google that using LD_LIBRARY_PATH is asking for trouble, is that true?

[5](5)[/b]
Quote:
Originally Posted by knudfl View Post
Suggest : export LD_LIBRARY_PATH=/usr/local/lib/
or add /usr/local/lib/ to /etc/ld.so.conf
]
I have added /usr/local/lib to /etc/ld.so.conf, and I have run ldconfig many times. Why did it fail?
 
Old 11-19-2009, 01:05 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,325

Rep: Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583
Hard to say, why exactly it isn't working on CentOS4 only,
and I'm not going to install a later version of postgreql(-devel)
to find out.
..... .. ..
.....

When configure asks for "name" it never says "name".so

Asked for lgeos_c or libgeos_c it means libgeos_c.so
There is no file or library by name libgeos_c present.
The library "Real Name" is ' libgeos_c.so.1.5.0 '.
The " so name " is ' libgeos_c.so.1 '.
The file ' libgeos_c.so ' is a symlink to libgeos_c.so.1.5.0
used at compile / linking time only.
http://tldp.org/HOWTO/Program-Librar...libraries.html
3.1.1
.....

'libgeos_c.Xx', please see ' /geos-3.1.1/source/.libs '
( hidden file ).
.....

Last edited by knudfl; 11-19-2009 at 03:30 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/local/lib or /usr/local/lib64 rigelan Slackware 9 07-24-2009 07:32 PM
/usr/local/bin/modem_run ==>can't find that file freakske Linux - Software 2 11-06-2005 07:15 AM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 10:21 AM
/usr/lib and /usr/local/lib doxxan Slackware 5 06-15-2004 01:58 AM
no php.ini file under /usr/local/lib/ !! jogurt666 Linux - Software 1 12-16-2003 01:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration