Closed maxigit closed 9 years ago
Nix support on Darwin is heavily under construction. My understanding is that you'll have to follow a different branch in order to build on Yosemite. I hope @joelteon or @jwiegley can point you into the right direction.
Yes, please follow for now https://github.com/joelteon/nixpkgs
, using the master
branch.
I've been keeping this up-to-date with NixOS/nixpkgs
on an almost daily basis, and testing all of the packages that I use under Ubuntu, 10.9 and 10.10. Things are looking great so far, and we are presently working on getting all of the changes merged back. @shlevy is working on improving our gcc/clang wrapper situation, which is the next step.
I'm new to nix, could you explain ? I guess you mean subscribe to another channel , but how exactly ?
Please refer to these instructions: https://nixos.org/wiki/Nix_on_OS_X#Using_the_Testing_Branch
It's even worth :-( . If I try to install anything (nix or even hello) I fail with the following message :
/nix/store/whv4q8ksxnyk57d0pg3iyy849pqvx3cq-clang-wrapper-9.9.9/bin/clang -O3
-DNO_FSEEKO -DNO_STRERROR -DNO_snprintf -DHAS_sprintf_void -DHAVE_HIDDEN -I. -c -o
example.o test/example.c
In file included from test/example.c:8:
In file included from ./zlib.h:34:
./zconf.h:421:14: fatal error: 'sys/types.h' file not found
# include <sys/types.h> /* for off_t */
^
Do you have the command-line SDK installed? Both mainline nixpkgs and joelteon/master rely on that being installed for darwin. There's a whole other branch of work ongoing to make it fully self-contained, but I don't recommend using that yet.
I don't know. I upgraded from mountain lion this morning. I use to have XCode installed. I might need to upgrade it or install something else ...
Yes, this error is exactly what indicates that the command-line tools have not been installed.
Run these two commands:
xcode-select --install
sudo clang
Once both work, you should be good to go.
Looking more carefully at the stdenv bootstrap structure I set up on joelteon/master, I'm pretty sure we could remove that requirement, since we also stuff the extracted command-line tools (which we fetch ourselves) into the store. Some trickiness around how frameworks work, and it would still be impure, but it's not hard. Happy to explain details later if someone wants to work on it. Or we can just wait for pure-Darwin to be ready :)
On Wednesday, January 14, 2015, John Wiegley notifications@github.com wrote:
Yes, this error is exactly what indicates that the command-line tools have not been installed.
Run these two commands:
- xcode-select --install
- sudo clang
Once both work, you should be good to go.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/5768#issuecomment-69963935.
Problem sorted ... a few hours of compiling later ... Thank you guys. You've been really helpful.
nix-env -i ghc-7.8.4 ...p DynaLoader.o ../../DynaLoader.o rm -f libperl.dylib env MACOSX_DEPLOYMENT_TARGET=10.3 cc -o libperl.dylib -fstack-protector -L/usr/lib -dynamiclib -compatibility_version 5.20.0 -current_version 5.20.1 -install_name /nix/store/23dii2liixakc3g275s2rh03ib0byz0d-perl-5.20.1/lib/perl5/5.20.1/darwin-2level/CORE/libperl.dylib op.o perl.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o DynaLoader.o -ldl -lm -lc ld: library not found for -ldylib1.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [libperl.dylib] Error 1 builder for ‘/nix/store/74qwh272n2b8s8fx1y8x87ja07nfh85x-perl-5.20.1.drv’ failed with exit code 2 cannot build derivation ‘/nix/store/fii7nai7b09iwd16wx48463pcpjj4iyb-ghc-7.8.4.drv’: 1 dependencies couldn't be built error: build of ‘/nix/store/fii7nai7b09iwd16wx48463pcpjj4iyb-ghc-7.8.4.drv’ failed
What should I do ?