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

gfortran: fix build for mingwW64 #223947

Closed
wants to merge 1 commit into from
Closed

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Mar 30, 2023

Description of changes

This fixes the following compilation error, e.g. observable when building pkgsCross.mingwW64.lapack-reference:

../../../gcc-12.2.0/libgfortran/io/async.h:354:3: error: unknown type name 'pthread_t'
  354 |   pthread_t thread;
      |   ^~~~~~~~~

The fix is to replace pthread_t with __gthread_t (which is what pthread_t is defined as in other places), though I am not sure why this is necessary for mingwW64 cross compilation.

I included the test for GCC 11 and 12; I guess that it works for older versions too, but I haven't tested it.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/2152

@amesgen
Copy link
Member Author

amesgen commented Dec 7, 2023

This seems to have been fixed by #268097 as a side effect, closing.

@amesgen amesgen closed this Dec 7, 2023
@amesgen amesgen deleted the mingw-gfortran branch December 7, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants