From: Steve K. <ha...@ya...> - 2006-05-08 11:00:30
|
Hi all, I would like to use luasql with wxlua and failled. Do googling and saw some old thread about it but not sure how to resolve. If I do a cd to the lua dir inside wxLua distribution and make; a binary lua will be created in bin of wxLua. Using that binary ; require'luasqlmysql' is fine. However if I use the binary wxlua and type require'luasqlmysl' in the editor window and run, the console prints the error: error loading module 'luasqlmysql' from file './luasqlmysql.so': dynamic libraries not enabled; check your Lua installation how can I enable it in wxlua? which is a bit strange as the lua core built exactly the same produce lua baniry and works, wxLua is the snapshot version wxLua_Snapshot_2006-05-07.tar.gz. Thank you in advance. I will look into the source to see what I can find anyway. S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. |
From: John L. <jla...@gm...> - 2006-05-08 15:24:43
|
On 5/8/06, Steve Kieu <ha...@ya...> wrote: > I would like to use luasql with wxlua and failled. Do googling and saw so= me > old thread about it but not sure how to resolve. > > If I do a cd to the lua dir inside wxLua distribution and make; a binary > lua will be created in bin of wxLua. Using that binary ; > require'luasqlmysql' is fine. > > However if I use the binary wxlua and type require'luasqlmysl' in the > editor window and run, the console prints the error: > > error loading module 'luasqlmysql' from file './luasqlmysql.so': > dynamic libraries not enabled; check your Lua installation > > how can I enable it in wxlua? which is a bit strange as the lua core buil= t > exactly the same produce lua baniry and works, It is strange indeed, what platform are you using? I'm guessing Linux? I just looked at the Makefiles in modules/lua and it looks like the exact same object files are used for the lualib and the lua executable so the code in loadlib.c should compile this #ifdefed code for both. #if defined(LUA_DL_DLOPEN) ... In the Makefile in apps/wxlua/src it uses this to compile lua, is this what you did when you compile lua yourself? lua: @(cd $(WXLUA_DIR)/modules/lua && make linux) Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-08 18:42:10
|
Hi, It is strange indeed, what platform are you using? I'm guessing Linux? Yes it Linux - slackware 10.2 I just looked at the Makefiles in modules/lua and it looks like the exact same object files are used for the lualib and the lua executable so the code in loadlib.c should compile this #ifdefed code for both. #if defined(LUA_DL_DLOPEN) ... In the Makefile in apps/wxlua/src it uses this to compile lua, is this what you did when you compile lua yourself? lua: @(cd $(WXLUA_DIR)/modules/lua && make linux) Yes, the actual command is: cd /home/sk/wxLua/modules/lua && make linux this produce binary lua and luac in /home/sk/wxLua/bin and is fine . I also see a #ifdef LUA_USE_LINUX in /home/sk/wxLua/modules/lua/include/luaconf.h and suspect that LUA_USE_LINUX not defined as if it is defined then LUA_USE_READLINE should be enabled and I can use it in lua binary. And It also enable LUA_USE_DLOPEN. Then I commented the #ifdef line and #endif so it always true. (safe as I know I am running Linux); Now the lua binary has readline support. Strange enough, the wxlua-lua binary still not have the readline support and ofcourse still no go for loading DLOPEN. S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. |
From: Steve K. <ha...@ya...> - 2006-05-08 18:57:01
|
I just view the symbol of liblua.a and libwxlua_gtk2_lua-2.6.a the liblua.a has the symbol dlopen but the other one *not* I will look furthur ; where you guys link libwxlua_gtk2_lua-2.6.a by the way? John Labenski <jla...@gm...> wrote: On 5/8/06, Steve Kieu wrote: > I would like to use luasql with wxlua and failled. Do googling and saw some > old thread about it but not sure how to resolve. > > If I do a cd to the lua dir inside wxLua distribution and make; a binary > lua will be created in bin of wxLua. Using that binary ; > require'luasqlmysql' is fine. > > However if I use the binary wxlua and type require'luasqlmysl' in the > editor window and run, the console prints the error: > > error loading module 'luasqlmysql' from file './luasqlmysql.so': > dynamic libraries not enabled; check your Lua installation > > how can I enable it in wxlua? which is a bit strange as the lua core built > exactly the same produce lua baniry and works, It is strange indeed, what platform are you using? I'm guessing Linux? I just looked at the Makefiles in modules/lua and it looks like the exact same object files are used for the lualib and the lua executable so the code in loadlib.c should compile this #ifdefed code for both. #if defined(LUA_DL_DLOPEN) ... In the Makefile in apps/wxlua/src it uses this to compile lua, is this what you did when you compile lua yourself? lua: @(cd $(WXLUA_DIR)/modules/lua && make linux) Regards, John Labenski ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users S.KIEU --------------------------------- On Yahoo!7 360°: Your own space to share what you want with who you want! |
From: Steve K. <ha...@ya...> - 2006-05-08 19:36:18
|
Ok now things even go more strange :-) I will describe it so you guys may have clue to really fic the build problem as I do not know much about the bake file system etc...; - For some reason the LUA_DL_DLOPEN never been defined in loadlib.c Maybe it is the include problem? (I hit it once before though). In loadlib.c it has #include "lua.h" and in lua.h it has included luaconf.h and it should define that LUA_DL_DLOPEN because I explicitly define it in luaconf.h. But it is not. The include round problem somewhere.. So I once again explicitly define LUA_DL_DLOPEN in the file loadlib.c and when compile it spits out unresolve symbol dlopen and dlsym so I have to manually edit the Make add the LDFLAG -ldl so it compiles fine. Now run wxlua-lua and type require'luasqlmysql' it no longer complain about dynamica lib not enabled ; but it give another error: undefined symbol: lua_pushvalue and still no readline support. Of course the lua binary has it all. To recap here is what I did to 'ugly fix' to enable dynamic lib loading: * Expilitly define LUA_DL_DLOPEN in loadlib.c * Explicitly define LUA_USE_LINUX in luaconf.h * Explicitly define LDFLAG=-ldl in $WXLUAROOTDIR/modules/Makefile The result is: dyanamic lib loading ok but unresolve symbol lua_pushvalue I will look into it furthur....... cheers John Labenski <jla...@gm...> wrote: On 5/8/06, Steve Kieu wrote: > I would like to use luasql with wxlua and failled. Do googling and saw some > old thread about it but not sure how to resolve. > > If I do a cd to the lua dir inside wxLua distribution and make; a binary > lua will be created in bin of wxLua. Using that binary ; > require'luasqlmysql' is fine. > > However if I use the binary wxlua and type require'luasqlmysl' in the > editor window and run, the console prints the error: > > error loading module 'luasqlmysql' from file './luasqlmysql.so': > dynamic libraries not enabled; check your Lua installation > > how can I enable it in wxlua? which is a bit strange as the lua core built > exactly the same produce lua baniry and works, It is strange indeed, what platform are you using? I'm guessing Linux? I just looked at the Makefiles in modules/lua and it looks like the exact same object files are used for the lualib and the lua executable so the code in loadlib.c should compile this #ifdefed code for both. #if defined(LUA_DL_DLOPEN) ... In the Makefile in apps/wxlua/src it uses this to compile lua, is this what you did when you compile lua yourself? lua: @(cd $(WXLUA_DIR)/modules/lua && make linux) Regards, John Labenski ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. |
From: Steve K. <ha...@ya...> - 2006-05-08 20:08:13
|
OK now I got it working with ugly hack :-) I undo all changes in loadlib.c and luaconf.h to its original. AND I manually edit the $WXLUAROOTDIR/modules/Makefile and add -DLUA_USE_LINUX to CFLAGS and -Wl,-E -ldl -lreadline -lhistory -lncurses to LDFLAGS (Just copy from the lua Makefile distribution the linux section) and everything works as expected :-) I hope you guys find where it is wrong in the build system and fix it 'officially', I am sorry I do not know enough about it to help. Cheers, Steve Kieu <ha...@ya...> wrote: Ok now things even go more strange :-) I will describe it so you guys may have clue to really fic the build problem as I do not know much about the bake file system etc...; - For some reason the LUA_DL_DLOPEN never been defined in loadlib.c Maybe it is the include problem? (I hit it once before though). In loadlib.c it has #include "lua.h" and in lua.h it has included luaconf.h and it should define that LUA_DL_DLOPEN because I explicitly define it in luaconf.h. But it is not. The include round problem somewhere.. So I once again explicitly define LUA_DL_DLOPEN in the file loadlib.c and when compile it spits out unresolve symbol dlopen and dlsym so I have to manually edit the Make add the LDFLAG -ldl so it compiles fine. Now run wxlua-lua and type require'luasqlmysql' it no longer complain about dynamica lib not enabled ; but it give another error: undefined symbol: lua_pushvalue and still no readline support. Of course the lua binary has it all. To recap here is what I did to 'ugly fix' to enable dynamic lib loading: * Expilitly define LUA_DL_DLOPEN in loadlib.c * Explicitly define LUA_USE_LINUX in luaconf.h * Explicitly define LDFLAG=-ldl in $WXLUAROOTDIR/modules/Makefile The result is: dyanamic lib loading ok but unresolve symbol lua_pushvalue I will look into it furthur....... cheers John Labenski <jla...@gm...> wrote: On 5/8/06, Steve Kieu wrote: > I would like to use luasql with wxlua and failled. Do googling and saw some > old thread about it but not sure how to resolve. > > If I do a cd to the lua dir inside wxLua distribution and make; a binary > lua will be created in bin of wxLua. Using that binary ; > require'luasqlmysql' is fine. > > However if I use the binary wxlua and type require'luasqlmysl' in the > editor window and run, the console prints the error: > > error loading module 'luasqlmysql' from file './luasqlmysql.so': > dynamic libraries not enabled; check your Lua installation > > how can I enable it in wxlua? which is a bit strange as the lua core built > exactly the same produce lua baniry and works, It is strange indeed, what platform are you using? I'm guessing Linux? I just looked at the Makefiles in modules/lua and it looks like the exact same object files are used for the lualib and the lua executable so the code in loadlib.c should compile this #ifdefed code for both. #if defined(LUA_DL_DLOPEN) ... In the Makefile in apps/wxlua/src it uses this to compile lua, is this what you did when you compile lua yourself? lua: @(cd $(WXLUA_DIR)/modules/lua && make linux) Regards, John Labenski ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Personals: It's free to check out our great singles! |