-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
x86_64-pc-windows-gnu target failing #7
Comments
The nixpkgs-mozilla version also gives me an error on my machine
|
Might be related to rust-lang/cargo#8239 |
The error you are getting ( -buildInputs = with pkgs.pkgsCross.mingwW64.windows; [ mingw_w64_pthreads ];
+buildInputs = with pkgs.pkgsCross.mingwW64.windows; [ mingw_w64_pthreads pthreads ]; And by the way, there is a typo in the example you provided: combine [
minimal.rustc
minimal.cargo
- targets.x86_64-unknown-linux-musl.latest.rust-std
+ targets.x86_64-pc-windows-gnu.latest.rust-std
]; Though I still get this error for both examples. |
Sorry about the typos. I attempted to clean up the file before submitting and apparently removed some of the wrong lines. This is what I ended up using: https://github.com/gcoakes/img-sort |
I decided to turn my adventures in mingwW64 cross compilation into a pull request for naersk. Here's two commits showing the same process first with fenix then with nixpkgs-mozilla. The former fails; the later succeeds. Of particular note here, the actual |
I found the problem! nix-community/fenix@dfd5ba should fix it. I tested it with the example you provided. |
@figsoda , thank you. It seems to have fixed my issue. I updated my pull request to naersk to use fenix instead of nixpkgs-mozilla in the hopes of spreading flakes around a bit more. I unfortunately hit another issue, but I doubt it's related to fenix. It seems like naersk or probably nixpkgs is attempting to link to pthreads even for build scripts. Build scripts are of course meant to be built for the native platform. Either way, this doesn't affect basic "hello world" like projects. Thank you for your help. |
Sorry for bringing this up here, but it's the only other reference I can find to this issue. How did you manage to fix this error? The latest fenix/naerks don't seem to have solved it. |
Hacky solution nix-community/naersk#181 (comment) |
I am unable to cross compile for mingw-w64 target using fenix while I am able to with nixpkgs-mozilla. Using the following flake.nix, naersk and fenix would fail to compile a hello world project. If I replace only the toolchain with one created from nixpkgs-mozilla, it compiles properly, so I believe that points towards fenix being the culprit.
fenix:
nixpkgs-mozilla:
The text was updated successfully, but these errors were encountered: