-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
gcc darwin fixes #18327
gcc darwin fixes #18327
Conversation
@matthewbauer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @dezgeg, @dguibert and @peti to be potential reviewers |
@@ -470,7 +472,7 @@ stdenv.mkDerivation ({ | |||
|
|||
LIBRARY_PATH = concatStrings | |||
(intersperse ":" (map (x: x + "/lib") | |||
(optionals (zlib != null) [ zlib ] | |||
(optionals (zlib != null) [ zlib.out ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concatStrings (intersperse ":" (map (x: x + "/lib")
should be able to be shortened to lib.makeLibraryPath
, then .out
from zlib.out
should be able to be dropped.
(I actually wonder how this even works on current master
since these resolve to e.g. ${gmp.dev}/lib
).
Still getting:
|
The versions you mentioned still build on linux. |
@@ -359,6 +359,8 @@ stdenv.mkDerivation ({ | |||
} | |||
${if (stdenv ? glibc && cross == null) | |||
then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" | |||
else if (stdenv ? libc && cross == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to change the existing check to
${if cross == null
 then " --with-native-system-header-dir=${lib.getDev stdenv.libc}/include"
which should do the right thing for all platforms.
Ok so I've got my Macbook running without the Command Line Tools. I'll see what is fixable. |
8f54645
to
2d54595
Compare
Does anyone know if gcc 4.6 can be deleted? It's not reachable right now in the code AFAICT. |
This seems to be working now. ISL needs to be disable for it to build completely though.
This should get gcc48, gcc5, and gcc6 working again. Also: use makeLibraryPath, and makeSearchPathOutput for LIBRARY_PATH and CPATH. This is a refactor but it also fixes an issue with zlib.
gcc needs to be able find system headers. Without this, gcc fails to build because /usr/include is not available. Note: stdenv.libc should be available for all stdenv's, I think.
This isn't available from all-packages, so I think it's okay to remove. It's unclear how to keep this updated with the changes.
Darwin systems need to be able to find CoreFoundation headers as well as libc headers. Somehow, gcc doesn't accept any "framework" parameters that would normally be used to include CoreFoundation in this situation. HACK: Instead, this adds a derivation that combines the two. The result works but probably not a good long term solution. ALTERNATIVES: Maybe sending patches in to GCC to allow "native-system-framework" configure flag to get this found.
2d54595
to
8610a34
Compare
Most likely yes, probably cbb055c forgot to remove it by mistake. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the evaluation problem it looks OK and default version builds fine on x86_64-linux.
(Note: in any case, it shouldn't be merged to master directly.) |
Staged. |
Motivation for this change
These changes seem to get gcc48, gcc5, and gcc6 working on Darwin. I need to verify that Linux gcc's still work though.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)