Open peti opened 9 years ago
It's actually that GCC was replaced with Clang. Just like most other unix systems, cc is an alias for the appropriate compiler.
I'll patch it to check for gcc
then cc
. On Windows systems there isn't usually a cc
available, so I don't think either will work everywhere.
Hmm, the lack of a Windows version of cc
and a Mac version of gcc
is rather annoying. For my internal tests I can define a magic constant that does the right thing (if isWindows then "gcc" else "cc"
), but what's the best thing to do for the user manual, which (until now) was nicely cross-platform? Such a conditional constant would be rather horrid. It's a shame MinGW with GHC doesn't ship something with a cc
alias (they do ship a c++
binary).
Is there any progress with this issue? We have build failures in Nixpkgs, because we try to run the test suite on Darwin hosts.
So for my tests, it's no big deal either way, and I can change them, For the user manual, I want to keep the initial example simple, and hardcoding to a single compiler (e.g. gcc
) is the best way to do that. I also want to run the manual in the test suite, so I don't break it. It would also be great if the manual worked on Darwin too. These goals all conflict, and I don't have a great idea of how to resolve it...
Note that the manual does require extra flags that gcc supplies, like -MMD -MF
, so it is depending somewhat on gcc
(not sure if that works with llvm or not). Any suggestions for how to proceed are gratefully received.
So, what can we do to remedy this issue for the NixOS side of things? The only option I'm aware of so far is to disable the test suite in NixOS (because our users cannot build shake
if we enable a test suite that then fails). I suppose we could also try to fix the test suite run by passing in some additional flags etc. to make the test suite use clang instead of gcc. Is there anything else we could do?
Given that there are no easy fix ahead, can we temporarily disables tests for Shake + Osx in Nix for now ?
@nrolland, done in https://github.com/peti/nixpkgs/commit/adda629855c609e204dc2c50c811041d8d47b41b.
It appears that modern versions of Darwin don't have a command called
gcc
anymore. Instead, the compiler is calledcc
. Do you think it would be possible to adapt theshake
test suite to deal with that situation?This topic came up in https://github.com/NixOS/nixpkgs/pull/5843.