hoelzro/inline-lua

Library problems during cpan install attempt

docnux opened this issue · 5 comments

Hello,

I got a LUA 5.2.4 zip from https://sourceforge.net/projects/luabinaries, extracted it to C:\progs\lua which now contains lua52.dll, lua52.exe, luac52exe, and wlua52.exe.
I added ";C:\progs\lua" to the PATH variable.
Then I tried to install Inline::Lua using the cpan tool.
cpan complains:

C:\progs\perl\perl\bin\perl.exe Makefile.PL -- NOT OK Stopping: 'install' failed for 'Inline::Lua'. Failed during thiscommand: RHOELZ/Inline-Lua-0.10.tar.gz : writemakefile NO 'C:\progs\perl\ perl\bin\perl.exe Makefile.PL' returned status 256

I issued the "perl Makefile.PL" manually to get a detailed info, which is:

4 times "path not found", then:

******************************************* Couldn't find a working Lua installation on this machine. This is required for this module. To obtain it, go to ...******************************************* If Makefile.PL failed to find your Lua installation, you can specify INC and LIBS flags directly: perl Makefile.PL INC=-I/usr/include/lua5.1 LIBS=-llua5.1 (You can also specify INC/LIBS using PERL_MM_OPT)

Then I issued:

perl Makefile.pl INC=-I/c:\progs\lua LIBS=lua52.dll

Result:

Warning: prerequisite Inline 0 not found. Warning (mostly harmless): No library found for lua52.dll Generating a dmake-style Makefile Writing Makefile for Inline::Lua Writing MYMETA.yml and MYMETA.json

Is the library warning really harmless?
Then I tried:

C:\progs\perl\cpan\build\Inline-Lua-0.10-REokfU>dmake -f Makefile

Result:

Skip blib\lib\Inline\Lua.pm (unchanged) Running Mkbootstrap for Inline::Lua () "C:\progs\perl\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Lua.bs" gcc -c -I/c:\progs\lua -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IM PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields - s -O2 -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" "-IC:\progs\perl\perl\lib \CORE" Lua.c Lua.xs:13:17: fatal error: lua.h: No such file or directory #include <lua.h> ^ compilation terminated. dmake: Error code 129, while making 'Lua.o'

Now, I am stuck.

Any help?

Thanks,
Detlef.

Perl v5.22.1 64 bit Windows 7

Hi @docnux,

It doesn't hurt to install the Inline module, as you will need it eventually anyway. Regarding your other build problems, you'll need to install the Lua headers. Unfortunately, I don't do a lot of work on Windows, so I don't know if there's an alternative Lua binaries download that provides them, or if you'll just need to build Lua yourself.

Hi hoelzro,

I installed Inline without problems. No change.
Got the h-files and copied them to the Perl CORE. Still fails (although differently).
Tried to compile lua myself whithout much success (have to work under WinDoze).
A colleague will help soon. Maybe he gets lua to work (he should as he uses lua quite a lot).

Hi hoelzro,

I installed Inline without problems. No change.
Got the h-files and copied them to the Perl CORE. Still fails (although differently).
Tried to compile lua myself whithout much success (have to work under WinDoze).
A colleague will help soon. Maybe he gets lua to work (he should as he uses lua quite a lot).

Hello hoelzro,

we got it running. For you and others who run into the same problem:

The Windows binaries supplied by lua.org are problematic. We dropped them compiled Lua ourself (and with static libraries).
Then we discovered that Inline::Lua doesn't support LUA 5.2 (which we need). Therefore we dug into the lua.xs code and modified it a bit (diff attached).
Now the sequence "perl Makefile.PL; make; make install" succeeded.

Best regards,
Detlef.

Uploading diffout.txt…

@docnux Thanks for following up; there just so happens to be a pull request in the works for 5.2 support: #21