Open 7v0lk0v opened 10 months ago
To be clear, is this using a Terra pre-built binary, or an LLVM pre-built binary? Can you link the specific binary you used?
What distro and version is this?
Sorry for muddling things a bit. Yes, this is using the pre-built binary: terra-Linux-x86_64-094c5ad
And I should've mentioned this, I'm running via a voidlinux chroot: void-x86_64-ROOTFS-20230628 not the musl version, just regular glibc (I'm running on a musl system, hence the chroot).
The official Terra binaries are compiled on Ubuntu 18.04. Cross-distro usage is always a bit screwy. Sometimes it works (e.g., I've tested Ubuntu -> RHEL), but it's not hard to see it blowing up on you.
If you have working LLVM/Clang binaries you may be able to build Terra yourself. On Ubuntu, you'd need something like:
sudo apt-get install llvm-15-dev libclang-15-dev clang-15 libmlir-15-dev libedit-dev libncurses5-dev zlib1g-dev libpfm4-dev
The exact set of dependencies depends on how LLVM is packaged. LLVM can be built without any external dependencies, but the Debian/Ubuntu packagers choose to include some (as noted above).
You may need to fiddle with CMAKE_PREFIX_PATH
to tell it where LLVM is installed.
Alternatively, if the packaged LLVM doesn't work for you, there's a build recipe here that is guarranteed to work with Terra, but will take a while to build (depending on how beefy your machine is):
https://github.com/terralang/terra/tree/master#instructions-for-building-llvm-from-source
Good luck!
Fair enough, might try an ubuntu chroot first then. Thanks.
This is using the pre-built downloaded binary and tests.
I had a total of 12 (including this one) seemingly simple tests fail but strangely the rest passed.
Another odd thing I found is different behaviour between running using
terra
and thesimple.cpp
example (which I was able to compile and run but it dies with the same error as above, as well as the next example):Running the following shows the different behaviour:
System:
Not sure what other info I can provide, but happy to help.