Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile on arm64 #11

Closed
kylewillmon opened this issue Sep 27, 2022 · 0 comments · Fixed by #12
Closed

Does not compile on arm64 #11

kylewillmon opened this issue Sep 27, 2022 · 0 comments · Fixed by #12
Assignees
Labels
bug Something isn't working high priority This should be addressed immediately

Comments

@kylewillmon
Copy link
Contributor

The rust-landlock crate does not compile on arm64. It fails with the following error:

error[E0425]: cannot find value `__NR_LANDLOCK_CREATE_RULESET` in this scope
Error:   --> /home/runner/.cargo/git/checkouts/rust-landlock-d80c47128915e4ea/1e09cb0/src/uapi/mod.rs:41:13
   |
41 |     syscall(__NR_LANDLOCK_CREATE_RULESET as i64, attr, size, flags) as c_int
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `__NR_LANDLOCK_ADD_RULE` in this scope
Error:   --> /home/runner/.cargo/git/checkouts/rust-landlock-d80c47128915e4ea/1e09cb0/src/uapi/mod.rs:47:13
   |
47 |     syscall(__NR_LANDLOCK_ADD_RULE as i64, ruleset_fd, rule_type, rule_attr, flags) as c_int
   |             ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `__NR_LANDLOCK_RESTRICT_SELF` in this scope
Error:   --> /home/runner/.cargo/git/checkouts/rust-landlock-d80c47128915e4ea/1e09cb0/src/uapi/mod.rs:51:13
   |
51 |     syscall(__NR_LANDLOCK_RESTRICT_SELF as i64, ruleset_fd, flags) as c_int
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `landlock` due to 3 previous errors

Here is a link to the code where it is clear that those constants are only defined for the x86_64 architecture.

@kylewillmon kylewillmon added bug Something isn't working high priority This should be addressed immediately labels Sep 27, 2022
@andreaphylum andreaphylum self-assigned this Sep 28, 2022
@kylewillmon kylewillmon linked a pull request Sep 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority This should be addressed immediately
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants