|
From: Juhász P. <pet...@gm...> - 2011-02-18 18:15:37
|
Dear list, today I've tried to compile gnuplot (the cvs version) on a fresh Ubuntu 10.10 install. Setting up the necessary packages was relatively straightforward, but when I tried to compile, I've ran into a problem with the lua terminal. This issue is old (it's because Ubuntu calls the package "lua5.1" instead of plain "lua" and this confuses the configure script), there is already a notice about it in the INSTALL file. That notice says that one has to set up a symlink for the package descriptor file: ln -s /usr/lib/pkgconfig/lua5.1.pc /usr/lib/pkgconfig/lua.pc This used to be enough. However, the situation seemed to worsen since that notice was added. If the above symlink is in place, configure finds the package and enables the terminal. On the other hand, make fails, because the linker wants "-llua", and there is no library found by that name. Even an explicit "LUA_LIBS=-llua5.1" on configure's command line won't persuade the linker to find the correct library. (Or more precisely, the above assignment does insert the correct "-llua5.1" where needed, but the incorrect "-llua" is still there and that makes the linker choke.) As a workaround, one may set up a symlink for the library as well: ln -s /usr/lib/liblua5.1.so /usr/lib/liblua.so With this, the compilation goes smoothly. But fixing the configure/make files would be a better solution. An unrelated question: Is there a policy for keeping the gnuplot_date string in version.c current? Or it just gets bumped whenever there is a release? Péter Juhász |
|
From: Ethan A M. <sf...@us...> - 2011-02-18 18:40:11
|
On Friday, February 18, 2011 10:15:27 am Juhász Péter wrote: > Dear list, > > today I've tried to compile gnuplot (the cvs version) on a fresh Ubuntu > 10.10 install. Setting up the necessary packages was relatively > straightforward, but when I tried to compile, I've ran into a problem > with the lua terminal. > > This issue is old (it's because Ubuntu calls the package "lua5.1" > instead of plain "lua" and this confuses the configure script), there is > already a notice about it in the INSTALL file. That notice says that one > has to set up a symlink for the package descriptor file: > > ln -s /usr/lib/pkgconfig/lua5.1.pc /usr/lib/pkgconfig/lua.pc > > This used to be enough. However, the situation seemed to worsen since > that notice was added. If the above symlink is in place, configure finds > the package and enables the terminal. On the other hand, make fails, > because the linker wants "-llua", and there is no library found by that > name. Could you pursue this a little further, please? The whole idea of finding and executing /usr/lib/pkgconfig/lua5.1.pc is that it is supposed to add the correct -Lxxxx term to the linker flags. Is the library name wrong in /usr/lib/pkgconfig/lua5.1.pc, or are we failing to copy it correctly into the Makefiles, or what? Here is what the corresponding section of config.log looks like from a system where this is working correctly configure:9432: checking pkg-config is at least version 0.9.0 configure:9435: result: yes configure:9446: checking for LUA configure:9454: $PKG_CONFIG --exists --print-errors "lua" configure:9457: $? = 0 configure:9472: $PKG_CONFIG --exists --print-errors "lua" configure:9475: $? = 0 configure:9513: result: yes configure:9526: checking for library containing luaL_openlibs configure:9557: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib -Wl,-z,relro -Wl,-O1 -L/usr/lib conftest.c -lm -llua -lm >&5 configure:9557: $? = 0 configure:9574: result: none required > An unrelated question: > Is there a policy for keeping the gnuplot_date string in version.c > current? Or it just gets bumped whenever there is a release? I think it gets bumped whenever Petr notices it is out of date :-) |
|
From: Juhász P. <pet...@gm...> - 2011-02-18 20:12:04
|
On Fri, 2011-02-18 at 10:38 -0800, Ethan A Merritt wrote: > On Friday, February 18, 2011 10:15:27 am Juhász Péter wrote: > > Dear list, > > > > today I've tried to compile gnuplot (the cvs version) on a fresh Ubuntu > > 10.10 install. Setting up the necessary packages was relatively > > straightforward, but when I tried to compile, I've ran into a problem > > with the lua terminal. > > > > This issue is old (it's because Ubuntu calls the package "lua5.1" > > instead of plain "lua" and this confuses the configure script), there is > > already a notice about it in the INSTALL file. That notice says that one > > has to set up a symlink for the package descriptor file: > > > > ln -s /usr/lib/pkgconfig/lua5.1.pc /usr/lib/pkgconfig/lua.pc > > > > This used to be enough. However, the situation seemed to worsen since > > that notice was added. If the above symlink is in place, configure finds > > the package and enables the terminal. On the other hand, make fails, > > because the linker wants "-llua", and there is no library found by that > > name. > > Could you pursue this a little further, please? > > The whole idea of finding and executing /usr/lib/pkgconfig/lua5.1.pc > is that it is supposed to add the correct -Lxxxx term to the linker flags. > Is the library name wrong in /usr/lib/pkgconfig/lua5.1.pc, or are we > failing to copy it correctly into the Makefiles, or what? The root of the problem may be found in configure.in. Provided that the symlink for the .pc file is in place, the section responsible for checking lua (lines 690-703 in configure.in) will find the correct library name. But then there is a second test for luaL_openlibs (I don't even know what that is), and that section has the library name "-llua" hardwired. (line 711) In practice this means that the variable LUA_LIBS will be set to "-llua" even if it was explicitly overridden on the command line. It seems to me that that section in configure.in should be revised: it shouldn't rewrite LUA_LIBS if it already has a sensible value. Péter Juhász |