Thread: 7.1.3 configure failure on Solaris 2.6
Hi,
Not sure if this address is for configure problems or only compile (make) trouble, but here goes...
I'm trying to build 7.1.3 on Solaris 2.6 with gcc 2.95.3. The process is failing when configure tries to run a test program. PG 7.1 was previously installed on this box but I wiped that installation clean since it had not been used. Another administrator (more experienced than I) did the previous install. I have successfully compiled and installed php 4.0.6 today on this server with the same compiler.
The current attempts fail with the following messages:
checking test program... failed
configure: error:
*** Could not execute a simple test program. This may be a problem
*** related to locating shared libraries. Check the file 'config.log'
*** for the exact reason.
#
configure: error:
*** Could not execute a simple test program. This may be a problem
*** related to locating shared libraries. Check the file 'config.log'
*** for the exact reason.
#
I have run this several times. First used some configure flags that I read were good for performance while prepping for the php compile (CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -fno-exceptions"), along with some PG options that I wanted to have available (--enable-odbc --with-openssl --enable-syslog). Then I dropped the flags and options to a straight ./configure (removing config.log and config.cache for each attempt).
Reading through the config.log file, I saw that the first sign of trouble showed a possible issue with readline missing, so I installed that. First installed it as a package, which generated a slightly different set of errors in config.log. I then removed that package and installed readline from source, which led to another slightly different set of config.log errors.
I have put copies of the config.log files for a few of the configure attempts on the web for diagnostic access.
See:
The latest configure session text is available at:
I suspect that the real problem is related to libraries that are missing or are not accessible, like libcompat.*. Not sure where those should be, what paths to set in which parameters, or where to get the libraries if they are in fact missing. (First would need to be able to figure out which ones are missing. This configure program and its log don't make that clear, but then I'm new at this.)
Thanks for any help - am a novice at building and compiling and even more of a newbie with Postgresql.
Best,
David De Graff
"David De Graff" <postgresql@awarehouse.com> writes: > I'm trying to build 7.1.3 on Solaris 2.6 with gcc 2.95.3. The process is fa= > iling when configure tries to run a test program. configure:6797: checking test program configure:6806: gcc -o conftest conftest.c -lz -lresolv -lgen -lnsl -lsocket -ldl -lm -lreadline -ltermcap 1>&5 configure: failed program was: #line 6802 "configure" #include "confdefs.h" int main() { return 0; } Hmm, that's not very helpful. On some systems it seems that configure's habit of redirecting stdout and stderr with wild abandon causes useful error messages to end up in the bit bucket. Try doing it by hand to see what error you get, ie, $ cat conftest.c int main() { return 0; } $ gcc -o conftest conftest.c -lz -lresolv -lgen -lnsl -lsocket -ldl -lm -lreadline -ltermcap If that seems to work try $ ./conftest $ echo $? regards, tom lane
"David De Graff" <postgresql@awarehouse.com> writes: > Here's what I got: > # ./conftest > ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory Yup. So what you've got here is a situation where the linker found libz.so, but it doesn't get found by the dynamic loader. This sort of configuration error is unfortunately common, because the search rules are all-too-often different for the two programs. You probably need to make sure that LD_LIBRARY_PATH is set to include /usr/local/lib. I'm not sure that's exactly the right recipe for Solaris, however. > By the way, the path for the user running the compile is: > # $PATH > ksh: > /usr/local/qt/bin:/usr/bin:/usr/local/bb/bin:/usr/ucb:/etc:/usr/local/bin:/u > sr/local/sbin:/usr/sbin:/usr/openwin/bin:/usr/ccs/bin:/usr/local/lib:/usr/sh > are/lib/terminfo:/usr/local/mysql/bin: not found Next time try # echo $PATH What you tried to do was execute a program named the same as your path. regards, tom lane
Tom, Thanks much. It was indeed an issue with LD_LIBRARY_PATH. I hadn't realized that when I sudo'd to root my environment variables did not come along for the ride. Also needed to add a few paths to that variable. Best, David De Graff ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "David De Graff" <postgresql@awarehouse.com> Cc: <pgsql-ports@postgresql.org> Sent: Monday, November 26, 2001 3:58 PM Subject: Re: [PORTS] 7.1.3 configure failure on Solaris 2.6 > "David De Graff" <postgresql@awarehouse.com> writes: > > Here's what I got: > > > # ./conftest > > ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory > > Yup. So what you've got here is a situation where the linker found > libz.so, but it doesn't get found by the dynamic loader. This sort of > configuration error is unfortunately common, because the search rules > are all-too-often different for the two programs. You probably need to > make sure that LD_LIBRARY_PATH is set to include /usr/local/lib. > I'm not sure that's exactly the right recipe for Solaris, however. > > > By the way, the path for the user running the compile is: > > > # $PATH > > ksh: > > /usr/local/qt/bin:/usr/bin:/usr/local/bb/bin:/usr/ucb:/etc:/usr/local/bin:/u > > sr/local/sbin:/usr/sbin:/usr/openwin/bin:/usr/ccs/bin:/usr/local/lib:/usr/sh > > are/lib/terminfo:/usr/local/mysql/bin: not found > > Next time try > # echo $PATH > What you tried to do was execute a program named the same as your path. > > regards, tom lane
Thanks for the quick help, Tom. Here's what I got: >> # more conftest.c int main() {return 0;} # gcc -o conftest conftest.c -lz -lresolv -lgen -lnsl -lsocket -ldl -lm -lreadline -ltermcap # ls conftest conftest.c # ./conftest ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory Killed # echo $? 137 # find /* -name libz.so /usr/local/lib/libz.so # << By the way, the path for the user running the compile is: # $PATH ksh: /usr/local/qt/bin:/usr/bin:/usr/local/bb/bin:/usr/ucb:/etc:/usr/local/bin:/u sr/local/sbin:/usr/sbin:/usr/openwin/bin:/usr/ccs/bin:/usr/local/lib:/usr/sh are/lib/terminfo:/usr/local/mysql/bin: not found Maybe the solution should be clear, but again I'm still climbing the Unix admin learning curve. There's something odd with the 'not found' at the end of hte PATH value, and with the trailing colon. That colon is not in the PATH value in .profile. Any ideas? Best, David De Graff