Closed leviable closed 1 year ago
Hey @leviable.
This is horrible experience getting started and it's not your fault at all. I'll try to fix it ASAP.
I'm curious, why are you installing devenv/nix inside docker and not on your machine?
Thank you for the reply :)
Right now my team uses as hodgepodge of docker, bash, and make to get local developer and CI environments setup, and I'm evaluating nix and devenv as a replacement for that. I had planned to use containers as a clean slate to simulate a new user installing everything for the first time.
@leviable could you paste the full log, since it should be downloading the binaries instead of compiling?
@domenkozar Sure thing, here is the output:
If I follow the same steps it works for me, maybe you need to pull the latest Nix image?
$ nix-env --version
nix-env (Nix) 2.13.0
Ahhh, great catch:
bash-5.1# nix-env --version
nix-env (Nix) 2.12.0
Let me get 2.13.0 loaded and see how that works
Hmmm, same story unfortunately:
$ docker pull nixos/nix:latest
$ docker run -it nixos/nix:latest
bash-5.1# nix --version
nix (Nix) 2.13.0
Same result: https://pastebin.com/FxgLiH7y
It seems that for some reason dns is not working inside the container correctly. Let me look into it.
For what it's worth, I use colima as my container runtime.
It seems that networking stack is broken there, because I can't reproduce the issue and in your logs it's clearly failing to resolve DNS entries.
I'd recommend trying devenv directly on your machine since a major benefit is to avoid containers for local development.
I'm getting the same error, but obviously nothing to do with this project:
[ FAILED ] HttpClientTest.TestRandomURLMultiThreaded
1 FAILED TEST
make[2]: *** [aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/build.make:898: aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests] Error 1
make[2]: *** Deleting file 'aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests'
make[1]: *** [CMakeFiles/Makefile2:396: aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
error: builder for '/nix/store/lix5cb1s8gigcc463rzr9z7xbby8b8c8-aws-sdk-cpp-1.9.294.drv' failed with exit code 2;
last 10 log lines:
> [==========] 400 tests from 65 test suites ran. (160598 ms total)
> [ PASSED ] 399 tests.
> [ FAILED ] 1 test, listed below:
> [ FAILED ] HttpClientTest.TestRandomURLMultiThreaded
>
> 1 FAILED TEST
> make[2]: *** [aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/build.make:898: aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests] Error 1
> make[2]: *** Deleting file 'aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests'
> make[1]: *** [CMakeFiles/Makefile2:396: aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/all] Error 2
> make: *** [Makefile:136: all] Error 2
For full logs, run 'nix log /nix/store/lix5cb1s8gigcc463rzr9z7xbby8b8c8-aws-sdk-cpp-1.9.294.drv'.
error: 1 dependencies of derivation '/nix/store/9jxh4y4lh3dm985shkhqij4zgjhkzjsh-nix-2.12.0.drv' failed to build
when trying to do: nix-env -iA nixpkgs.nixFlakes
I'm on an M1 Mac as well.
I've merged https://github.com/NixOS/nixpkgs/pull/211412, so this should hit the unstable channels in a few hours.
Thanks for this domenkozar, I really appreciate it
Describe the bug I am new to nix/devenv, and attempting to follow the getting started guide for using DevEnv in a container. The error happens for both the Newcomer and Advanced flow, but I will detail the Newcomer installation.
To Reproduce I am following the getting started guide, using an M1 Macbook as the docker host:
It attempts to install
aws-sdk-cpp
, but errors out when executing the post-build tests, consistently failingHttpClientTest.TestRandomURLMultiThreaded
I was able to locate the following workaround:
However adding the above to
~/.config/nixpkgs/overlays/default.nix
doesn't change the output.I am fairly certain I am somehow at fault, but have so far been able to troubleshoot my way out of it. Any guidance would be greatly appreciated.
Version
Cannot install DevEnv to generate the output