-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
MinGW-W64 cross-compilation bug roundup #24984
Comments
The last time I checked, the C++ |
what's the status here? :) |
IIRC there have been some major changes to the Nix cross compilation framework by @Ericson2314, not sure how this is affected by that. |
Assuming we can speed up reviewing enough that less-effiencient development in parallel working, lets get everything in #30882 merged first, then all the non-mingw cross tests (https://hydra.nixos.org/jobset/nixpkgs/cross-trunk) should be passing. Then it will be easier to go after mingw stuff in isolation. |
@angerman any of this remains? |
@Ericson2314 bumping mingw certainly. There some other strange linking issues I’m currently following. Not sure if this is only related to the Haskell builder or a broader issue. |
Hi, I am trying to cross compile my package which uses std c++11 features like std::mutex which seems to be supported with mingw w64 with posix threading model. Any idea what needs to be done to get mingw w64 with posix threading model with nixpkgs? |
@tex I can't remember if I ever got that working, but I remember running into issues like that when working on this project, so you can search in that code for clues. Note that that code is written for the old version of nixpkgs cross-compilation, but the answer you seek should be agnostic to that. |
@tex I gave a quick summary of what I think needs to happen in my last comment (from two years ago): #24984 (comment) |
Thanks. So if I understand correctly, current nixpgs builds just one-stage gcc which leads to use of win32 threading model that doesn't support c++11.
So two-stage is needed, first stage to build current mingw-w64 that will be used to build winpthreads which will be used in second stage. Correct? Is it feasable to do that with what currently is laid out in nixpgs (pkgs/os-specific/windows/...)? I wish I knew more about nix syntax... |
@tex, I've tried to get this working for us. About half a year ago in a bid to cross compile While I did manage to mutilate a nixpkgs configuration bad enough to have a gcc with winpthreads, I ended giving up on it as I could not produce a If you dig deeper into the whole threading situation with ming32 and c++, it's not pretty. I'm thankful we haven't run into any other annoying c++ code, and thus did not have to revive the need. |
Hi @angerman, do you still have the nix configs for the gcc with pthreads so I could use them for my experiments? |
@tex not sure how complete this is, but there are a few commits here: https://github.com/angerman/nixpkgs/tree/feature/gcc-ng, you may want to look for commits by me around the same time to that repo as well. |
With #73195 the C++ concurrency datatypes should now be available. |
SDL2 builds broken .la files, saying the application should look for a |
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
Currently, not a user of mingw-w64 cross-compilation on nix. But I plan to use it in the nearest future and don't know beforehand whether I will be affected by the issue. |
I marked this as stale due to inactivity. → More info |
@leo60228 Do you know of a fix for this? I'm currently x-compiling SDL2 to mingwW64 (for use with the Haskell sdl2 bindings), and I'm getting errors that may be caused by this (Haskell build cannot find |
I marked this as stale due to inactivity. → More info |
Issue description
I'm going to use this issue as a dumping ground for any bugs I find while fixing stuff related to the MinGW-W64 cross-compilation feature of nixpkgs.
Bugs
mingw-w64
should be upgraded to the latest version5.0.25.0.3coreutils
build is broken becauseattr
needssys/resource.h
.attr
for Windows (it's only needed for displaying extended file attributes inls
), we should just setattr = null
when building with MinGW-W64.(coreutils.override { attr = null; })
in vanilla (non-cross) nixpkgs and it worked, soattr
really is an optional dependency here.coreutils
forWindows
is not particularly useful anyway, but since I've already figured out a fix for it I thought I should write it down somewhere, in case someone really does need it to build.libsigsegv
fails to build with the following error:std::future
working. See MinGW-W64 cross-compilation bug roundup #24984 (comment)Other notes
If you currently use the MinGW-W64 cross-compilation support in nixpkgs, please let me know if there are any specific packages I should try to keep working.
cc @DavidEGrayson
cc @cleverca22
The text was updated successfully, but these errors were encountered: