[GEM-dev] pdlua + luagl + Gem (was: automated drawing in gem?)

marius schebella marius.schebella at gmail.com
Mon Sep 24 02:08:53 CEST 2007


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)
> 
> 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
> 
> 





More information about the GEM-dev mailing list