On Thu, 2012-02-16 at 12:31 -0800, Alan W. Irwin wrote:
> On 2012-02-16 11:46-0800 Alan W. Irwin wrote:
>
> > [....]So one possibility to deal with this is simply to replace all math.mod
> > in the several examples where that occurs with math.fmod. However,
> > another alternative is to use the lua % operator (which takes the
> > remainder relative to minus infinity rather than zero as in the
> > math.fmod case). If we are always dealing with positive values using
> > the % operator might be a better alternative than math.fmod.
> >
> > Anyhow, let me test the math.fmod and % possibilities for all our lua
> > examples in the next little while, and I will get back to you.
>
> In the end (revision 12167) I decided to change to the % operator and
> the results passed the test_diff_psc test (i.e., were the same as
> the corresponding C examples) for my Lua-5.1 platform.
>
> So Atri, please try the test_lua_psc target again with this revision
> from svn trunk. I hope you will be able to get a lot further into the
> examples or maybe even complete them!
>
> Alan
> __________________________
Hi!
For the build to be successful one needs to make another small change to
the file cmake/modules/lua.cmake, which is as follows:-
Index: plplot-5.9.9/cmake/modules/lua.cmake
===================================================================
--- plplot-5.9.9.orig/cmake/modules/lua.cmake
+++ plplot-5.9.9/cmake/modules/lua.cmake
@@ -115,7 +115,7 @@ if(ENABLE_lua)
# Unless some better convention comes along, follow what Debian does
for
# install location of Lua wrapper shared object.
if(LUA51_FOUND)
- set(LUA_DIR ${LIB_DIR}/lua/5.1/plplot)
+ set(LUA_DIR ${LIB_DIR}/lua/${LUA_VERSION}/plplot)
else(LUA51_FOUND)
set(LUA_DIR ${LIB_DIR}/lua/50/plplot)
endif(LUA51_FOUND)
===================================================================
This patch ensures that if, for instance, lua = 5.2 (and indeed anything
greater than 5.0) is detected the corresponding plplot bindings are
installed in the directory $LIB_DIR/lua/5.2/plplot and so on. Without
this patch plplot bindings are installed in $LIB_DIR/lua/5.1/plplot even
if lua = 5.2 is detected in the system.
Finally, with these modifications, and the examples corrected as in the
latest revision, the 'make test_lua_psc' passes wonderfully, i.e. not
only does it pass, but it creates ps files of plots that look fine. I
found that the ps files created using the c++ examples and using lua 5.2
looked identical. I interpret that to mean plplot works just great with
lua 5.2 as well \o/
Do you want me to submit the ps files or something so you could verify?
Thanks a lot for all the really nice help. Please let me know if there
is something more I need to do about this.
Bye
--
Atri
------------------------------------------------------------------------------
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