Thread: 9.0.4 run configure failed with readline enable on susu linux x86-64
./configure --prefix=/data/pgsql --with-includes=/data/readline/include --with-libraries=/data/readline/lib failed with: ... checking for the pthreads library -lpthread... yes checking whether pthreads work with --thread-safe... no checking whether pthreads work with -mt... no checking for the pthreads library -lpthreadGC2... no checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for strerror_r... yes checking for getpwuid_r... yes checking for gethostbyname_r... yes checking whether getpwuid_r takes a fifth argument... yes checking whether strerror_r returns int... no 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. and the config.log has not meanful message: ... #define HAVE_SIGSETJMP 1 #define HAVE_DECL_SYS_SIGLIST 1 #define HAVE_SYSLOG 1 #define HAVE_INT_OPTERR 1 #define HAVE_STRTOLL 1 #define HAVE_STRTOULL 1 #define HAVE_ATEXIT 1 #define HAVE_STRERROR_R 1 #define HAVE_GETPWUID_R 1 #define HAVE_GETHOSTBYNAME_R 1 #define GETPWUID_R_5ARG /**/ configure: exit 1 but if run configure without any args,it error with: ... checking for -lreadline... no checking for -ledit... no configure: error: readline library not found If you have readline already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-readline to disable readline support. if --without-readline,configure runs OK how can i configure pg with readline? uname -a Linux 2.6.16.60-0.21-xxx64-100515 #1 SMP Wed May 12 11:46:34 CST 2010 x86_64 x86_64 x86_64 GNU/Linux
On 16/08/2011 5:16 PM, Jov wrote: > but if run configure without any args,it error with: > ... > checking for -lreadline... no > checking for -ledit... no > configure: error: readline library not found > If you have readline already installed, see config.log for details on the > failure. It is possible the compiler isn't looking in the proper directory. > Use --without-readline to disable readline support. > > if --without-readline,configure runs OK > > how can i configure pg with readline? > You'll find that there's a -dev or -devel package for readline that you need to install. -- Craig Ringer
Thanks for your reply.I have installed readline from src without default prefix because i have no privelege install lib to /usr, there are include header files and libreadline*.a and also .so installed,so I think it is dev package,right?
在 2011-8-16 下午8:01,"Craig Ringer" <ringerc@ringerc.id.au>写道:
> On 16/08/2011 5:16 PM, Jov wrote:
>> but if run configure without any args,it error with:
>> ...
>> checking for -lreadline... no
>> checking for -ledit... no
>> configure: error: readline library not found
>> If you have readline already installed, see config.log for details on the
>> failure. It is possible the compiler isn't looking in the proper directory.
>> Use --without-readline to disable readline support.
>>
>> if --without-readline,configure runs OK
>>
>> how can i configure pg with readline?
>>
>
> You'll find that there's a -dev or -devel package for readline that you
> need to install.
>
> --
> Craig Ringer
> On 16/08/2011 5:16 PM, Jov wrote:
>> but if run configure without any args,it error with:
>> ...
>> checking for -lreadline... no
>> checking for -ledit... no
>> configure: error: readline library not found
>> If you have readline already installed, see config.log for details on the
>> failure. It is possible the compiler isn't looking in the proper directory.
>> Use --without-readline to disable readline support.
>>
>> if --without-readline,configure runs OK
>>
>> how can i configure pg with readline?
>>
>
> You'll find that there's a -dev or -devel package for readline that you
> need to install.
>
> --
> Craig Ringer
Jov <zhao6014@gmail.com> writes: > ./configure --prefix=/data/pgsql > --with-includes=/data/readline/include > --with-libraries=/data/readline/lib > failed with: > ... > 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. > and the config.log has not meanful message: Yes it does, you just didn't show it to us. The config.log file will end with several hundred lines showing configure's current variable values and #defines, but those are rarely very useful. What you do want to look at is the trace of the failed test ("checking test program"), which will be right before those two lists. > but if run configure without any args,it error with: > ... > checking for -lreadline... no > checking for -ledit... no > configure: error: readline library not found Well, yeah, since your readline library is in a nonstandard place. (Since this is a Linux system, I'll bet that the underlying problem is that you didn't add /data/readline/lib to the ldconfig configuration. Linux doesn't really like libraries in nonstandard places. But why are you using a homebrew readline build at all? Your distro has certainly got that available prepackaged.) regards, tom lane