On 2009-01-26 10:47+0100 Werner Smekal wrote: >> * How do you run the examples? > > * Enable lua bindings with -DENABLE_lua=ON > * lua, lualib, lualiblib must be installed, plus developer packages > (Ubuntu/Debian) > * cd build-directory/bindings/lua (here you should find plplotluac.so) > * lua source-directory/examples/lua/x05.lua
I have committed a small change (revision 9410) so that the user who has set ENABLE_lua to ON has the HAVE_lua51 option available for building for lua-5.1 rather than lua-5.0. The HAVE_lua51 default is OFF (i.e., by default the build will proceed for lua-5.0). When I built for lua-5.0, the instructions above succeeded. Specifically, if I execute from the build-tree version of bindings/lua lua ../../../plplot_cmake/examples/lua/x05.lua -dev xwin I got the expected results. However, when I built for lua-5.1 and followed the same run-time instructions I got an error, e.g., softw...@raven> lua ../../../plplot_cmake/examples/lua/x05.lua -dev xwin lua: Table doesn't contain key 'n'. stack traceback: [C]: in function 'parseopts' ../../../plplot_cmake/examples/lua/x05.lua:23: in main chunk [C]: ? Probably you will want to concentrate on 5.0 for now, but at some point it would be nice to get 5.1 working as well for the current examples. Note, I have all required packages for lua5.0 and lua5.1 installed from Debian testing, and I use the update-alternatives Debian system script to symlink /usr/bin/lua to the correct lua version for the type of build I want to do. > Not perfect, but at least for lua 5.0 there is no easy way to tell lua where > the shared library is (apart from setting an absolut path in the source). I think we should solve that problem in a similar way to what we do for python. Every python example imports a file that is configured to tell it the absolute location of the required python modules. The file is configured differently depending if it is for the build tree or install tree version. For the Lua case, I suggest we include a file that is configured with the correct absolute location (build tree location for now) of plplotluac. A quick google search indicates there is something called "dofile" for including a file into a lua script. If you agree that is the right way to deal with this situation, I can do the rest to get lua example scripts that work from the examples/lua directory. Once that is accomplished, it is a relatively small step to getting ctest for lua working. 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); PLplot scientific plotting software package (plplot.org); 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 __________________________ ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel