LinuxQuestions.org
Review your favorite Linux distribution.
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 03-18-2017, 04:37 AM   #1
dusk2dawn
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Rep: Reputation: 0
compiling / sqlite3 / readline


sqlite3 is no longer served with readline included - leaving the arrow-keys unusable - so one has to roll ones own.

Never been much of a compiling wizard but I found and installed Gnu Readline library, version 7.0

which is now in

/usr/local/include/readline
/usr/local/share/readline
/usr/local/share/doc/readline
/usr/share/readline

Using gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2 the ./configure shows (among others) :
...
checking editline/readline.h usability... no
checking editline/readline.h presence... no
checking for editline/readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for library containing readline... no
...

readline is there ... but readline is no good - or?

What files / environment variables for readline are ./configure looking for?

Last edited by dusk2dawn; 03-18-2017 at 04:36 PM. Reason: Spelling
 
Old 03-18-2017, 10:35 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,918

Rep: Reputation: 176Reputation: 176
When compiling you always need the -dev package for the library you want to include in the program being compiled. The apt-file program will help you find the package needed to be install for a situation like yours.

Code:
:~$ apt-file search editline/readline.h
apt-file search editline/readline.h
libedit-dev: /usr/include/editline/readline.h
You need the libedit-dev package or that is how it is named in Debian install apt-file and see how it is named in Ubuntu.
 
Old 03-18-2017, 03:45 PM   #3
dusk2dawn
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks HT,

I found "libedit-dev: /usr/include/editline/readline.h" on my comp but what do I do with it?

Running
./configure --prefix=/usr/include/editline/readline.h or
./configure --includedir=/usr/include/editline/readline.h
still returns

checking editline/readline.h usability... no
checking editline/readline.h presence... no
checking for editline/readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for library containing readline... no

This new version of sqlite3 still won't use the arrow-keys:
sqlite> ^[[A^[[B^[[D^[[C

/Bjarne B Jensen

Last edited by dusk2dawn; 03-18-2017 at 04:36 PM. Reason: Add text
 
Old 03-18-2017, 05:56 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,918

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by dusk2dawn View Post
Thanks HT,

I found "libedit-dev: /usr/include/editline/readline.h" on my comp but what do I do with it?

/Bjarne B Jensen

If by found you mean it gave you the same output as it did me then that means the package you need to install is named the same. Once found you need to sudo apt-get install libedit-dev since you are using Ubuntu and root is most likely disabled. You will need to do this with any other libraries if not found as well, the apt-file is just a tool to tell you what package the missing file is in so you can install it for your use.
 
Old 03-19-2017, 04:38 AM   #5
dusk2dawn
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Uhhh .... I would never have guessed that it wasn't installed already.
Anyway, I have to leave this comp for a handful of days I promise I'll be back with any progress by then.

Thanks.
/Bjarne B Jensen
 
Old 03-19-2017, 12:39 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,918

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by dusk2dawn View Post
Uhhh .... I would never have guessed that it wasn't installed already.
Anyway, I have to leave this comp for a handful of days I promise I'll be back with any progress by then.

Thanks.
/Bjarne B Jensen
Easy enough to find out if it is installed or not.

Code:
:~$ apt-cache policy libedit-dev
apt-cache policy libedit-dev
libedit-dev:
  Installed: (none)
  Candidate: 3.1-20140620-2
  Version table:
     3.1-20140620-2 0
        500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
Edit: With a -dev package those are usually never installed especially when a configure is not finding the file it needs.

Last edited by HappyTux; 03-19-2017 at 12:41 PM.
 
Old 04-02-2017, 10:07 AM   #7
dusk2dawn
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Hi there again again...

Finally wify is busy with some family-matter so I had a little time to look at some of the files in the sqlite3 project.

configure --help revealed a line : "--enable-readline" which should, well, enable sqlite2 to use readline.

So I tried ./configure --enable-readline and the source-gods were in a good mood....: it worked! I now have arrow-key-functionality in sqlite3.


HappyTux, thanks for your guidance with the libraries - not a word about that in the configure helpfile.

Last edited by dusk2dawn; 04-02-2017 at 10:07 AM. Reason: spelling
 
  


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
Trouble compiling program using the readline library stf92 Programming 3 11-25-2013 12:06 AM
cross compiling sqlite3 for arm 7 processor maheshpawar49 Linux - Software 1 11-24-2010 05:19 PM
cross compiling sqlite3 for arm 7 processor maheshpawar49 Linux - Software 5 11-23-2010 11:45 PM
Cross Compiling Sqlite3 for ARM Issues. AuzJ Linux - Newbie 1 04-23-2009 05:32 PM
readline problem when compiling dark_forests Linux - Software 0 10-12-2003 04:13 PM

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

All times are GMT -5. The time now is 09:11 PM.

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
Open Source Consulting | Domain Registration