luvit/luvit

cross compiling

wacalei opened this issue · 3 comments

I am a beginner. I want to run Luvit on a Linux ARM 32-bit board card. What should I do?

Since Luvi 2.7.6 (we're on 2.12.0 now), luvit itself no longer provides prebuilt binaries for ARM because the servers that were used to build ARM binaries were lost. However, recently, I've stepped up to fill the gap with https://github.com/truemedian/luvit-bin to provide:

  • A posix shell script that will build luvi, lit, and luvit directly from their git sources: instructions here
  • Prebuilt binaries, built weekly, for x86_64 windows, linux, and mac, and armv6 and armv7 linux: here

If you don't know which version of arm you use, use uname -m to check

I'm not trying to flame but there are some serious issues with cross building right now as is that I'd like to point out

The MakeFile runs curl to pull a prebuilt binary
curl -L https://github.com/luvit/lit/raw/$(LIT_VERSION)/get-lit.sh | sh

Even without this being bad because there are no prebuilt lit binaries for architectures that are not x86 compatible, this is a really bad practice from a security standpoint as there is no validation process here, it literally pulls a script and runs it without any user interaction, and without any code being displayed or available to the user in the case of luvi & lit being pulled.

The other issue is that because there are no prebuilt lit binaries for foreign architectures, this fails, and following the install guide on the website it still fails because the MakeFile does this and still tries to pull this file.

The build script you posted above works and should probably be made official. Running curl within a makefile to pull prebuilt binaries even on supported platforms is not good, if a user is building from source they should be trusted to satisfy the build dependencies themself.