On 2012-02-11 19:53+0530 Atri wrote:

> Hi!
>
> I package plplot (version 5.9.9) for the Linux distribution openSUSE
> [1]. I have run into a problem with building plplot for openSUSE's
> factory (eventually this will become the next openSUSE release): the
> version of lua in factory is 5.2 [2], but plplot's lua bindings won't
> build with lua > 5.1. For now I have just disabled the lua bindings for
> factory. It seems to me that the cmake module for building the lua
> bindings check explicitly for versions of lua = 5.0 and 5.1. It might be
> useful to adapt this cmake module to accept any lua version >= 5.0. I
> have really little knowledge about cmake, but could help out with build
> testing etc. as the need be.

Hi Atri:

Lua-5.2 was released only in December so it will take a while for that
to propagate to most Linux distros.  For example, Debian is quite
conservative and only supports Lua-5.0 even in the unstable version
of Debian for some reason.

So the bad news is you will be somewhat on your own (i.e., the only
potential tester of Lua-5.2 with PLplot that I am aware of) for a
while, but the good news is the CMake build system should be really
easy to modify so that you can find and attempt to build and test
PLplot using Lua 5.2.

If you are interested further, here is what I suggest you do.

Copy the system version of
FindLua51.cmake (usually found in
/usr/share/cmake-2.8/Modules) to cmake/modules.

That copy operation assures that the PLplot system will use the
version of FindLua51.cmake in cmake/modules rather than
the system one.

Then edit the PLplot version as follows:

Wherever there is a reference to Lua 5.1 put in additional 5.2 choices
first.

That is:

PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include

==>

PATH_SUFFIXES include/lua52 include/lua5.2 include/lua51 include/lua5.1 
include/lua include


NAMES lua51 lua5.1 lua-5.1 lua

==>

NAMES lua52 lua5.2 lua-5.2 lua51 lua5.1 lua-5.1 lua

Leave

FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51 ...

as is since the 51 there refers to the name of the find module itself
which for now should continue to be cmake/modules/FindLua51.cmake.

I think the above two changes should be all the changes you need so
that the PLplot CMake-based build system will find the lua-5.2 library
and header files.

At that point, you will be in the interesting position of being able
test whether PLplot will work without further changes with lua-5.2. 
As far as I know, PLplot makes no distinctions between 5.0 and 5.1 so
I think 5.2 has a reasonable chance to work, but we won't know that
until you try it.

If your PLplot lua-5.2 build goes okay (with -DBUILD_TEST=ON cmake
option) with the above copy and edit of FindLua51.cmake, then please
also try run-time testing of our lua bindings using the following
command:

make test_lua_psc

which runs all our lua examples with -dev psc.

If that works without issues (i.e., the lua results in the examples
subdirectory of the build tree render okay with a PostScript viewer
like gv) I would be happy to copy your modified version of
FindLua51.cmake to PLplot so all PLplot/Lua-5.2 users can benefit.

Good luck, and let us know how it goes.

Also, thank you for supporting PLplot by packaging it
for openSUSE.

Alan

__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to