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
gcc7 libstdc++ on darwin fails to compile #73319
Comments
I got same issue
Metadata
|
I get the same issue on NixOS. I don't believe this is Darwin-specific. |
Several of us on irc are seeing this issue as well, across diverse packages.
https://gist.github.com/tbenst/30758ffed0d3c7b1a03515dd6b84e318 edit: I can confirm that f5ddd10 does not have this issue |
It has been fixed by #73423 |
Sorry late to the party. Will test and close, unless it's still broken then I'll change the title. |
Tested few times again, rebases and darwin system update, and this is still there. We must have been referring to a different bug. I'm clueless about why I encounter this. I'm not a heavy darwin user and I haven't done much to my MacBook Pro. I may add these warning that appear, if they mean anything
|
Hi from the distant future, 3 months later. I am experiencing this exact problem. GCC 9 and GFortran 9 also fail to compile with a similar error about (Background: I have Nix installed to the nonstandard location I've done some digging and I think I have a lead on what's causing this (but no solution yet). Having seen what's wrong, it's actually surprising to me that GCC builds on any Darwin computer. We really need to figure out why our systems are different from the Nix build farm. Here are the relevant snippets, in order from "easiest to obtain" to "hardest to obtain". GCC 9 failure when compiling libgomp:
With GCC 8 I get the same build failure in the original issue description, which is worded differently but is essentially the same. One of the many messages printed when configuring libgomp:
Aha, now that's suspicious. The
How did the configure script find it? Here's a look at libgomp's
So, here's my hypothesis:
|
New hypothesis: this issue is specific to MacOS 10.15 (Catalina). The 10.15 system libraries include
Ultimately, I think the problem is a disagreement between the version 10.12 headers that Nix uses and the actual binary API offered by the system libraries. GCC fails to build because |
MacOS 10.15 now includes "aligned_alloc". Disagreement between the headers and the binaries about whether aligned_alloc exists leads to a compilation failure (see NixOS#73319 and the detailed comment in this commit).
I marked this as stale due to inactivity. → More info |
Fixed by #82921 |
Describe the bug
While compiling gcc7 (or gcc8) in a non-sandboxed darwin enironment (as a Linux user I'm still trying to wrap my head around the sandboxing on darwin), I get compilation failures.
To Reproduce
To reproduce this exactly like I did, is probably nonsense, since it will cause almost every package to recompile. Essentially this came after modification to libdispatch, where I added the following command at the end of the installPhase (I add here to rule out that these two may be connected).
Alternatively dummy modify
nixpkgs/pkgs/development/compilers/gcc/7/default.nix
and buildnix-build . -A gcc7
on commit6236cffa69757549207ad7d2001d96ac16ad1cdf
or later.Metadata
ADDED: I can confirm that this bug has nothing to do with the change I did on libdispatch, since I reverted it and rebuilt, getting the same error.
The text was updated successfully, but these errors were encountered: