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

Build script doesn't work when cross compiling to Windows #39

Closed
Jake-Shadle opened this issue Aug 27, 2021 · 11 comments
Closed

Build script doesn't work when cross compiling to Windows #39

Jake-Shadle opened this issue Aug 27, 2021 · 11 comments

Comments

@Jake-Shadle
Copy link

The build script doesn't generate bindings unless running on Windows which means compiling on a non-Windows platform targeting Windows won't generate the bindings and thus fail building as seen in Jake-Shadle/xwin#10. The build script should use CARGO_CFG_TARGET_OS to determine whether it should build the bindings or not.

@ArturKovacs
Copy link
Collaborator

Hey, sorry for the slow response and thanks for the suggestion. I'm going to make the change, you suggested, but I'm afraid it still wouldn't work due to this: microsoft/windows-rs#638.

In the meantime consider using version 1 of this crate.

@ArturKovacs
Copy link
Collaborator

@Jake-Shadle I couldn't find a way to write to privately so I'm asking here: would you be interested in taking this crate over? I'd like to step away from maintaining it.

@Jake-Shadle
Copy link
Author

Uhh sorry no, I only filed this issue due to Jake-Shadle/xwin#10, I've never used this crate myself.

@ArturKovacs
Copy link
Collaborator

That's alright, thanks for the quick response anyways.

@ArturKovacs
Copy link
Collaborator

@Byron I can see that you are depending on this crate for dua-cli. Would you be interested in taking this crate over from me?

@Byron
Copy link
Owner

Byron commented Sep 7, 2021

@ArturKovacs Thanks for asking, I am happy to take it over. I also hope you would still be available for occasional help on Windows (if issues come up) as I have decent access only to MacOS.

@ArturKovacs
Copy link
Collaborator

I'm wondering if we should transfer ownership to your account, @Byron

@Byron
Copy link
Owner

Byron commented Sep 11, 2021

I am open to that, please feel free to initiate the transfer.

@qarmin
Copy link

qarmin commented May 12, 2022

Looks that this issue is already fixes in latest version of windows-rs, so only updating it from 0.9.0 version is required

trash-rs/Cargo.toml

Lines 51 to 54 in 50ab31a

# Can't update to the latest version because there was a limitation
# introduced that affects this library as well
# https://github.com/microsoft/windows-rs/pull/909#issuecomment-869595631
windows = "0.9.0"

Byron added a commit that referenced this issue May 12, 2022
but it doesn't work in the build script for some reason.
Byron added a commit that referenced this issue May 13, 2022
…fo. (#39)

We use absolute paths now without trying to generate a relative path
based on some top directory as the latter seems to be causing
inconsistencies on some linux distros, as the restore path ends
up being incorrect.

Rather go with the absolute truth and don't fiddle with path
transformations at all to make it work everywhere.
Byron added a commit that referenced this issue May 13, 2022
@Byron
Copy link
Owner

Byron commented May 14, 2022

If somebody wants to give #49 a shot…! I brought the windows crate upgrade down to 6 errors, and I think these can be fixed if somebody can figure out how to call these windows crate functions which changed their signatures quite significantly. Shouldn't be too hard, maybe @ArturKovacs could give it another try?

Byron added a commit that referenced this issue May 25, 2022
@Byron
Copy link
Owner

Byron commented May 25, 2022

Please take a look at the latest release for a fix to this problem. Since it uses no build script, there should be no related issues anymore.

Even though I am closing this issue in anticipation, please feel free to reopen if something else pops up.

@Byron Byron closed this as completed May 25, 2022
Byron added a commit that referenced this issue Jul 5, 2022
This allows to turn chrono support off without actually affecting the
ability to trash and restore items.
`chrono` still has issues to dubious local-time support which relies
on a c-library function that can cause undefined behaviour as it
accesses an environment variable in a non-threadsafe fashion.
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

Successfully merging a pull request may close this issue.

4 participants