`nix-env -i stack` не работает в Mac OS X - PullRequest
0 голосов
/ 20 ноября 2018

Из-за этой проблемы , и кто-то сказал мне, что я должен установить stack и cabal-install, используя nix, поэтому я сейчас пытаюсь установить haskell-stack, используя nix-env -i.

Все сообщения об ошибках здесь .

$ nix-env -i stack
...
lib/machserver.cpp:180:27: note: put the semicolon on a separate line to silence this warning
In file included from lib/alloc.cpp:32:
In file included from ./security_utilities/globalizer.h:31:
In file included from ./security_utilities/threading.h:40:
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if _HAVE_64BIT_ATOMIC
    ^
./security_utilities/threading_internal.h:41:29: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                            ^
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./security_utilities/threading_internal.h:41:51: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                                                  ^
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./security_utilities/threading_internal.h:41:72: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                                                                       ^
./security_utilities/threading_internal.h:119:50: warning: while loop has empty body [-Wempty-body]
        { while (!casb(store, value, store)) /* again */; return value; }
                                                        ^
./security_utilities/threading_internal.h:119:50: note: put the semicolon on a separate line to silence this warning
4 warnings generated.
4 warnings generated.
4 warnings generated.
5 warnings generated.
make[2]: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Instance/library.make:278: internal-library-all_] Error 2
make[1]: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Master/rules.make:297: security_utilities.all.library.variables] Error 2
make: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Master/library.make:37: internal-all] Error 2
builder for '/nix/store/xxja1zlr9xqvl4vij85lcf30h5s6yyi5-libsecurity_utilities-osx-10.7.5.drv' failed with exit code 2
cannot build derivation '/nix/store/g2i0xac4g4173561i5lsgn7pncswzmqd-SecurityTool-55115.drv': 1 dependencies couldn't be built
copying path '/nix/store/b5j4s3wmh2bji4ck8wrvizh5knfnw4mw-pem-0.2.4' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/ss179ilk0x4yb6z1dks3aa9z5b0bzih5-x509-system-1.6.6.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7f4a2s6ri62dm37md14wxla62hygxg0z-connection-0.2.8.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/lg6k2p3v4sfj6w9kb3bapizzr8qk3i3p-http-client-tls-0.3.5.3.drv': 1 dependencies couldn't be built

cannot build derivation '/nix/store/djqw65b0cnlpdfpadxhnqr344qrwdqa9-stack-1.9.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/djqw65b0cnlpdfpadxhnqr344qrwdqa9-stack-1.9.1.drv' failed

и

$ uname -a                                                                                             
Darwin YudeMBP.local 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct  5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64

Как это исправить?

1 Ответ

0 голосов
/ 20 ноября 2018

Похоже, вы пытаетесь установить стек из версии Nixpkgs с нарушенной зависимостью stack.

Вы можете увидеть возраст сборки и ссылки на их статусы в HowOldIs .

Чтобы изменить канал, с которого вы устанавливаете, используйте команду nix-channel.

Например:

# add the config
nix-channel --add https://nixos.org/channels/nixpkgs-18.09-darwin nixpkgs
# download the latest nix expressions
nix-channel --update
...