Closed adsick closed 2 years ago
SELinux is enabled by default on Fedora, which disallows marking part of the heap as executable. Try enabling the selinux-fix
feature of cranelift-jit in Cargo.toml, which causes mmap
to be used instead. See https://github.com/bytecodealliance/cranelift/issues/772.
how to "enabling the selinux-fix feature of cranelift-jit in Cargo.toml"
Replace this line https://github.com/bytecodealliance/cranelift-jit-demo/blob/e120e20ebf410597b6973551229fec029506192e/Cargo.toml#L13 with cranelift-simplejit = { version = "0.68.0", features = ["selinux-fix"] }
.
finally worked, thanks you, dude. mb add it as a comment in Cargo.toml so others will see and uncomment this piece in case they get in the same problem?
my OS: Fedora 33, Rust: 1.49.0
so when I do cargo run in "cranelift-jit-demo-main" it compiles but then:
why is it so and how do I fix it (or rather it should be fixed somewhere in the actual project, I dunno)