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

Gradle build on Windows requires admin privilege #185

Closed
Athosvk opened this issue Aug 7, 2024 · 3 comments
Closed

Gradle build on Windows requires admin privilege #185

Athosvk opened this issue Aug 7, 2024 · 3 comments

Comments

@Athosvk
Copy link
Contributor

Athosvk commented Aug 7, 2024

It seems that when attempting to build with gradle on Windows, the creation of a symlink can fail due to lack of privilege.

[2/3] Build rust `[...]`
[3/3] Create apk
Error: A required privilege is not held by the client. (os error 1314)

(Note that these errors are quite hard to find, it would probably help to annote a lot of the system calls with context)

It turns out the culprit is this line in gradle\mod.rs, when packaging the specified assets from the manifest:

std::os::windows::fs::symlink_dir(&path, &target)?;

As noted in the docs, dir symlinks require admin privilege., but it's not clear that xbuild requires admin rights for running. If it's not desired to have xbuild run as admin (which I assume it isn't), maybe there should be a fallback for if sym link creation fails?

@MarijnS95
Copy link
Member

MarijnS95 commented Aug 7, 2024

Notice that this code is not available in this repo, but only on a preliminary test-commit of mine on our fork: Traverse-Research@d5ebb6e

Perhaps this isn't the right place to report this.

@MarijnS95
Copy link
Member

I did however move it out to a PR in #146, which is where we should handle this as review?

@MarijnS95 MarijnS95 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
@MarijnS95
Copy link
Member

Closing to move into #146.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants