x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -pipe -O2 -march=athlon64-sse3 -Wall -c inotify.c inotify.c:132:1: error: unknown type name ‘luaL_reg’ […] Reproducible: Always
Created attachment 323154 [details] build.log
See-Also: https://github.com/axkibe/lsyncd/issues/146
Thanks for reporting to upstream
+ 23 Sep 2012; Pacho Ramos <pacho@gentoo.org> +files/lsyncd-2.0.7-lua51.patch, + +files/lsyncd-2.0.7-lua52.patch, lsyncd-2.0.7.ebuild: + Fix compilation with lua-5.2, bug #434238 by Dennis Schridde. +
This makes lsyncd crash on lua 5.1.5: # lsyncd --help PANIC: unprotected error in call to Lua API (attempt to index a nil value) [ebuild R ] dev-lang/lua-5.1.5 USE="deprecated readline -emacs -static" 217 kB [ebuild R ] app-admin/lsyncd-2.0.7 139 kB If I remove files/lsyncd-2.0.7-lua52.patch it works fine again. (Should I file stuff like this as new issues or request this be reopened?)
This is the patch upstream applied: https://github.com/axkibe/lsyncd/commit/ab36ab782339a243a39455154ca8d3a59b4ec990 Could you please try that instead of the one in Gentoo?
$ lsyncd --help Error: preparing runner: lsyncd.lua:38: attempt to index local 'lsyncd' (a nil value) Anders: Which Lua version do you use?
Created attachment 325488 [details, diff] Patch fixing typo in lsyncd.c lsyncd.c had an undetected typo: It sets the global with name "lysncd" instead of "lsyncd". Attached patch fixes this.
Turns out my Lua 5.1 backwards compatibility patch had indeed a bug. While luaL_newlib creates a new table on top of the stack, luaL_register *uses* the one there. I recreated the commit [1]. If you still want to use these patches, make sure you use 3ab30d41295135ba88517d1a18ce8729292a1a53 (Lua 5.1 compatibility fallbacks) and not the older one. Together with the typo fix (3d065fccba86f7622f15ca1e89f22bca558b27c9) lsyncd works now when using Lua 5.1.
(In reply to comment #9) > Turns out my Lua 5.1 backwards compatibility patch had indeed a bug. While > luaL_newlib creates a new table on top of the stack, luaL_register *uses* > the one there. > > I recreated the commit [1]. If you still want to use these patches, make > sure you use 3ab30d41295135ba88517d1a18ce8729292a1a53 (Lua 5.1 compatibility > fallbacks) and not the older one. Together with the typo fix > (3d065fccba86f7622f15ca1e89f22bca558b27c9) lsyncd works now when using Lua > 5.1. [1] https://github.com/devurandom/lsyncd/commits/fix/lua52
(In reply to comment #6) > This is the patch upstream applied: > https://github.com/axkibe/lsyncd/commit/ > ab36ab782339a243a39455154ca8d3a59b4ec990 > > Could you please try that instead of the one in Gentoo? lsyncd-2.0.7-lua51.patch + that patch works with lua 5.1.5
(In reply to comment #11) > (In reply to comment #6) > > This is the patch upstream applied: > > https://github.com/axkibe/lsyncd/commit/ > > ab36ab782339a243a39455154ca8d3a59b4ec990 > > > > Could you please try that instead of the one in Gentoo? > > lsyncd-2.0.7-lua51.patch + that patch works with lua 5.1.5 If you use the patch by upstream, you don't need any of the Gentoo patches anymore. You just need the typo fix (attachment #325488 [details, diff]). Thanks for testing!
Created attachment 325530 [details, diff] Patch fixing typo in lsyncd.c applied to lsyncd 2.0.7 Attachment #325488 [details, diff] probably applies to HEAD, this applies cleanly to 2.0.7.
(In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #6) > > > This is the patch upstream applied: > > > https://github.com/axkibe/lsyncd/commit/ > > > ab36ab782339a243a39455154ca8d3a59b4ec990 > > > > > > Could you please try that instead of the one in Gentoo? > > > > lsyncd-2.0.7-lua51.patch + that patch works with lua 5.1.5 > If you use the patch by upstream, you don't need any of the Gentoo patches > anymore. You just need the typo fix (attachment #325488 [details, diff] [details, diff]). > > Thanks for testing! Didn't apply cleanly, but patching with upstream fix + #325488 works for lua 5.1.5 :)
Should be fixed in 2.1.3 now in CVS.
checking whether Lua library was compiled with compat support... no configure: error: Lua library needs to be compiled with compat support -> DEPEND is broken, should be: || ( >=dev-lang/lua-5.1 >=dev-lang/lua-5.2[compat] )
(In reply to comment #16) > checking whether Lua library was compiled with compat support... no > configure: error: Lua library needs to be compiled with compat support > > -> DEPEND is broken, should be: > || ( >=dev-lang/lua-5.1 >=dev-lang/lua-5.2[compat] ) Sorry, I meant: > || ( >=dev-lang/lua-5.1 >=dev-lang/lua-5.2[deprecated] )
Created attachment 331148 [details, diff] lsyncd-2.1.4 for Lua 5.2 without compat enabled (In reply to comment #16) > checking whether Lua library was compiled with compat support... no > configure: error: Lua library needs to be compiled with compat support > > -> DEPEND is broken, should be: > || ( >=dev-lang/lua-5.1 >=dev-lang/lua-5.2[deprecated] ) Attached patch fixes this issue by patching lsyncd to no longer require Lua 5.1 compatibility enabled.
(In reply to comment #18) > Created attachment 331148 [details, diff] [details, diff] > Attached patch fixes this issue by patching lsyncd to no longer require Lua > 5.1 compatibility enabled. Upstream that. Fixed lua dep in 2.1.4.