terralang / terra

Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
terralang.org
Other
2.72k stars 201 forks source link

libffi.so.6 not found #468

Open johannphilippe opened 3 years ago

johannphilippe commented 3 years ago

Hello ! I reinstalled my Linux mint system recently, and it seems Terra (last beta build) doesn't find the current version of libffi (libffi.so.7). It keeps looking to the libffi.so.6 (which is not natively on the apt repo I think since Linux mint 20). Instead of installing an older version, I just created a symlink, and it works. I guess something could be done for version detection ? Or does Terra specifically wants to use libffi.so.6 ?

Thanks !

elliottslaughter commented 3 years ago

I think this is just an issue with the binary. The builds are done on Ubuntu 16.04 and may or may not work on another distro.

We've thought about trying to do builds via Holy Build Box but I don't know if that would actually fix this issue.

johannphilippe commented 3 years ago

I don't have any experience with Holy Build Box. Are the current release binaries built with AppVeyor ? Or is it manually built with CMake ? The current issue is not a big one, easily fixed. Maybe some minor change to configuration files could solve it.

elliottslaughter commented 3 years ago

The Linux releases were done with Travis. You can see the configuration in the root of the repository.

If there is an easy fix we're certainly happy to hear about it.

noxabellus commented 3 years ago

Just as a heads up since yall are working on releases now, this is still a problem. Honestly I think just updating your build machine to the current LTS version of Ubuntu would go a long way for compatibility all around, 16.04 is over 5 years old after all

elliottslaughter commented 3 years ago

We already moved the CI to 18.04, so it would be relatively easy to do a release with that.

However, I don't think this issue will ever go away completely. There just seems to be too much that changes between consecutive LTS releases these days. Hypothetically, if that settled down, we could do a "one release to rule them all", but otherwise we're stuck with picking a recent-ish LTS (and realizing that the other 1-2 supported LTS versions may break, not to mention other distros).

elliottslaughter commented 2 years ago

Please try the latest 1.0.1 (or even 1.0.0) release. I put in a fair bit of effort before 1.0.0 to make the binaries truly portable. Just today I was able to confirm a binary built on Ubuntu 18.04 runs on RHEL 8 (as well as Ubuntu 20.04, 22.04, ...). We seem to have achieved much better portability. The biggest difference is I do all custom LLVM builds with minimal dependencies, so we really only care about libc and libstdc++ versions now. As long as those are new enough, it'll probably work.