$ pd -d 5 set pd_whichmidiapi 0 pdtk_watchdog set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pdlua} set ::sys_searchpath $::tmp_path set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pd-externals} lappend ::tmp_path {/usr/local/lib/pd-externals} lappend ::tmp_path {/usr/local/lib/pd/extra} set ::sys_staticpath $::tmp_path set ::startup_flags {} set ::startup_libraries {} lappend ::startup_libraries {pdlua} pdtk_pd_startup 0 45 0 {} { {OSS 2} {ALSA 1} {portaudio 4} } { {OSS-MIDI 0} {ALSA-MIDI 1} } {DejaVu Sans Mono} bold set pd_whichapi 1 set pd_whichmidiapi 0 ::pdwindow::logpost {} 3 {pdlua 0.7.2 (GPL) 2014 Martin Peach, based on } ::pdwindow::logpost {} 3 {lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaximus@goto10.org } ::pdwindow::logpost {} 3 {pdlua: compiled for pd-0.45 on Jul 7 2014 11:16:47 } ::pdwindow::logpost {} 3 {Using lua version 5.2 }
When I open hello-help.pd this is printed hundreds of times:
::pdwindow::logpost {} 1 {lua: internal error in pd._setrequirepath': attempt to call a nil value } ::pdwindow::logpost {} 1 {lua: internal error in
pd._clearrequirepath':
attempt to call a nil value
}
and then:
::pdwindow::logpost {} 1 {maximum object loading depth 1000 reached } ::pdwindow::post {} ::pdwindow::post { } ::pdwindow::post {hello} ::pdwindow::post { } ::pdwindow::logpost {} 1 {... couldn't create } ::pdwindow::post {pdlua: already loaded }
Le 07/07/2014 15:52, Martin Peach a écrit :
On 2014-07-07 07:45, patrice colet wrote:
Le 06/07/2014 16:09, Martin Peach a écrit : it compiles only if put -llua5.2 and -I/usr/include/lua5.2 -I/usr/local/inlude/pd in lua flags from linux section, here is the compiling process:
/pdlua/src$ make compiling pdlua version 0.6 cflags are -fPIC -threepic optcflags are -O6 -funroll-loops -fomit-frame-pointer luacflags are -DVERSION='0.6' -I/usr/include/lua5.2 -I/usr/local/include/pd ldflags are -Wl,--export-dynamic -shared -fPIC libs are -llua5.2 -lc cc -fPIC -threepic -O6 -funroll-loops -fomit-frame-pointer -DVERSION='"0.6"' -I/usr/include/lua5.2 -I/usr/local/include/pd -o "pdlua.o" -c "pdlua.c" pdlua.c: In function ‘pdlua_setup’: pdlua.c:1773:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1774:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1775:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1776:5: warning: format not a string literal and no format arguments [-Wformat-security] linking pdlua with -llua5.2 -lc cc -Wl,--export-dynamic -shared -fPIC -o "pdlua.pd_linux" "pdlua.o" -llua5.2 -lc chmod a-x "pdlua.pd_linux"
So it compiled. What do you get when it loads? It should print the version, but you may need to set the debug level in the console.
Martin
Could you uncomment the line 84 of pdlua.c #define PDLUA_DEBUG and recompile? That might clarify what is wrong at setrequirepath.
Martin
On 2014-07-07 10:01, patrice colet wrote:
$ pd -d 5 set pd_whichmidiapi 0 pdtk_watchdog set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pdlua} set ::sys_searchpath $::tmp_path set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pd-externals} lappend ::tmp_path {/usr/local/lib/pd-externals} lappend ::tmp_path {/usr/local/lib/pd/extra} set ::sys_staticpath $::tmp_path set ::startup_flags {} set ::startup_libraries {} lappend ::startup_libraries {pdlua} pdtk_pd_startup 0 45 0 {} { {OSS 2} {ALSA 1} {portaudio 4} } { {OSS-MIDI 0} {ALSA-MIDI 1} } {DejaVu Sans Mono} bold set pd_whichapi 1 set pd_whichmidiapi 0 ::pdwindow::logpost {} 3 {pdlua 0.7.2 (GPL) 2014 Martin Peach, based on } ::pdwindow::logpost {} 3 {lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaximus@goto10.org } ::pdwindow::logpost {} 3 {pdlua: compiled for pd-0.45 on Jul 7 2014 11:16:47 } ::pdwindow::logpost {} 3 {Using lua version 5.2 }
When I open hello-help.pd this is printed hundreds of times:
::pdwindow::logpost {} 1 {lua: internal error in
pd._setrequirepath': attempt to call a nil value } ::pdwindow::logpost {} 1 {lua: internal error in
pd._clearrequirepath': attempt to call a nil value }and then:
::pdwindow::logpost {} 1 {maximum object loading depth 1000 reached } ::pdwindow::post {} ::pdwindow::post { } ::pdwindow::post {hello} ::pdwindow::post { } ::pdwindow::logpost {} 1 {... couldn't create } ::pdwindow::post {pdlua: already loaded }
Le 07/07/2014 15:52, Martin Peach a écrit :
On 2014-07-07 07:45, patrice colet wrote:
Le 06/07/2014 16:09, Martin Peach a écrit : it compiles only if put -llua5.2 and -I/usr/include/lua5.2 -I/usr/local/inlude/pd in lua flags from linux section, here is the compiling process:
/pdlua/src$ make compiling pdlua version 0.6 cflags are -fPIC -threepic optcflags are -O6 -funroll-loops -fomit-frame-pointer luacflags are -DVERSION='0.6' -I/usr/include/lua5.2 -I/usr/local/include/pd ldflags are -Wl,--export-dynamic -shared -fPIC libs are -llua5.2 -lc cc -fPIC -threepic -O6 -funroll-loops -fomit-frame-pointer -DVERSION='"0.6"' -I/usr/include/lua5.2 -I/usr/local/include/pd -o "pdlua.o" -c "pdlua.c" pdlua.c: In function ‘pdlua_setup’: pdlua.c:1773:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1774:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1775:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1776:5: warning: format not a string literal and no format arguments [-Wformat-security] linking pdlua with -llua5.2 -lc cc -Wl,--export-dynamic -shared -fPIC -o "pdlua.pd_linux" "pdlua.o" -llua5.2 -lc chmod a-x "pdlua.pd_linux"
So it compiled. What do you get when it loads? It should print the version, but you may need to set the debug level in the console.
Martin
here is the output of pd console with pdlua.c debug enabled:
pdlua pdlua_proxyinlet_setup done pdlua pdlua_proxyreceive_setup done pdlua pdlua_proxyclock_setup done pdlua lua_open done L = 0x8d3be0 pdlua luaL_openlibs done pdlua_init: end. stack top is 0 pdlua pdlua_init done pd_lua_path ./pd.lua pd.lua loaded from ./pd.lua pdlua canvas_open done fd = 8 pdlua_setup: stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 111 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua lua_load returned 0 pdlua_class_new: L is 0x8d3be0, name is pdlua stack top is 1 pdlua_class_new: end stack top is 2 pdlua_class_new: L is 0x8d3be0, name is pdluax stack top is 1 pdlua_class_new: end stack top is 2 pdlua lua_pcall returned 0 pdlua_setup: end. stack top 0 pdlua_loader: stack top 0 pdlua_setrequirepath: stack top 0 pdlua_setrequirepath: end. stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 221 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_post: stack top is 1 Hello, universe! pdlua_post: end. stack top is 1 pdlua_class_new: L is 0x8d3be0, name is hello stack top is 1 pdlua_class_new: end stack top is 2 pdlua_clearrequirepath: stack top 0 pdlua_clearrequirepath: end. stack top 0 pdlua_loader: end. stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc5a8 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc830 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1600 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc890 stack top 0 pdlua_new: s->s_name is pdlua pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1960 stack top 0 pdlua_new: s->s_name is pdluax argv[0]: hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_dofile: stack top 2 pdlua_dofile path is /media/sdext/src/pdlua/src pdlua_setrequirepath: stack top 2 pdlua_setrequirepath: end. stack top 2 pdlua_reader: fd is 8 pdlua_reader: s is 79 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_clearrequirepath: stack top 3 pdlua_clearrequirepath: end. stack top 3 pdlua_dofile end. stack top is 4 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e17b8 stack top 0
Le 07/07/2014 16:25, Martin Peach a écrit :
Could you uncomment the line 84 of pdlua.c #define PDLUA_DEBUG and recompile? That might clarify what is wrong at setrequirepath.
Martin
On 2014-07-07 10:01, patrice colet wrote:
$ pd -d 5 set pd_whichmidiapi 0 pdtk_watchdog set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pdlua} set ::sys_searchpath $::tmp_path set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pd-externals} lappend ::tmp_path {/usr/local/lib/pd-externals} lappend ::tmp_path {/usr/local/lib/pd/extra} set ::sys_staticpath $::tmp_path set ::startup_flags {} set ::startup_libraries {} lappend ::startup_libraries {pdlua} pdtk_pd_startup 0 45 0 {} { {OSS 2} {ALSA 1} {portaudio 4} } { {OSS-MIDI 0} {ALSA-MIDI 1} } {DejaVu Sans Mono} bold set pd_whichapi 1 set pd_whichmidiapi 0 ::pdwindow::logpost {} 3 {pdlua 0.7.2 (GPL) 2014 Martin Peach, based on } ::pdwindow::logpost {} 3 {lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaximus@goto10.org } ::pdwindow::logpost {} 3 {pdlua: compiled for pd-0.45 on Jul 7 2014 11:16:47 } ::pdwindow::logpost {} 3 {Using lua version 5.2 }
When I open hello-help.pd this is printed hundreds of times:
::pdwindow::logpost {} 1 {lua: internal error in
pd._setrequirepath': attempt to call a nil value } ::pdwindow::logpost {} 1 {lua: internal error in
pd._clearrequirepath': attempt to call a nil value }and then:
::pdwindow::logpost {} 1 {maximum object loading depth 1000 reached } ::pdwindow::post {} ::pdwindow::post { } ::pdwindow::post {hello} ::pdwindow::post { } ::pdwindow::logpost {} 1 {... couldn't create } ::pdwindow::post {pdlua: already loaded }
Le 07/07/2014 15:52, Martin Peach a écrit :
On 2014-07-07 07:45, patrice colet wrote:
Le 06/07/2014 16:09, Martin Peach a écrit : it compiles only if put -llua5.2 and -I/usr/include/lua5.2 -I/usr/local/inlude/pd in lua flags from linux section, here is the compiling process:
/pdlua/src$ make compiling pdlua version 0.6 cflags are -fPIC -threepic optcflags are -O6 -funroll-loops -fomit-frame-pointer luacflags are -DVERSION='0.6' -I/usr/include/lua5.2 -I/usr/local/include/pd ldflags are -Wl,--export-dynamic -shared -fPIC libs are -llua5.2 -lc cc -fPIC -threepic -O6 -funroll-loops -fomit-frame-pointer -DVERSION='"0.6"' -I/usr/include/lua5.2 -I/usr/local/include/pd -o "pdlua.o" -c "pdlua.c" pdlua.c: In function ‘pdlua_setup’: pdlua.c:1773:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1774:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1775:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1776:5: warning: format not a string literal and no format arguments [-Wformat-security] linking pdlua with -llua5.2 -lc cc -Wl,--export-dynamic -shared -fPIC -o "pdlua.pd_linux" "pdlua.o" -llua5.2 -lc chmod a-x "pdlua.pd_linux"
So it compiled. What do you get when it loads? It should print the version, but you may need to set the debug level in the console.
Martin
That looks like it works without any problem. Maybe you just need to remove the debug again and recompile?
Martin
On 2014-07-07 10:34, patrice colet wrote:
here is the output of pd console with pdlua.c debug enabled:
pdlua pdlua_proxyinlet_setup done pdlua pdlua_proxyreceive_setup done pdlua pdlua_proxyclock_setup done pdlua lua_open done L = 0x8d3be0 pdlua luaL_openlibs done pdlua_init: end. stack top is 0 pdlua pdlua_init done pd_lua_path ./pd.lua pd.lua loaded from ./pd.lua pdlua canvas_open done fd = 8 pdlua_setup: stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 111 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua lua_load returned 0 pdlua_class_new: L is 0x8d3be0, name is pdlua stack top is 1 pdlua_class_new: end stack top is 2 pdlua_class_new: L is 0x8d3be0, name is pdluax stack top is 1 pdlua_class_new: end stack top is 2 pdlua lua_pcall returned 0 pdlua_setup: end. stack top 0 pdlua_loader: stack top 0 pdlua_setrequirepath: stack top 0 pdlua_setrequirepath: end. stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 221 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_post: stack top is 1 Hello, universe! pdlua_post: end. stack top is 1 pdlua_class_new: L is 0x8d3be0, name is hello stack top is 1 pdlua_class_new: end stack top is 2 pdlua_clearrequirepath: stack top 0 pdlua_clearrequirepath: end. stack top 0 pdlua_loader: end. stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc5a8 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc830 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1600 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc890 stack top 0 pdlua_new: s->s_name is pdlua pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1960 stack top 0 pdlua_new: s->s_name is pdluax argv[0]: hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_dofile: stack top 2 pdlua_dofile path is /media/sdext/src/pdlua/src pdlua_setrequirepath: stack top 2 pdlua_setrequirepath: end. stack top 2 pdlua_reader: fd is 8 pdlua_reader: s is 79 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_clearrequirepath: stack top 3 pdlua_clearrequirepath: end. stack top 3 pdlua_dofile end. stack top is 4 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e17b8 stack top 0
Le 07/07/2014 16:25, Martin Peach a écrit :
Could you uncomment the line 84 of pdlua.c #define PDLUA_DEBUG and recompile? That might clarify what is wrong at setrequirepath.
Martin
On 2014-07-07 10:01, patrice colet wrote:
$ pd -d 5 set pd_whichmidiapi 0 pdtk_watchdog set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pdlua} set ::sys_searchpath $::tmp_path set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pd-externals} lappend ::tmp_path {/usr/local/lib/pd-externals} lappend ::tmp_path {/usr/local/lib/pd/extra} set ::sys_staticpath $::tmp_path set ::startup_flags {} set ::startup_libraries {} lappend ::startup_libraries {pdlua} pdtk_pd_startup 0 45 0 {} { {OSS 2} {ALSA 1} {portaudio 4} } { {OSS-MIDI 0} {ALSA-MIDI 1} } {DejaVu Sans Mono} bold set pd_whichapi 1 set pd_whichmidiapi 0 ::pdwindow::logpost {} 3 {pdlua 0.7.2 (GPL) 2014 Martin Peach, based on } ::pdwindow::logpost {} 3 {lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaximus@goto10.org } ::pdwindow::logpost {} 3 {pdlua: compiled for pd-0.45 on Jul 7 2014 11:16:47 } ::pdwindow::logpost {} 3 {Using lua version 5.2 }
When I open hello-help.pd this is printed hundreds of times:
::pdwindow::logpost {} 1 {lua: internal error in
pd._setrequirepath': attempt to call a nil value } ::pdwindow::logpost {} 1 {lua: internal error in
pd._clearrequirepath': attempt to call a nil value }and then:
::pdwindow::logpost {} 1 {maximum object loading depth 1000 reached } ::pdwindow::post {} ::pdwindow::post { } ::pdwindow::post {hello} ::pdwindow::post { } ::pdwindow::logpost {} 1 {... couldn't create } ::pdwindow::post {pdlua: already loaded }
Le 07/07/2014 15:52, Martin Peach a écrit :
On 2014-07-07 07:45, patrice colet wrote:
Le 06/07/2014 16:09, Martin Peach a écrit : it compiles only if put -llua5.2 and -I/usr/include/lua5.2 -I/usr/local/inlude/pd in lua flags from linux section, here is the compiling process:
/pdlua/src$ make compiling pdlua version 0.6 cflags are -fPIC -threepic optcflags are -O6 -funroll-loops -fomit-frame-pointer luacflags are -DVERSION='0.6' -I/usr/include/lua5.2 -I/usr/local/include/pd ldflags are -Wl,--export-dynamic -shared -fPIC libs are -llua5.2 -lc cc -fPIC -threepic -O6 -funroll-loops -fomit-frame-pointer -DVERSION='"0.6"' -I/usr/include/lua5.2 -I/usr/local/include/pd -o "pdlua.o" -c "pdlua.c" pdlua.c: In function ‘pdlua_setup’: pdlua.c:1773:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1774:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1775:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1776:5: warning: format not a string literal and no format arguments [-Wformat-security] linking pdlua with -llua5.2 -lc cc -Wl,--export-dynamic -shared -fPIC -o "pdlua.pd_linux" "pdlua.o" -llua5.2 -lc chmod a-x "pdlua.pd_linux"
So it compiled. What do you get when it loads? It should print the version, but you may need to set the debug level in the console.
Martin
I've found out that line 256 contain one code that make it work in debug mode:
post("pdlua_reader: s is %ld", s);
I've no clue why this is happening
Le 07/07/2014 17:04, Martin Peach a écrit :
That looks like it works without any problem. Maybe you just need to remove the debug again and recompile?
Martin
On 2014-07-07 10:34, patrice colet wrote:
here is the output of pd console with pdlua.c debug enabled:
pdlua pdlua_proxyinlet_setup done pdlua pdlua_proxyreceive_setup done pdlua pdlua_proxyclock_setup done pdlua lua_open done L = 0x8d3be0 pdlua luaL_openlibs done pdlua_init: end. stack top is 0 pdlua pdlua_init done pd_lua_path ./pd.lua pd.lua loaded from ./pd.lua pdlua canvas_open done fd = 8 pdlua_setup: stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 998 pdlua_reader: fd is 8 pdlua_reader: s is 111 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua lua_load returned 0 pdlua_class_new: L is 0x8d3be0, name is pdlua stack top is 1 pdlua_class_new: end stack top is 2 pdlua_class_new: L is 0x8d3be0, name is pdluax stack top is 1 pdlua_class_new: end stack top is 2 pdlua lua_pcall returned 0 pdlua_setup: end. stack top 0 pdlua_loader: stack top 0 pdlua_setrequirepath: stack top 0 pdlua_setrequirepath: end. stack top 0 pdlua_reader: fd is 8 pdlua_reader: s is 221 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_post: stack top is 1 Hello, universe! pdlua_post: end. stack top is 1 pdlua_class_new: L is 0x8d3be0, name is hello stack top is 1 pdlua_class_new: end stack top is 2 pdlua_clearrequirepath: stack top 0 pdlua_clearrequirepath: end. stack top 0 pdlua_loader: end. stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc5a8 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc830 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1600 stack top 0 pdlua_new: s->s_name is hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is /media/sdext/src/pdlua/src pdlua_object_new: success end. stack top is 2 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8dc890 stack top 0 pdlua_new: s->s_name is pdlua pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e1960 stack top 0 pdlua_new: s->s_name is pdluax argv[0]: hello pdlua_new: start with stack top 0 pdlua_pushatomtable: stack top 3 pdlua_pushatomtable: end. stack top 4 pdlua_new: before lua_pcall(L, 2, 1, 0) stack top 4 pdlua_object_new: stack top is 1 pdlua_object_new: path is . pdlua_object_new: success end. stack top is 2 pdlua_dofile: stack top 2 pdlua_dofile path is /media/sdext/src/pdlua/src pdlua_setrequirepath: stack top 2 pdlua_setrequirepath: end. stack top 2 pdlua_reader: fd is 8 pdlua_reader: s is 79 pdlua_reader: fd is 8 pdlua_reader: s is 0 pdlua_clearrequirepath: stack top 3 pdlua_clearrequirepath: end. stack top 3 pdlua_dofile end. stack top is 4 pdlua_post: stack top is 1 Hello, world! pdlua_post: end. stack top is 1 pdlua_object_createinlets: stack top is 2 pdlua_object_createinlets: end. stack top is 2 pdlua_object_createoutlets: stack top is 2 pdlua_object_createoutlets: end stack top is 2 pdlua_new: done lua_pcall(L, 2, 1, 0) stack top 2 pdlua_new: before returning object 0x8e17b8 stack top 0
Le 07/07/2014 16:25, Martin Peach a écrit :
Could you uncomment the line 84 of pdlua.c #define PDLUA_DEBUG and recompile? That might clarify what is wrong at setrequirepath.
Martin
On 2014-07-07 10:01, patrice colet wrote:
$ pd -d 5 set pd_whichmidiapi 0 pdtk_watchdog set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pdlua} set ::sys_searchpath $::tmp_path set ::tmp_path {} lappend ::tmp_path {/home/ubuntu/pd-externals} lappend ::tmp_path {/usr/local/lib/pd-externals} lappend ::tmp_path {/usr/local/lib/pd/extra} set ::sys_staticpath $::tmp_path set ::startup_flags {} set ::startup_libraries {} lappend ::startup_libraries {pdlua} pdtk_pd_startup 0 45 0 {} { {OSS 2} {ALSA 1} {portaudio 4} } { {OSS-MIDI 0} {ALSA-MIDI 1} } {DejaVu Sans Mono} bold set pd_whichapi 1 set pd_whichmidiapi 0 ::pdwindow::logpost {} 3 {pdlua 0.7.2 (GPL) 2014 Martin Peach, based on } ::pdwindow::logpost {} 3 {lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaximus@goto10.org } ::pdwindow::logpost {} 3 {pdlua: compiled for pd-0.45 on Jul 7 2014 11:16:47 } ::pdwindow::logpost {} 3 {Using lua version 5.2 }
When I open hello-help.pd this is printed hundreds of times:
::pdwindow::logpost {} 1 {lua: internal error in
pd._setrequirepath': attempt to call a nil value } ::pdwindow::logpost {} 1 {lua: internal error in
pd._clearrequirepath': attempt to call a nil value }and then:
::pdwindow::logpost {} 1 {maximum object loading depth 1000 reached } ::pdwindow::post {} ::pdwindow::post { } ::pdwindow::post {hello} ::pdwindow::post { } ::pdwindow::logpost {} 1 {... couldn't create } ::pdwindow::post {pdlua: already loaded }
Le 07/07/2014 15:52, Martin Peach a écrit :
On 2014-07-07 07:45, patrice colet wrote:
Le 06/07/2014 16:09, Martin Peach a écrit : it compiles only if put -llua5.2 and -I/usr/include/lua5.2 -I/usr/local/inlude/pd in lua flags from linux section, here is the compiling process:
/pdlua/src$ make compiling pdlua version 0.6 cflags are -fPIC -threepic optcflags are -O6 -funroll-loops -fomit-frame-pointer luacflags are -DVERSION='0.6' -I/usr/include/lua5.2 -I/usr/local/include/pd ldflags are -Wl,--export-dynamic -shared -fPIC libs are -llua5.2 -lc cc -fPIC -threepic -O6 -funroll-loops -fomit-frame-pointer -DVERSION='"0.6"' -I/usr/include/lua5.2 -I/usr/local/include/pd -o "pdlua.o" -c "pdlua.c" pdlua.c: In function ‘pdlua_setup’: pdlua.c:1773:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1774:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1775:5: warning: format not a string literal and no format arguments [-Wformat-security] pdlua.c:1776:5: warning: format not a string literal and no format arguments [-Wformat-security] linking pdlua with -llua5.2 -lc cc -Wl,--export-dynamic -shared -fPIC -o "pdlua.pd_linux" "pdlua.o" -llua5.2 -lc chmod a-x "pdlua.pd_linux"
So it compiled. What do you get when it loads? It should print the version, but you may need to set the debug level in the console.
Martin
On 2014-07-07 13:40, patrice colet via Pd-list wrote:
I've found out that line 256 contain one code that make it work in debug mode:
post("pdlua_reader: s is %ld", s);
I've no clue why this is happening
Maybe the compiler is optimizing the code in a bad way?
Martin