lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Jul 23, 2011 at 02:53:45AM +0200, Tom N Harris wrote:
> On 07/22/2011 03:48 PM, Shmuel Zeigerman wrote:
> > Even with no other libraries, ffi.dll (built from GIT head) segfaults
> > when running test.lua. What's odd, when I rename test.lua to
> > test_modif.lua, it runs OK. The reason (I think) - my lua5.1.dll and
> > lua.exe are built with MinGW.
> >
> 
> You may need this patch. (I sent James a mail, but it may have gotten 
> nulled.)
> 
> diff --git a/ffi.c b/ffi.c
> index 4e9f1df..98e326a 100644
> --- a/ffi.c
> +++ b/ffi.c
> @@ -1699,6 +1699,7 @@ static const luaL_Reg cmodule_mt[] = {
> 
>   static const luaL_Reg jit_mt[] = {
>       {"__gc", &jit_gc},
> +    {NULL, NULL}
>   };

While in the luaffi directory, I saved this message to a new mbox one 
level below (having pulled James's repo) and typed:

    $ git am ../luaffi.mbox

getting

~~~~
Applying: luaffi (ffi library ala luajit's for the standard lua vm)
error: patch failed: ffi.c:1699
error: ffi.c: patch does not apply
Patch failed at 0001 luaffi (ffi library ala luajit's for the standard lua vm)
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
~~~~

So I aborted and edit the file by hand.  Easy enough in this case, but
for a longer and more complicated patch it will not be so pleasant.

I'm still at the stage where I keep open `man gittutorial` in another 
window whenever I use git, so I have no idea what is wrong here.

Dirk