[Nix-dev] gcc has stopped working on Mac OS X Mavericks

Alfredo Di Napoli alfredo.dinapoli at gmail.com
Sun Oct 26 16:23:48 CET 2014


Hello nixers,

I think I'm having a very similar problem here which I do not have enough
nix knowledge to debug. I have reinstalled nix-1.7 doing this (as suggested
from the nix website):

 curl https://nixos.org/nix/install | sh


So far so good. But when I try to install ANYTHING, (e.g. "hello"), this is
what I get:

installing `hello-2.9'
these derivations will be built:
  /nix/store/al6xyibqncn9aicmkffr0n90xgxnfrm4-hello-2.9.drv
building path(s) `/nix/store/71gijbvnnish0gvrci13qpsqxhqwnqvq-hello-2.9'
building /nix/store/71gijbvnnish0gvrci13qpsqxhqwnqvq-hello-2.9
unpacking sources
unpacking source archive
/nix/store/xdilnlzvvsf7r33gs4vy9jq2bmazlc0j-hello-2.9.tar.gz
source root is hello-2.9
patching sources
configuring
configure flags: --disable-dependency-tracking
--prefix=/nix/store/71gijbvnnish0gvrci13qpsqxhqwnqvq-hello-2.9
checking for a BSD-compatible install...
/nix/store/rc94la2h0pwkshbgmd7kz5nhklkdqyr2-coreutils-8.21/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p...
/nix/store/rc94la2h0pwkshbgmd7kz5nhklkdqyr2-coreutils-8.21/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in
`/private/var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/nix-build-hello-2.9.drv-0/hello-2.9':
configure: error: C compiler cannot create executables
See `config.log' for more details
builder for `/nix/store/al6xyibqncn9aicmkffr0n90xgxnfrm4-hello-2.9.drv'
failed with exit code 77
error: build of `/nix/store/al6xyibqncn9aicmkffr0n90xgxnfrm4-hello-2.9.drv'
failed

-- Which makes me suspect the error is very similar. Likewise, my xcrun
thinks I'm on 10.10.
I have seen mentioned as workaround to export that environment variable
inside  pkgs/stdenv/nix/default.nix: I have tried both "extraCmd" and
"shellHooks" inside "stdenvNix", but with no luck. My nix-expression
knowledge stops here unfortunately :(

Any kind soul keen on helping?
Thanks!
Alfredo


On 25 October 2014 04:17, John Wiegley <johnw at newartisans.com> wrote:

> >>>>> Michael Sperber <sperber at deinprogramm.de> writes:
>
> > That setting didn't take for me.  But your hint made me set SDKROOT in
> > pkgs/stdenv/nix/default.nix directly, and that did the trick.
>
> I had to set this:
>
> export
> SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
>
> John
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141026/cf2d03c0/attachment.html 


More information about the nix-dev mailing list