4

I am making an attempt to install the program gnuplot version 5.0.1 on Ubuntu 14.04. For this, I made the following steps.

Steps to install Gnuplot.
1) Run 'sudo apt-get install libreadline-dev', necessary for the Lua installation to run properly.
2) Download Lua.
3) In the Lua root directory, run 'make linux'.
4) In the Lua root directory, run 'make test'.
5) In the Lua root directory, run 'make install'.
6) Download gnuplot.
7) In the gnuplot root directory, run './configure --with-lua=yes'.
8) In the gnuplot root directory, run 'make'.

In the last step, I get the errors

/GNUplot/Source/gnuplot-5.0.1/src/../term/lua.trm:288: undefined reference to `luaL_checkint'

and

/GNUplot/Source/gnuplot-5.0.1/src/../term/lua.trm:254: undefined reference to `luaL_checkint'

Googling on this error does not seem to give me any useful hits to solve the problem...

How can I solve this?

ADDITIONAL INFORMTATION, ON REQUEST OF the user lemonslice:

The output of ./configure --with-lua=yes: https://drive.google.com/file/d/0B_npknqRCNbCM09ua3ZlSjR1X0k/view?usp=sharing

Eric Carvalho
  • 55,573
Adriaan
  • 680
  • Can you put the output configure --with-lua=yes ? Especially the part with Lua libraries – lemonslice Aug 25 '15 at 16:39
  • We're sorry, but Ubuntu 14.10 is an end-of life product and is not supported any more, so it's off-topic here too. Please refer to https://help.ubuntu.com/community/Upgrades on how to upgrade. – Fabby Aug 25 '15 at 20:24
  • @Fabby. Okay. I will try with 14.04 LTS instead and see if I get the same error. Release 14.04 LTS is still supported, right? – Adriaan Aug 25 '15 at 22:38
  • Right, and what I'm running... Are you using the same /home partition when you reinstall? Or do you wipe everything and start from scratch? – Fabby Aug 25 '15 at 23:04
  • @Fabby. It's another computer and I wipe everything and start from scratch. – Adriaan Aug 26 '15 at 08:50
  • @Fabby. I am, unfortunately, getting the same error with 14.04 LTS. I will add the tag 14.04. Will this post be taking off hold? – Adriaan Aug 26 '15 at 09:04
  • Voted to re-open. – Fabby Aug 26 '15 at 21:05
  • @lemonslice I just put the output of ./configure --with-lua=yes there. – Adriaan Aug 27 '15 at 08:03
  • 1
    Check Line 3731: lua is not found. You should install lua libs from a debian package or add the location of the lua you have built from source to your PKG_CONFIG_PATH variable. – lemonslice Aug 27 '15 at 12:27
  • @lemonslice As I tried to explain with the steps I mentioned in my post, I most certainly did install lua ;). I downloaded it from http://www.lua.org/download.html. So I guess it might be the location of lua problem you mentioned. I'll try to solve this, but I, unfortunately, do not have a lot experience with stuff like that. Could you perhaps be more specific in what exactly I should add to PKG_CONFIG_PATH and how? Thanks! – Adriaan Aug 27 '15 at 13:12
  • @lemonslice I installed Lua 5.3.1. In the config.log it says I need the file lua.pc, but it didn't come with the lua-5.3.1.tar.gz. Supposedly, the lua.pc is in the corresponding development files, but I cannot find the Lua 5.3.1 development files on the Lua website. – Adriaan Aug 27 '15 at 13:40
  • 1
    It is missing from the download (cf. http://lua-users.org/lists/lua-l/2012-02/msg00814.html), you might want to stick to some pre-packaged lua version that provides the .pc file (as liblualib-dev). – lemonslice Aug 27 '15 at 16:01
  • @lemonslice The liblualib-dev does not exist. I installed liblua5.2-dev and I still have the same problem :(. But I think that on lua-users.org/lists/lua-l/2012-02/msg00814.html they say that as of version 5.2, lua.pc is dropped. I'll try to install an older version then. Guess gnuplot is not exactly using the latest version of lua yet :(. – Adriaan Aug 27 '15 at 22:26
  • @lemonslice Installing liblua5.1-0-dev also didn't help. Still get the same error. – Adriaan Aug 27 '15 at 22:32
  • What is wrong with the gnuplot that is already in the repos? Why not apt-get install gnuplot?? – chicks Sep 04 '15 at 11:49
  • @chicks I want to use the latest features of gnuplot 5.0.1. The version offered with apt-get install gnuplot is unfortunately an older version. To be more precise, I see it's version 4.6.4-2 at this time. – Adriaan Sep 07 '15 at 10:27
  • Even Ubuntu 15.04 only has 4.6.6. RHEL7 is also on 4.6, but Fedora 22 has gnuplot 5. Try installing Fedora 22. :) – chicks Sep 07 '15 at 13:13

1 Answers1

3

I incur the same problem as you.

It appears that the gnuplot-5.0.1 is not Lua 5.3-compatible. It uses luaL_checkint, but Lua 5.3 is using luaL_checkinteger. You need to update the Gnuplot-5.0.1 file term/lua.trm as follows:

254       //t_num = luaL_checkint(L, 1);
255       t_num = luaL_checkinteger(L, 1); 
…
289       //t_num = luaL_checkint(L, 1);
290       t_num = luaL_checkinteger(L, 1);

Then, make and make install. It's OK in my Ubuntu 14.04

miaomao
  • 31