NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.84k stars 13.92k forks source link

awscli2-2.2.1 fails to build on darwin #122736

Closed jeffutter closed 3 years ago

jeffutter commented 3 years ago

Describe the bug After https://github.com/NixOS/nixpkgs/pull/121643 awscli2 fails to build on darwin with a stacktrace while the build runs tests.

To Reproduce Steps to reproduce the behavior:

  1. nix-shell -p awscli2

Expected behavior

I expect the package to build

Screenshots

...
Installing collected packages: awscli
Successfully installed awscli-2.2.1
/private/tmp/nix-build-awscli2-2.2.1.drv-0/source
Finished executing pipInstallPhase
post-installation fixup
strip is /nix/store/pvms38jd72iqdrn3j376yfwcik0wvsiv-cctools-binutils-darwin-949.0.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1/lib  /nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1/bin
patching script interpreter paths in /nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1
Rewriting #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9/bin/python3.8 to #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9
wrapping `/nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1/bin/aws'...
Rewriting #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9/bin/python3.8 to #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9
wrapping `/nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1/bin/aws_legacy_completer'...
Rewriting #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9/bin/python3.8 to #!/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9
wrapping `/nix/store/s2n94wyl72vq7aknnwcm9h28nypri7iy-awscli2-2.2.1/bin/aws_completer'...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
running install tests
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
................................................................................................................................................................................................................Signal receiv
ed: 11, errno: 0
  SIGSEGV @ 0x0x2
################################################################################
Resolved stacktrace:
################################################################################
sh: atos: command not found
1   _awscrt.cpython-38-darwin.so        0x000000010befd0b3 s_print_stack_trace + 19
sh: atos: command not found
2   libsystem_platform.dylib            0x00007fff70ed35fd _sigtramp + 29
sh: atos: command not found
3   ???                                 0x00007000059a2620 0x0 + 123145396299296
sh: atos: command not found
4   CoreFoundation                      0x0000000108d6e5f8 _CFRelease + 248
sh: atos: command not found
5   CoreFoundation                      0x0000000108d781ec __CFArrayReleaseValues + 444
sh: atos: command not found
6   CoreFoundation                      0x0000000108d6e5f8 _CFRelease + 248
sh: atos: command not found
7   _awscrt.cpython-38-darwin.so        0x000000010bf65bca s_aws_secure_transport_ctx_destroy + 42
sh: atos: command not found
8   _awscrt.cpython-38-darwin.so        0x000000010bf86d42 aws_ref_count_release + 34
sh: atos: command not found
9   libpython3.8.dylib                  0x00000001092d14c7 capsule_dealloc + 23
sh: atos: command not found
10  libpython3.8.dylib                  0x0000000109326750 subtype_dealloc + 848
sh: atos: command not found
11  _awscrt.cpython-38-darwin.so        0x000000010befbbaa s_tls_connection_options_destructor + 58
sh: atos: command not found
12  libpython3.8.dylib                  0x00000001092d14c7 capsule_dealloc + 23
sh: atos: command not found
13  libpython3.8.dylib                  0x0000000109326750 subtype_dealloc + 848
sh: atos: command not found
14  libpython3.8.dylib                  0x0000000109305175 dict_dealloc + 133
sh: atos: command not found
15  libpython3.8.dylib                  0x000000010932686f subtype_dealloc + 1135
sh: atos: command not found
16  _awscrt.cpython-38-darwin.so        0x000000010beff3d4 s_s3_client_shutdown + 132
sh: atos: command not found
17  _awscrt.cpython-38-darwin.so        0x000000010bf05807 s_s3_client_process_work_default + 1671
sh: atos: command not found
18  _awscrt.cpython-38-darwin.so        0x000000010bf87a3c s_run_all + 476
sh: atos: command not found
19  _awscrt.cpython-38-darwin.so        0x000000010bf5e403 s_event_thread_main + 1715
sh: atos: command not found
20  _awscrt.cpython-38-darwin.so        0x000000010bf8592b thread_fn + 267
sh: atos: command not found
21  libsystem_pthread.dylib             0x00007fff70edf109 _pthread_start + 148
sh: atos: command not found
22  libsystem_pthread.dylib             0x00007fff70edab8b thread_start + 15
################################################################################
Raw stacktrace:
################################################################################
1   _awscrt.cpython-38-darwin.so        0x000000010befd0b3 s_print_stack_trace + 19
2   libsystem_platform.dylib            0x00007fff70ed35fd _sigtramp + 29
3   ???                                 0x00007000059a2620 0x0 + 123145396299296
4   CoreFoundation                      0x0000000108d6e5f8 _CFRelease + 248
5   CoreFoundation                      0x0000000108d781ec __CFArrayReleaseValues + 444
6   CoreFoundation                      0x0000000108d6e5f8 _CFRelease + 248
7   _awscrt.cpython-38-darwin.so        0x000000010bf65bca s_aws_secure_transport_ctx_destroy + 42
8   _awscrt.cpython-38-darwin.so        0x000000010bf86d42 aws_ref_count_release + 34
9   libpython3.8.dylib                  0x00000001092d14c7 capsule_dealloc + 23
10  libpython3.8.dylib                  0x0000000109326750 subtype_dealloc + 848
11  _awscrt.cpython-38-darwin.so        0x000000010befbbaa s_tls_connection_options_destructor + 58
12  libpython3.8.dylib                  0x00000001092d14c7 capsule_dealloc + 23
13  libpython3.8.dylib                  0x0000000109326750 subtype_dealloc + 848
14  libpython3.8.dylib                  0x0000000109305175 dict_dealloc + 133
15  libpython3.8.dylib                  0x000000010932686f subtype_dealloc + 1135
16  _awscrt.cpython-38-darwin.so        0x000000010beff3d4 s_s3_client_shutdown + 132
17  _awscrt.cpython-38-darwin.so        0x000000010bf05807 s_s3_client_process_work_default + 1671
18  _awscrt.cpython-38-darwin.so        0x000000010bf87a3c s_run_all + 476
19  _awscrt.cpython-38-darwin.so        0x000000010bf5e403 s_event_thread_main + 1715
20  _awscrt.cpython-38-darwin.so        0x000000010bf8592b thread_fn + 267
21  libsystem_pthread.dylib             0x00007fff70edf109 _pthread_start + 148
22  libsystem_pthread.dylib             0x00007fff70edab8b thread_start + 15
Traceback (most recent call last):
  File "scripts/ci/run-tests", line 19, in <module>
    run('nosetests --with-coverage --cover-erase --cover-package awscli '
  File "scripts/ci/run-tests", line 16, in run
    return check_call(command, shell=True)
  File "/nix/store/l4q9nfrq3wz4qgk5ikbzfcs7iqdb32y1-python3-3.8.9/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'nosetests --with-coverage --cover-erase --cover-package awscli --traverse-namespace --with-xunit --cover-xml unit/ functional/' returned non-zero exit status 255.
builder for '/nix/store/dl9md3yr2xvc4kzgzfh3541qjh13ffzp-awscli2-2.2.1.drv' failed with exit code 1
error: build of '/nix/store/dl9md3yr2xvc4kzgzfh3541qjh13ffzp-awscli2-2.2.1.drv' failed

Additional context On macOS 10.15.7 (if that matters)

Notify maintainers @davegallant @bhipple

Metadata

❯ nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
  /nix/store/6v47rygwaahny2wsmn9avnczf0sd2dn3-DarwinTools-1
  /nix/store/sbazpkxvzplf2yfxcvq7q0f1v6qmfiva-nix-info
copying path '/nix/store/6v47rygwaahny2wsmn9avnczf0sd2dn3-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/sbazpkxvzplf2yfxcvq7q0f1v6qmfiva-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 19.6.0, macOS 10.15.7`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.10`
 - channels(jeffutter): `"home-manager, nixpkgs-21.05pre288773.c9494b6fe04"`
 - nixpkgs: `/Users/jeffutter/.nix-defexpr/channels/nixpkgs`
chrisportela commented 3 years ago

This is also happening on Big Sur (recently updated)

cportela@mbp> nix-shell -p nix-info --run "nix-info -m"                                                                                                                                                                                                              ~
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
these paths will be fetched (0.32 MiB download, 1.90 MiB unpacked):
  /nix/store/cqriycvp0h2cpkd2wjhyws2002v3gxw4-bash-interactive-4.4-p23-dev
  /nix/store/kd7azfw8riv2rbamjplpq7cbv98g2339-bash-interactive-4.4-p23-doc
copying path '/nix/store/kd7azfw8riv2rbamjplpq7cbv98g2339-bash-interactive-4.4-p23-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/cqriycvp0h2cpkd2wjhyws2002v3gxw4-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
 - system: `"x86_64-darwin"`
 - host os: `Darwin 20.4.0, macOS 10.16`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.10`
 - channels(cportela): `"darwin, home-manager-20.09, nixpkgs-20.09pre246842.c5429e84111, nixpkgs-unstable-21.05pre288963.acd49fab8ec"`
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
 - nixpkgs: `/Users/cportela/.nix-defexpr/channels/nixpkgs`
davegallant commented 3 years ago

Didn't rebuild on darwin after enabling the tests in https://github.com/NixOS/nixpkgs/pull/121643 :sweat_smile:

Should be fixed here: https://github.com/NixOS/nixpkgs/pull/122789