Hello GEM-dev!
IOhannes m zmoelnig wrote:
nevertheless, ask claude :-)
I just subscribed to this list, I'm reading the recent archives, so if I miss something in particular then let me know. Apologies for breaking your threading mail clients ;)
IOhannes m zmoelnig wrote:
the example works, but pdlua gives a lot of warnings and you cannot yet create a full-fledged (that passes on the GemList) gem-object in lua (both things because of the way pointers are handled)
True. I'm not sure what to do about pointers, on the one hand pd internal objects seem to do some kind of mystic voodoo for pointers, on the other many (all?) external objects just do whatever they like. I guess I'll follow the crowd and handle pointers the way other externals do.
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
Thanks,
Claude
If you run the shell comand 'nm' you can see what symbols are exported. Just do:
nm (pdlib whatever that may be) | grep canvas_load and look at the man page of nm to find out what the result means. It could also be that whatever is looking for that symbol is looking in the wrong path. I believe the full path will show up in the console or system error log. On OSX it's in /Apps/Utils/Console.
wes
On 9/22/07, Claude Heiland-Allen claudiusmaximus@goto10.org wrote:
Hello GEM-dev!
IOhannes m zmoelnig wrote:
nevertheless, ask claude :-)
I just subscribed to this list, I'm reading the recent archives, so if I miss something in particular then let me know. Apologies for breaking your threading mail clients ;)
IOhannes m zmoelnig wrote:
the example works, but pdlua gives a lot of warnings and you cannot yet create a full-fledged (that passes on the GemList) gem-object in lua (both things because of the way pointers are handled)
True. I'm not sure what to do about pointers, on the one hand pd internal objects seem to do some kind of mystic voodoo for pointers, on the other many (all?) external objects just do whatever they like. I guess I'll follow the crowd and handle pointers the way other externals do.
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
Thanks,
Claude
http://claudiusmaximus.goto10.org
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL? and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
thanks so far! marius.
hi claude, sorry, I gave a wrong information, but the _canvas_open error is still there.
/Library/Pd/lua.pd_darwin: dlopen(/Library/Pd/lua.pd_darwin, 10): Symbol not found: _canvas_open Referenced from: /Library/Pd/lua.pd_darwin Expected in: /Applications/Pd-extended.app/Contents/Resources/Scripts/../bin/pd
lua: can't load library marius.
marius schebella wrote:
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL? and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
thanks so far! marius.
marius schebella wrote:
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL?
Here's a dependency graph, as I understand it:
pd lua | / \ pdlua luagl | \ / eg1 eg2
eg1 -- the examples provided with pdlua eg2 -- the examples provided on this list
Rough installation steps (numbers are sequential, letters are parallel)
1. install lua
2a1. install pdlua [1] 2a2. test pdlua with the examples provided
2b1. install luagl [2] 2b2. test luagl with its examples [2]
3. luagl should be useable from pdlua by using require("gl") [2]
[1] I committed a lua.pd_darwin target in the Makefile, let me know if it works and/or what changes you needed to make to make it work...
[2] I never tried luagl, so don't know exactly what to do...
and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
pd -path /path/to/pdlua/src -lib lua # open /path/to/pdlua/examples/*.pd
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
No, that's unrelated. Previously trying to create a [lua] object should print one line in the Pd console saying the library loaded ok, but the object would fail to create at the Pd level. This error is happening before any code in pdlua is executed.
I added a simple [lua] class now that lets you load the library by creating an object, it will later have inlets that do fun things but for now it's pretty pointless.
Note that the -lib lua is recommended instead of creating a [lua] object, because otherwise patches can break by copy/paste changing object creation order.
Claude
Hallo, Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:
Note that the -lib lua is recommended instead of creating a [lua] object, because otherwise patches can break by copy/paste changing object creation order.
You could also use [declare -lib lua -path /path/to/where/pd.lua/is/]. But I think, pd-extended with its older pd-0.39 inside doesn't know about [declare] yet, so this might not work for Marius.
Ciao
hi, so, I removed the fink installation and recompiled lua with the flags suggested by wesley, and then recompiled pdlua (I used pd-extended structure, put lua.c into externals/build/src, create a file called lua.libs in the src folder which contains -llua and run make flatspace) and then! 1, 2a1, and 2a2 worked! but I also used 0.40 this time and not 0.39, where lua still does not load. I also tried to compile lua manually before with your new makefile, but I am really not so experienced with compiling. I had to change the path to m_pd.h in the source file, but still got an error saying
gcc -ansi -pedantic -Wall -fPIC -bundle -undefined suppress -flat_namespace -o lua.pd_darwin lua.c -llua strip lua.pd_darwin strip: symbols referenced by indirect symbol table entries that can't be stripped in: /Users/marius/pd/pdlua/src/lua.pd_darwin _post _inlet_new _close _class_addanything _read _free _gensym [............................] _strrchr _NSUnLinkModule __dyld_present make: *** [lua.pd_darwin] Error 1
but, fine, now I am trying to get luagl working. marius.
Claude Heiland-Allen wrote:
marius schebella wrote:
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a
bug
in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL?
Here's a dependency graph, as I understand it:
pd lua | / \ pdlua luagl | \ / eg1 eg2
eg1 -- the examples provided with pdlua eg2 -- the examples provided on this list
Rough installation steps (numbers are sequential, letters are parallel)
- install lua
2a1. install pdlua [1] 2a2. test pdlua with the examples provided
2b1. install luagl [2] 2b2. test luagl with its examples [2]
- luagl should be useable from pdlua by using require("gl") [2]
[1] I committed a lua.pd_darwin target in the Makefile, let me know if it works and/or what changes you needed to make to make it work...
[2] I never tried luagl, so don't know exactly what to do...
and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
pd -path /path/to/pdlua/src -lib lua # open /path/to/pdlua/examples/*.pd
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
No, that's unrelated. Previously trying to create a [lua] object should print one line in the Pd console saying the library loaded ok, but the object would fail to create at the Pd level. This error is happening before any code in pdlua is executed.
I added a simple [lua] class now that lets you load the library by creating an object, it will later have inlets that do fun things but for now it's pretty pointless.
Note that the -lib lua is recommended instead of creating a [lua] object, because otherwise patches can break by copy/paste changing object creation order.
Claude
Fink is not the most ideal way to install lua on OSX. It's best to just to it by hand and make / make install. Be sure to enable the dynamic loader as I mentioned earlier with the -D switch otherwise you won't be able to load the luagl module.
wes
On 9/22/07, marius schebella marius.schebella@gmail.com wrote:
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL? and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
thanks so far! marius.
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
hi wesley, need your help again for the luaGL part... I did svn co -r 15 https://luagl.svn.sourceforge.net/svnroot/luagl luagl and found your branch of luagl. I also saw a xcode proj and after some tries I got it to build. I have a file opengl and opengl.so but don't know how to "make install" with xcode? tried to put them manually in /sw/share/lue/5.1 but seem to miss some other things. lua: error loading `mariusgl2': [string "mariusgl2"]:3: module 'opengl' not found: no field package.preload['opengl'] no file './opengl.lua' no file '/sw/share/lua/5.1/opengl.lua' no file '/sw/share/lua/5.1/opengl/init.lua' no file '/usr/local/share/lua/5.1/opengl.lua' no file '/usr/local/share/lua/5.1/opengl/init.lua' no file './opengl.bundle' no file './opengl.so' no file '/sw/lib/lua/5.1/opengl.bundle' no file '/sw/lib/lua/5.1/opengl.so' no file '/sw/lib/lua/5.1/loadall.bundle' no file '/sw/lib/lua/5.1/loadall.so' no file '/usr/local/lib/lua/5.1/opengl.bundle' no file '/usr/local/lib/lua/5.1/opengl.so' no file '/usr/local/lib/lua/5.1/loadall.bundle' no file '/usr/local/lib/lua/5.1/loadall.so' mariusgl2 marius.
Wesley Smith wrote:
Fink is not the most ideal way to install lua on OSX. It's best to just to it by hand and make / make install. Be sure to enable the dynamic loader as I mentioned earlier with the -D switch otherwise you won't be able to load the luagl module.
wes
On 9/22/07, marius schebella marius.schebella@gmail.com wrote:
Claude Heiland-Allen wrote:
marius schebella wrote:
when I create a [lua] object in pd i get an error
I don't have any Mac OS X machines to test with, so it's probably a bug in the pdlua Makefile. I'll look at some other Makefiles to see what special voodoo OS X requires (I think the bug is that lua.pd_darwin should be able to see symbols in the pd executable, but can't for some reason).
hi claude, maybe pdlua is the problem, but I think I rather messed up the lua installation itself. I used fink to install the latest lua version (5.1) and lua-dev, which is probably not the same as luaGL??? is luaGL a part of lua, or is luaGL a standalone lua library with built in GL? i.e. do I have to compile lua with luaGL or only luaGL? and after I compiled lua (luaGL?) and pdlua, and added -lib lua to the pd startup, is that all I have to do to get your example patches working? or am I missing another step? marius.
Moreover, creating a [lua] object isn't supposed to work yet (it's intended to be used with -lib lua) - but I will add that feature soon.
ok, I suppose that is where the canvas_load error comes from.
Also, I just want to note that pdlua is very fresh/new/alpha, and will probably change incompatibly at various points until something vaguely useable emerges.
thanks so far! marius.
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
Hi Marius, When you say after some tries, did you end up changing the Lua.framework I have in the xcode project to liblua.a?
Anyway, once you get opengl.so working, all you need to do is put it in a location defined by Lua in the package.cpath variable. package is a table containing data for loading external Lua and C modules. The cpath variable contains a ';' delimited list of paths to search for C modules.
It usually looks like ./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
You'll need to either put the opengl.so in one of these locations or append this string with the path where it's installed by doing
package.cpath = package.cpath .. ";/My/Path/To/LuaGL/?.so
wes