[PD] new luagl
Claude Heiland-Allen
claudiusmaximus at goto10.org
Fri Jul 25 22:08:23 CEST 2008
marius schebella wrote:
> error: lua: error loading `msgltest1':
> [string "msgltest1"]:1: module 'opengl' not found:
> no field package.preload['opengl']
> no file '/Users/marius/pd/pdlua/opengl'
> no file '/Users/marius/pd/pdlua/opengl.lua'
> no file './opengl.lua'
> no file '/usr/local/share/lua/5.1/opengl.lua'
> no file '/usr/local/share/lua/5.1/opengl/init.lua'
> no file '/usr/local/lib/lua/5.1/opengl.lua'
> no file '/usr/local/lib/lua/5.1/opengl/init.lua'
> no file './opengl.so'
> no file '/usr/local/lib/lua/5.1/opengl.so'
> no file '/usr/local/lib/lua/5.1/loadall.so'
>
> it seems pdlua is only looking for the "so" extension in /usr/local/lib...
> creating a symlink without the extension solved this for now.
> marius.
aha, many thanks for the additional info! - seems that this is a bug in
pdlua after all:
when pdlua loads a script it sets Lua's package path like this:
/* package.path := path .. "/?;" .. path .. "/?.lua;" .. package.path */
I'm not sure the best way to fix this, the standalone 'lua' interpreter
doesn't mention .so in the package path at all:
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print (package.path)
./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua
Any Lua experts know "the Lua way" to fix this?
I didn't notice it before because I got confused with another project of
mine (not Pd related) - the complex-help.pd example loads a .lua
package, not a .so package - sorry for the misleading information earlier.
Thanks again,
Claude
--
http://claudiusmaximus.goto10.org
More information about the Pd-list
mailing list