-
-
Notifications
You must be signed in to change notification settings - Fork 13.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
nixpkgs.gcc fails to build on OS X #6148
Comments
Yeah, building gcc is kind of tricky on recent Mac OS, I think. It's on our todo list. |
On the other hand, if it's just a missing |
I think that may be sufficient. I wasn't sure how to get nix to drop me into the proper shell to poke around, so the best I've got is the log. |
|
@tel |
@gridaphobe Thanks, worked perfectly! @copumpkin I haven't completed the build yet, but it does look like all that's needed is to drop a c++filt in. |
Build completed with no errors.
Not sure if that matters. |
@tel cool! I also put some time against gcc4.8 on pure-darwin, and encountered more issues. It looks like the purification phase that tells gcc not to look in system include directories doesn't work properly on darwin, and I put that work on pause for other reasons. In the meantime, I'd be happy to merge any changes you've found were necessary. Also note that the gnu binutils (containing |
I'm not sure of what a proper fix would be. The current
I'm not sure what that means, exactly. Is the right resolution to just add |
No, the real issue is copumpkin#53, I think. |
Hm, well I'll patch it personally by just adding binutils I suppose. I think with this fix I'll get |
If you just want ghcjs, I think the dependency on gcc is spurious. Check hoogle for an unnecessary dependency on it?
|
Hoogle has this info? I was wondering about it being possibly unnecessary, but I'm not sure how to track back derivations to determine where deps are being pulled in except by hand. |
No, I mean that the hoogle package expression at some point had a spurious gcc dependency, and the ghcjs bundle included hoogle. |
(triage) might be solved already? |
@Profpatsch it will build if you have the command line tools installed. It's not ideal, but if someone really needs gcc it may be helpful. |
Huh, so it's impure? 😢 |
^ Yeah, it's confusing though because it gets pretty far in its bootstrapping then spits out this: if [ -d ../prev-gcc ]; then \
cd ../prev-gcc && \
make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \
libsubdir=. ; \
else \
set -e; for ml in `cat fixinc_list`; do \
sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \
multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \
fix_dir=include-fixed${multi_dir}; \
if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \
tooldir_sysinc=`echo "/nix/store/snh0ydmnwr34zmdri4gzhl56x1pra610-gcc-5.4.0/lib/gcc/x86_64-apple-darwin15.2.0/5.4.0/../../../../x86_64-apple-darwin15.2.0/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \
then sleep 1; else exit 1; fi; \
fi; \
/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash ../../gcc-5.4.0/gcc/../mkinstalldirs ${fix_dir}; \
chmod a+rx ${fix_dir} || true; \
(TARGET_MACHINE='x86_64-apple-darwin15.2.0'; srcdir=`cd ../../gcc-5.4.0/gcc; ${PWDCMD-pwd}`; \
SHELL='/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \
gcc_dir=`${PWDCMD-pwd}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd ../build-x86_64-apple-darwin15.2.0/fixincludes && \
/nix/store/psyci5sp00dixlnm1f5z0maq2zn12qai-bash-4.3-p46/bin/bash ./fixinc.sh "${gcc_dir}/${fix_dir}" \
`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` ); \
rm -f ${fix_dir}/syslimits.h; \
if [ -f ${fix_dir}/limits.h ]; then \
mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \
else \
cp ../../gcc-5.4.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \
fi; \
chmod a+r ${fix_dir}/syslimits.h; \
done; \
fi
The directory that should contain system headers does not exist:
/usr/include |
I wonder what broke it. It worked in a pure environment for a while... |
I think it has broke around April: http://hydra.nixos.org/build/39409734. It might have been related to the closure size stuff: http://hydra.nixos.org/api/scmdiff?type=git&uri=https%3A%2F%2Fgithub.com%2FNixOS%2Fnixpkgs.git&rev1=81cedab4f1fe9578e004ce03de5630a25c737a9e&rev2=39ebb01d6e8d19b042fe65d303234d0db27877eb. I ended up adding the "--disable-bootstrap" flag in gcc because that's the only way to get it to compile. Perhaps that flag is inherently impure? I'm trying to build it now without that flag but if I recall it gives some very unclear error. |
Here's the output without --disable-bootstrap:
|
This may be related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65988. I'm trying to disable isl and see what happens. |
@matthewbauer Can you still reproduce this? |
I think we fixed it. This can be closed unless it's been broken recently. |
Sorry to dredge this up, but I thought you might want to know it seems to be broken again. Here's the last of my output when I try to install. Let me know if I can provide any more info.
|
@Ericson2314 @LnL7 does this look familiar to either of you? |
Oh! Yes! I just ran into that doing a linux stdenv build the other day. I am totally blanking but will remember. |
In my case, it was because the configure script decided Yay. |
I think that's the same as in issue #27889. |
Full log is here. Abbreviated it's
The text was updated successfully, but these errors were encountered: