sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.64k stars 96 forks source link

configure issue "cannot find suitable Lua interpreter" #412

Closed indiamcq closed 7 years ago

indiamcq commented 7 years ago

When running: yaourt -S sile. When it is running the equivalent of configure it returns:

checking for Lua interpreter with version >= 5.1... none
configure: error: cannot find suitable Lua interpreter
==> ERROR: A failure occurred in build()

Lua 5.3 is installed in /etc/bin/. On one try I even added lua as a dependency and it showed up as installed. It seems like the configure script is looking in the wrong place. I'm building on a prebuilt 64 bit Arch Linux from osboxes.org

I get a similar error in Win 10 running msys64 when at ./configure

Starting to think maybe it is looking for 32bit lua.

Ian

alerque commented 7 years ago

Hey @indiamcq, I'm sorry you're having trouble getting started here. I'm the maintainer of the Archlinux package that you're getting. I can't speak to the Win 10 issue, but the Arch one I'll look into.

So far I'm unable to duplicate this. I just installed the package yesterday on a box and it worked. The included Lua rock dependencies should be enough to guarantee Lua is available too, but I'll look into including it directly. By the same token it shouldn't matter either way if you have lua installed on your system.

Can you run env lua -v and let me know if it gives you a version string?

Also in the mean time you might try the development package as it will build from the latest git version (which is rather active and might be a better place to start from) instead of the last released version. Running yaurt -S sile-git should get you there.

alerque commented 7 years ago

Additional question: do you have luajit installed? Perhaps you could post the output of pacman -Qs lua so I can compare your installed Lua related packages with mine.

indiamcq commented 7 years ago

I am trying on two different Virtualboxes The issue I reported was on:

  1. pre-made vdi from Arch Linux 201608 64bit at http://www.osboxes.org/arch-linux/ no luajit image

Fails here: archlinux-lua env2

  1. Vagrant built from http://cloud.terry.im/vagrant/archlinux-x86_64.box This seems a less barebones build. image

This one fails because it can't find lua-lpeg. I installed lpeg via luarocks in both system and local. The AUR build sees it and accepts it is installed the package check but not in the configure check.

On this one I have also done a source install that needs a eval luarocks path so it finds the local installed rocks then the configure ends without errors. At first it was missing the libtexpdf but ager running the AUR builds (that failed on lua-lpeg still) the source build has worked. The first build of examples/usx/usx.sil produced a page with only a number on the bottom. Progress is slow but it is progress.

alerque commented 7 years ago

Hey @indiamcq thanks for the information. Here's my initial thoughts:

  1. The first system is entirely borked and it's not SILE's fault. The fact that env lua is throwing errors about readline means the system is seriously screwed up. Don't even bother playing around with SILE until you have that straightened out. I would start with a complete distribution upgrade (pacman -Syu), the possible force the reinstall of the core readline library as well as Lua (pacman -S lua readline). Reboot to be running the updated kernel and glibc stuff. If those things don't get env lua working then we need to find your some more Arch system support, but that VDI sounds like its seriously broken. Are you sure the checksums validated on the image? This is the kind of thing that could even have been a corrupted image file or bit rot on disk.

  2. This one is more subtle. You shouldn't need to install anything manually with Lua-rocks, the AUR packages that satisfy the dependencies for lua-* should do the trick. I suspect you now have some miss-match going on between Lua versions. Even though the default Lua executable is the 5.3 version (and the lua-lpeg package is for 5.3), I suspect the pkgconfig system is finding the 5.2 version of Lua for some reason.

    • Why is Lua 52 even on this system? You might look at pacman -Si lua52 and check the Required By line and see if it has a valid reason for existing at all.

    • Is your lua.pc file actually owned by the Lua 5.3 package (pacman -Qo /usr/lib/pkgconfig/lua.pc)? And is it the same as mine as of this writing? (md5sum /usr/lib/pkgconfig/lua.pc = 400b0d1b454ff48dfb975f03526b7214)?

    • If you run lua on the command line does it find lpeg? Running lua -e "print(require('lpeg'))" should print a table id (as opposed to "module 'lpeg' not found"). How about if you run it with lua5.2 -e "print(require('lpeg'))"? This might at least confirm my hunch about it defaulting to the wrong lua.

alerque commented 7 years ago

I just noticed another anomaly in the output for both of these systems. Both the main Lua packages and the assorted rock dependencies are all showing up as local/* packages only. This suggests that they were all custom compiled from AUR sources. However Archlinux actually has all of these things pre-packaged in their extras repository. Do these machines not have the extras repository enabled in their pacman config?

On my system some of the lua packages are coming from community and some are coming from extra, but none of SILE's dependencies are being compiled from AUR, only the SILE package itself.

indiamcq commented 7 years ago

Thanks @alerque for your input.

The only way I could get past not recognizing the lpeg was to do a local install of the luarocks. Then run eval luarocks path Then the source install ./configure would finish without error. But it did not help the AUR install.

Using the install from source I now have sile working on the vagrant box for some things. Though not yet on the xml USX or OSIS examples working.

When I get some more time I will do my own install of Arch and see if I can do the AUR install then. It seems like a great way to do it. On the osboxes machine it did not have git installed so adding that as a dependency would seem to improve you AUR package.

The Vagrant box does have Lua5.2 as well.

Thanks again. Don't spend any more time on this as I can experiment now. Ian

alerque commented 7 years ago

But it did not help the AUR install.

Per my second comment, the luarocks should never need to be installed from the AUR, Archlinux has prebuilt packages for all of SILE's dependencies in either the community or extra repositories. Did you check on why your installs were even looking in the AUR in the first place? They shouldn't need to except for SILE itself.

indiamcq commented 7 years ago

Good news.

I down loaded the Arch-Anywhere ISO and used that to create an Arch system from scratch with a LTS kernel and the devel option. The AUR install when through except for the missing git dependency. Once I added that to the dependencies is all installed. Yeah. Thanks Simon and @alerque for the good work.

I did try and install from the archlinux.org ISO but it was beyond my Linux abilities.

alerque commented 7 years ago

@indiamcq The git dependency is not really missing. According to the Archlinux packaging guidelines, anything in the AUR can assume the presence of the devel base package set which includes git. Ouch I take that back, git was dropped from the base-devel set. I'll add it as a dependency for the sile-git package right away. It shouldn't be needed for the sile package, but the git one sure needs it to build!

alerque commented 7 years ago

I just fixed the git dependency thing, you shouldn't run into that again.

alerque commented 7 years ago

@indiamcq I think I'm going to close this issue because there isn't anything here than needs to be fixes as part of SILE. The program itself compiles fine if done on a normal operational system with Lua and Pkgconfig working properly. Ergo SILE itself isn't broken.

Furthermore the AUR packages don't seem to be broken because they work on normal Archlinux systems. Although we haven't determined what's going on with Lua not being in the path even when installed or Pkgconfig not finding the lua rocks, those issues are specific to prebuilt images from some other vendor where those things are compiled by the vendor and not installed from the arch packages. I would actually recommend asking on a SE site such as here about why pkgconfig isn't doing it's job, why lua isn't in the environment on that image, etc.

Personally I'm happy to help you with Arch + Sile related things so you can drop a comment here, catch me on Gitter, or look me up elsewhere if you need help. I just don't see anything to fix on behalf of SILE here so this issue shouldn't be "open".