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 crosscompile trash-rs after updating to 2.0.1 #27

Closed
qarmin opened this issue May 6, 2021 · 1 comment · Fixed by #28
Closed

Cannot crosscompile trash-rs after updating to 2.0.1 #27

qarmin opened this issue May 6, 2021 · 1 comment · Fixed by #28
Labels
bug Something isn't working enhancement New feature or request

Comments

@qarmin
Copy link

qarmin commented May 6, 2021

After updating to the latest version, I got this fatal error

error: couldn't read /home/runner/work/czkawka/czkawka/target/x86_64-pc-windows-gnu/release/build/trash-f33a0c13f66e2bf6/out/windows.rs: No such file or directory (os error 2)
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/trash-2.0.1/src/windows.rs:18:5
   |
18 |     ::windows::include_bindings!();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `trash`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Process completed with exit code 101.

I'm using Ubuntu 20.04 and Mingw to crosscompile app to Windows

CI - https://github.com/qarmin/czkawka/pull/321/checks?check_run_id=2518327467

@ArturKovacs ArturKovacs added the bug Something isn't working label May 6, 2021
@ArturKovacs ArturKovacs added the enhancement New feature or request label May 6, 2021
@ArturKovacs
Copy link
Collaborator

I gave it my best shot and failed: #28

Cross compilation doesn't seem to be possible with the current version of windows-rs. See: microsoft/windows-rs#638

The additions since version 1 of trash-rs are not possible to implement using winapi, as it was described here: #11 (comment)

So the solution I'd suggest to you is to keep using the latest of version 1 of trash-rs, if you don't want to build natively on Windows. If you do manage to solve this, a PR would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants