Thread: readline library not found
I am attempting to build postgresql from source because there is a clear need on our system to place the directories in the default location, /usr/local/pgsql, while my distro places them in /var/lib. Strictly a matter of disc array management. The config is straightforward: ./configure \ --without-docdir \ --with-libs=/usr/local/lib --with-includes=/usr/local/include/readline \ --with-pgport=5432 \ --with-openssl This results in one error: 'readline library not found', even 'though I specified the directories for readlines libraries and includes. In /usr/local/lib are: libreadline.a libreadline.so -> libreadline.so.5 libreadline.so.5 -> libreadline.so.5.2 libreadline.so.5.2 In 'Beginning PHP and PostgreSQL 8' there is mention of a possible problem with this, which was why I specified the directories. If I configure --without-readline, things are quite 'happy'. Guess this is so obvious i can't see the forest for the trees. Anyone able to point me in a better direction? GJW
You need the readline-dev package, not just readline... Don't worry, I did the same thing once :) THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.
"G. J. Walsh" <gjwalsh@dscdirectionalservices.com> writes: > ./configure \ > --without-docdir \ > --with-libs=/usr/local/lib > --with-includes=/usr/local/include/readline \ > --with-pgport=5432 \ > --with-openssl > This results in one error: 'readline library not found', even 'though I > specified the directories for readlines libraries and includes. > In /usr/local/lib are: > libreadline.a > libreadline.so -> libreadline.so.5 > libreadline.so.5 -> libreadline.so.5.2 > libreadline.so.5.2 Looks like it should work. Look into config.log to see exactly what errors the linker reported when doing the trial link. (This will be some ways above the end of the file, because configure spits out values of all its internal variables before failing.) regards, tom lane
I thought i had this fixed when I added libreadline5-devel. That worked for the other problem with zlib. So, following Tom Lanes' suggestion, I read through the 1300+ lines of the config.log and found this: configure:6651 checking for -lreadline /usr/lib/gcc/i586-mandriva-linux-gnu/4.2.2/../../../libreadline.so: undefined reference to 'PC' 'tgetflag''tgetext' etc etc ... So it does not like Mandriva's package. I downloaded readline source from cwru.edu and installed it. What that did was add libreadline to /usr/local/lib. But the postgresql configure shows no change, regardless of which library directory I specify (or none, for that matter). I could remove the mandriva package, but that would involve breaking relationships with some 40 packages. Seems a bit of overkill. Probabaly it is best to do without readline. Seventeen hours on this one situation is verging on the insane. If ONLY Mandriva used /usr/local/pgsql rather than /var/lib/pgsql, I would have been in business. There are hundreds of google references to this so there has to be some underlying problem which I am not aware of and therefore cannot really address. Thanks for attempting to address my frustration.That is appreciated, really! George
"G. J. Walsh" <gjwalsh@dscdirectionalservices.com> writes: > So, following Tom Lanes' suggestion, I read through the 1300+ lines of > the config.log and found this: > configure:6651 checking for -lreadline > /usr/lib/gcc/i586-mandriva-linux-gnu/4.2.2/../../../libreadline.so: > undefined reference to 'PC' 'tgetflag''tgetext' etc etc ... This is expected, actually. readline normally depends on another library or two, typically termcap or ncurses. If you look further down you should see configure trying a few combinations of libraries. On a Linux system I'd expect -lreadline -ltermcap to be the right magic incantation; maybe you are missing termcap, or maybe Mandriva uses some weird nonstandard support library. Try looking into the documentation for the readline package to see if you can find out what. regards, tom lane
Mandriva (my distro) updated PostgreSQL last night on Cooker. I spent some time last night reshuffling directories in may arrays so as to locate postgresql's backup and data directories on their own drive surface. That done, postgresql installed beautifully, so my attempt at work arounds is no longer necessary and I can get on with creating the new tables and loading them. I learned a lot of the inner mechanics of things with the pointers I received from both Phil and Tom - for which I am grateful - but I have to get my priorities straight. I have a lot yet to do to have the site fully functional with the first of the coming year. George