Skip to content

gfortran: fix build for mingwW64#223947

Closed
amesgen wants to merge 1 commit intoNixOS:masterfrom
amesgen:mingw-gfortran
Closed

gfortran: fix build for mingwW64#223947
amesgen wants to merge 1 commit intoNixOS:masterfrom
amesgen:mingw-gfortran

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.

@amesgen amesgen requested a review from matthewbauer as a code owner March 30, 2023 19:45
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 30, 2023
@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

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants