Closed icmccorm closed 5 months ago
You seem to be pretty deep into this, if you'd like to have more of a conversation than GitHub accommodates we have a #miri stream in the Rust Zulip: https://rust-lang.zulipchat.com/
I can't figure out how to build your fork of Miri, the normal process complains:
error: No suitable version of LLVM was found system-wide or pointed
to by LLVM_SYS_160_PREFIX.
I suspect the problem you're running into is related to the fact that the miri
executable is always linked to librustc_driver
which is always linked to libLLVM
. I guess you're coordinating LLVM versions between your rustc_driver
and inkwell
? How?
And just to get this out of the way, I'm an Arch user, Miri development works great on Arch.
Thanks for your response!
The purpose of the fork is to explore executing foreign functions in Miri using the LLI interpreter. That's why we have the llvm-project submodule; we needed to add a few C API functions to LLVM's ExecutionEngine to be able to use Miri's memory operations in place of LLI's.
We set the LLVM_SYS_160_PREFIX
variable to llvm-project/build
. This build is only used for Miri, and shouldn't be installed anywhere else.
I'm pretty new to using the llvm toolchain, so I'm entirely unsure if our build of LLVM could be conflicting with what librustc_driver
expects. I'm attempting to recreate this issue on a different machine, and I'll follow up on the Zulip channel!
So to be clear, if you are trying to build unpatched Miri, that works or doesn't work? Note that Miri needs a nightly version of Rust. The recommendation is to use ./miri toolchain
to set up the right version.
If you want to change LLVM, you'll have to build a custom rustc and then build Miri against that. Otherwise you'll likely end up with 2 copies of LLVM, one in rustc and one in Miri, and I can't imagine that going well.
https://github.com/icmccorm/miri/ does not exist any more, and I don't think there's anything actionable for us here.
When building Miri from source, we've encountered the following error:
This occurs when running the test suite with
./miri test
or runningcargo miri <subcommand>
in any context after./miri install
.We've been able to reproduce this error after fully uninstalling the entirety of Rust, deleting and recloning the repository, and following the steps listed in CONTRIBUTING.md.
Only the stable toolchain (
stable-x86_64-unknown-linux-gnu
) is installed aside frommiri
. The machine we're using is running Arch (6/1 release). The native C/C++ compiler is clang 15.0.7. We're building a fork of miri, which is up to date with commit 1a80d1 on May 13th. We've seen the same error appear when runningcargo miri setup
in latest release of miri in nightly, but this error does not occur in that configuration when runningcargo miri run
orcargo miri test.
Are there any configuration options we should try and modify to fix this? Thanks!