Re: gnuplot not linked against readline ?
Markus.Grunwald@pruftechnik.com wrote:
Hello,
While working with a debian testing machine, I recognized that most of the
cursor keys don't work in gnuplot: home/end give me a 7~/8~, up/down does
nothing and tab in filenames doesn't work either.
a "ldd /usr/bin/gnuplot" tells me, that gnuplot is not linked against
libreadline, so it uses its own, quite limited "readline" functions.
I think, gnuplot is _very_ hard to handle like this. Is there a reason,
why debians gnuplot is not linked against readline? I personally think,
this is a bug...
Simply put - it has to do with licensing issues.More detailed
explanation is given in /usr/share/doc/gnuplot/README.Debian. An extract
from this file is
libreadline
-----------
Yes, the built in readline of gnuplot is bad. However, libreadline
cannot be used instead because it is licensed under the GPL, whereas
gnuplot has special licenses (patches only). Linking those programs
together is forbidden by the GPL. Please don't file bugs telling me to
use libreadline in gnuplot...
However, you can compile gnuplot from the source packages and get the
readline support. It is very easy to do and the instructions are given
below.
#add the following or similar entry into the /etc/apt/sources.list
deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free
sudo apt-get install cl-readline libreadline5 tclreadline
make sure that libreadline*-dbg and libreadline*-dev are also installed.
sai build-essential libgd2-noxpm-dev
sudo apt-get build-dep gnuplot
cd to the directory where you want to download the sources
sudo apt-get source gnuplot
cd gnuplot-4.0.0/debian/
# Edit the file named "rules" and change
--without-gnu-readline
TO
--with-readline=gnu
# Enable the history file by adding
--enable-history-file
cd ..
become root
dpkg-buildpackage
cd ..
# ls gnuplot*deb*
gnuplot_4.0.0-2_all.deb gnuplot-doc_4.0.0-2_all.deb
gnuplot-nox_4.0.0-2_i386.deb gnuplot-x11_4.0.0-2_i386.deb
dpkg -i gnuplot*deb*
apt-cache showsrc gnuplot
Now you should be having gnuplot with readline and persistent history
support.
Let us know if you need more help.
raju
--
http://www.people.cornell.edu/pages/kk288/
Reply to: