Thread: readline library not found
Dear List I need to build a postgres on a linux machine that I don't have root access. I built readline from source and installed it with prefix of /home/me/local readline library are in /home/me/local/lib and headers files are in /home/me/local/include/readline After explicitly specfying these paths with --with-libs and with-includes postgres configure is still choking on readline. To check that this should work, I disabled readline with --without-readline and configure chokes at zlib not found. So I install zlib from source at the same prefix. This time postgres configure finishes and then successfully built. reading config.log is not helpful Now if this solution works for zlib why is it not working for readline? thanks
zhong ming wu <mr.z.m.wu@gmail.com> writes: > I need to build a postgres on a linux machine that I don't have root access. > I built readline from source and installed it with prefix of /home/me/local If you don't have root you're going to be in for a lot of pain here. Linux is not designed to be friendly to libraries that aren't installed in the path defined by /etc/ld.so.conf. Can't you just install readline as prepackaged by your distro? > Now if this solution works for zlib why is it not working for readline? It isn't working for zlib either ... if you look closely, I'll bet lunch you find you're linking to the standard copy of zlib. regards, tom lane
zhong ming wu wrote: > After explicitly specfying these paths with --with-libs and > with-includes postgres configure is still choking > on readline. > Doing this is painful, but one hack you can try is pointing: export LD_LIBRARY_PATH=/home/me/local/lib I've used that combined with setting --with-libs and --with-includes before to get a PostgreSQL build with libedit working in a non-root account, and that library is similar to readline. If that doesn't work you might have to adjust LDFLAGS instead, and that's no fun at all. This is not a simple thing to pull off. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us
On Thu, Apr 15, 2010 at 10:22 PM, zhong ming wu <mr.z.m.wu@gmail.com> wrote:
Dear List
I need to build a postgres on a linux machine that I don't have root access.
I built readline from source and installed it with prefix of /home/me/local
readline library are in /home/me/local/lib and headers files are in
/home/me/local/include/readline
After explicitly specfying these paths with --with-libs and
with-includes postgres configure is still choking
on readline.
To check that this should work, I disabled readline with
--without-readline and configure chokes at zlib not found.
So I install zlib from source at the same prefix. This time postgres
configure finishes and then successfully built.
reading config.log is not helpful
Huh? This I find hard to believe. Whenever I've had problems with readline it was actually libtermcap that was giving me a headache. Are you sure that there's nothing in there that's pointing you to your libtermcap being .... 'wonky'
Also, try setting CFLAGS to point to your include / lib dirs (-I/path/to/include) (-L/path/to/lib)
Now if this solution works for zlib why is it not working for readline?
thanks
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Scott Mead <scott.lists@enterprisedb.com> writes: > Huh? This I find hard to believe. Whenever I've had problems with readline > it was actually libtermcap that was giving me a headache. Are you sure that > there's nothing in there that's pointing you to your libtermcap being .... > 'wonky' I think he's confusing what happens at compile and link time (where -I and -L do make a difference) with what happens at run time (where these switches do *not* make a difference, at least not on Linux). regards, tom lane
On Fri, Apr 16, 2010 at 10:36 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Scott Mead <scott.lists@enterprisedb.com> writes:I think he's confusing what happens at compile and link time (where -I
> Huh? This I find hard to believe. Whenever I've had problems with readline
> it was actually libtermcap that was giving me a headache. Are you sure that
> there's nothing in there that's pointing you to your libtermcap being ....
> 'wonky'
and -L do make a difference) with what happens at run time (where these
switches do *not* make a difference, at least not on Linux).
Right, I've had issues during compile time with a scenario similar to this, where I ended up solving it by setting CFLAGS before compiling it. The configure script (at some point) was picking the new readline, but missing some other termcap dependency when trying to compile the test program. ---
--Scott
regards, tom lane