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

Cannot create rlibs when run in sandboxie #54297

Closed
retep998 opened this issue Sep 17, 2018 · 3 comments
Closed

Cannot create rlibs when run in sandboxie #54297

retep998 opened this issue Sep 17, 2018 · 3 comments
Labels
O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@retep998
Copy link
Member

rustc main.rs where the crate type is bin works just fine.
rustc lib.rs where the crate type is rlib fails with this error:

> rustc lib.rs
error: failed to build archive: permission denied

error: aborting due to previous error

Given the importance of sandboxing when building and testing random code off the internet, we should really try our best to support sandboxie.

@retep998 retep998 added O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 17, 2018
@Enselic
Copy link
Member

Enselic commented Oct 15, 2023

Triage: Does this still reproduce? Wanted to check since 5 years has passed and circumstances might have changed.

If this still reproduces, can you please add step-by-step instructions on how to install sandboxie and install rustc inside of it? That makes it much easier for devs to debug this. Thanks!

@ChrisDenton
Copy link
Member

ChrisDenton commented Oct 15, 2023

Seems to work for me now. Steps I took: installed Sandboxie and ran cmd using the default sandbox. Created a lib.rs file containing the following:

#![crate_type = "rlib"]

pub fn add(a: u32, b: u32) -> u32 {
    a + b
}

Then I ran rustc lib.rs. It completed without error and successfully produced a liblib.rlib file.

@ChrisDenton
Copy link
Member

Closing as fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants