| Summary: | [lua] fix build with 2010.08-rc1 | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | François Perrad <francois.perrad> |
| Component: | Other | Assignee: | Gustavo Zacarias <gustavo> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | PC Ubuntu Lucid | Target: | arm versatilepb (qemu) |
| Build: | |||
| Attachments: |
fix
new version of the patch patch only for warnings |
||
Created attachment 2323 [details]
new version of the patch
simplified version of the patch
Thanks François for this patch. Your patch contained three things : *) Remove -DLUA_USE_DLOPEN from LUA_MYCFLAGS when LUA_SHARED_LIBRARY is enabled, and add -DLUA_USE_DLOPEN to LUA_MYCFLAGS when readline support is requested. Could you explain the rationale for this change ? *) A fix to make sure that the value of MYCFLAGS actually gets passed to Lua. This is correct, and I've committed it, in a slightly different form, see http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?id=8199f9f94bab74e27b0eed1a52ed1125e3af62e8 *) A fix to make the clean in the src/ subdirectory. But I've just tested, the main Lua Makefile already goes into the src/ subdirectory when doing "make clean" at the root directory of Lua sources. So "make lua-clean" in Buildroot already works fine. Which problem are you fixing here ? Again, thanks! Oh, by the way, I did a test with the patch I mentionned, and readline is indeed working in the Lua interpreter (history, Ctrl+a, Ctrl+e, etc.) (In reply to comment #2) > Thanks François for this patch. Your patch contained three things : > > *) Remove -DLUA_USE_DLOPEN from LUA_MYCFLAGS when LUA_SHARED_LIBRARY is > enabled, and add -DLUA_USE_DLOPEN to LUA_MYCFLAGS when readline support is > requested. Could you explain the rationale for this change ? > This part avoids some warnings about the redefinition of LUA_USE_DLOPEN, when BR2_PACKAGE_LUA_INTERPRETER_READLINE is set. See in src/luaconf.h lines 36-40 : #if defined(LUA_USE_LINUX) #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ #define LUA_USE_READLINE /* needs some extra libraries */ #endif > *) A fix to make sure that the value of MYCFLAGS actually gets passed to Lua. > This is correct, and I've committed it, in a slightly different form, see > http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?id=8199f9f94bab74e27b0eed1a52ed1125e3af62e8 > > *) A fix to make the clean in the src/ subdirectory. But I've just tested, the > main Lua Makefile already goes into the src/ subdirectory when doing "make > clean" at the root directory of Lua sources. So "make lua-clean" in Buildroot > already works fine. Which problem are you fixing here ? There are 2 Makefiles in the Lua distribution : Makefile which deals with different platforms : linux, mingw, ... src/Makefile which does the real job, and is used by LUA_BUILD_CMDS For symmetry, I want use src/Makefile in LUA_CLEAN_CMDS. The next step is to remove a part of lua-shared-libs.patch which alters Makefile. > > Again, thanks! (In reply to comment #3) > Oh, by the way, I did a test with the patch I mentionned, and readline is > indeed working in the Lua interpreter (history, Ctrl+a, Ctrl+e, etc.) A easy way to check the loading of native extension is to build LuaFileSystem, and try : $ lua -l lfs Created attachment 2371 [details]
patch only for warnings
ping for attachment "patch only for warnings" Gustavo, since you are usually maintaining the Lua stuff, could you take care of this bug? Fixed in git |
Created attachment 2305 [details] fix with the attached patch, MYCFLAGS is really used, so the support of readline and shared lib (with dlopen) works.