NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.04k stars 14.04k forks source link

Failed to build `rls` on aarch64-darwin (commit 2da64a81) #190019

Closed ar3s3ru closed 2 years ago

ar3s3ru commented 2 years ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build pkgs.rls from nixpkgs, commit 2da64a81

Build log

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/8jgm5h4fi5r51j8sccbvd1p6nzw53wyz-rustc-1.63.0-src.tar.gz
source root is rustc-1.63.0-src
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
setting SOURCE_DATE_EPOCH to timestamp 1660005791 of file rustc-1.63.0-src/vendor/yansi/src/windows.rs
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing cargoBuildHook
/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls /private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src
++ env CC_aarch64-apple-darwin=/nix/store/j8w19vhk1yazy96zm22apalqm1jvvlrg-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/j8w19vhk1yazy96zm22apalqm1jvvlrg-clang-wrapper-11.1.0/bin/c++ CC_aarch64-apple-darwin=/nix/store/j8w19vhk1yazy96zm22apalqm1jvvlrg-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/j8w19vhk1yazy96zm22apalqm1jvvlrg-clang-wrapper-11.1.0/bin/c++ cargo build -j 8 --target aarch64-apple-darwin --frozen --release
   Compiling libc v0.2.126
   Compiling proc-macro2 v1.0.37
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.91
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling serde_derive v1.0.125
   Compiling serde v1.0.125
   Compiling memchr v2.4.1
   Compiling log v0.4.14
   Compiling pkg-config v0.3.18
   Compiling cfg-if v0.1.10
   Compiling version_check v0.9.3
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.59
   Compiling lazy_static v1.4.0
   Compiling itoa v0.4.6
   Compiling getrandom v0.1.14
   Compiling matches v0.1.8
   Compiling futures-core v0.3.19
   Compiling tinyvec v0.3.4
   Compiling once_cell v1.12.0
   Compiling pin-project-lite v0.2.8
   Compiling regex-syntax v0.6.25
   Compiling futures-channel v0.3.19
   Compiling futures-task v0.3.19
   Compiling futures-sink v0.3.19
   Compiling ppv-lite86 v0.2.8
   Compiling futures-util v0.3.19
   Compiling bytes v1.0.1
   Compiling futures v0.1.31
   Compiling futures-io v0.3.19
   Compiling scopeguard v1.1.0
   Compiling pin-utils v0.1.0
   Compiling regex-automata v0.1.10
   Compiling slab v0.4.2
   Compiling crossbeam-utils v0.8.8
   Compiling smallvec v1.8.1
   Compiling fnv v1.0.7
   Compiling bitflags v1.2.1
   Compiling getrandom v0.2.0
   Compiling parking_lot_core v0.8.5
   Compiling percent-encoding v2.1.0
   Compiling crc32fast v1.2.0
   Compiling termcolor v1.1.2
   Compiling anyhow v1.0.51
   Compiling either v1.6.0
   Compiling hashbrown v0.12.3
   Compiling typenum v1.12.0
   Compiling byteorder v1.3.4
   Compiling heck v0.4.0
   Compiling semver v1.0.3
   Compiling humantime v2.0.1
   Compiling core-foundation-sys v0.8.0
   Compiling same-file v1.0.6
   Compiling curl v0.4.43
   Compiling crossbeam-epoch v0.9.6
   Compiling percent-encoding v1.0.1
   Compiling os_str_bytes v6.0.0
   Compiling unicode-width v0.1.8
   Compiling strsim v0.10.0
   Compiling textwrap v0.15.0
   Compiling camino v1.0.5
   Compiling rayon-core v1.9.3
   Compiling utf8parse v0.1.1
   Compiling tower-service v0.3.1
   Compiling hex v0.3.2
   Compiling quick-error v1.2.3
   Compiling static_assertions v1.1.0
   Compiling remove_dir_all v0.5.3
   Compiling fst v0.4.5
   Compiling rustfmt-nightly v1.5.1 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rustfmt)
   Compiling yansi-term v0.1.2
   Compiling shell-escape v0.1.5
   Compiling hex v0.4.2
   Compiling rustc_tools_util v0.2.0
   Compiling lazycell v1.3.0
   Compiling bytesize v1.0.1
   Compiling json v0.12.4
   Compiling unicode-segmentation v1.9.0
   Compiling opener v0.5.0
   Compiling glob v0.3.0
   Compiling bytecount v0.6.2
   Compiling home v0.5.3
   Compiling pathdiff v0.2.1
   Compiling unicode_categories v0.1.1
   Compiling diff v0.1.12
   Compiling ordslice v0.3.0
   Compiling instant v0.1.12
   Compiling tokio v1.8.4
   Compiling lock_api v0.4.7
   Compiling indexmap v1.9.1
   Compiling memoffset v0.6.5
   Compiling rayon v1.5.3
   Compiling unicode-bidi v0.3.4
   Compiling thread_local v1.1.4
   Compiling unicode-normalization v0.1.13
   Compiling proc-macro-error-attr v1.0.4
   Compiling unicase v2.6.0
   Compiling proc-macro-error v1.0.4
   Compiling im-rc v15.0.0
   Compiling form_urlencoded v1.0.1
   Compiling itertools v0.10.1
   Compiling walkdir v2.3.2
   Compiling getopts v0.2.21
   Compiling clap_lex v0.2.2
   Compiling vte v0.3.3
   Compiling humantime v1.3.0
   Compiling kstring v2.0.0
   Compiling annotate-snippets v0.9.1
   Compiling rls v1.41.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls)
   Compiling idna v0.2.0
   Compiling idna v0.1.5
   Compiling strip-ansi-escapes v0.1.0
   Compiling num_cpus v1.13.1
   Compiling mio v0.7.14
   Compiling signal-hook-registry v1.2.2
   Compiling atty v0.2.14
   Compiling socket2 v0.4.1
   Compiling commoncrypto-sys v0.2.0
   Compiling filetime v0.2.14
   Compiling dirs-sys-next v0.1.2
   Compiling jobserver v0.1.24
   Compiling dirs-sys v0.3.6
   Compiling aho-corasick v0.7.18
   Compiling bstr v0.2.13
   Compiling combine v4.6.3
   Compiling quote v1.0.18
   Compiling url v1.7.2
   Compiling crossbeam-channel v0.5.4
   Compiling core-foundation v0.9.0
   Compiling bitmaps v2.1.0
   Compiling rand_core v0.5.1
   Compiling rand_core v0.6.2
   Compiling parking_lot v0.11.2
   Compiling commoncrypto v0.2.0
   Compiling tar v0.4.38
   Compiling dirs-next v2.0.0
   Compiling dirs v4.0.0
   Compiling cc v1.0.69
   Compiling regex v1.5.5
   Compiling sized-chunks v0.6.4
   Compiling rand_chacha v0.2.2
   Compiling rand_xoshiro v0.4.0
   Compiling crossbeam-deque v0.8.1
   Compiling rand_chacha v0.3.0
   Compiling crypto-hash v0.3.4
   Compiling term v0.7.0
   Compiling libz-sys v1.1.3
   Compiling openssl-sys v0.9.72
   Compiling libnghttp2-sys v0.1.4+1.41.0
   Compiling libssh2-sys v0.2.23
   Compiling curl-sys v0.4.55+curl-7.83.1
   Compiling libgit2-sys v0.13.2+1.4.2
   Compiling globset v0.4.5
   Compiling env_logger v0.9.0
   Compiling env_logger v0.7.1
   Compiling rand v0.7.3
   Compiling tokio-util v0.6.7
   Compiling tokio-stream v0.1.7
   Compiling rand v0.8.5
   Compiling ignore v0.4.17
   Compiling futures-macro v0.3.19
   Compiling derive_more v0.99.9
   Compiling thiserror-impl v1.0.30
   Compiling derive-new v0.5.8
   Compiling rustfmt-config_proc_macro v0.2.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rustfmt/config_proc_macro)
   Compiling serde_repr v0.1.6
   Compiling tempfile v3.2.0
   Compiling clap_derive v3.2.5
   Compiling thiserror v1.0.30
   Compiling flate2 v1.0.16
   Compiling cargo-util v0.2.1 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/cargo/crates/cargo-util)
   Compiling clap v3.2.5
   Compiling cargo v0.64.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/cargo)
   Compiling futures-executor v0.3.19
   Compiling futures v0.3.19
   Compiling toml v0.5.7
   Compiling url v2.2.2
   Compiling rls-span v0.5.3
   Compiling racer-interner v0.1.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/racer/interner)
   Compiling cargo-platform v0.1.2
   Compiling toml_edit v0.14.3
   Compiling os_info v3.0.7
   Compiling cargo-platform v0.1.2 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/cargo/crates/cargo-platform)
   Compiling serde_ignored v0.1.2
   Compiling parity-tokio-ipc v0.9.0
   Compiling jsonrpc-core v18.0.0
   Compiling rustc-workspace-hack v1.0.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rustc-workspace-hack)
   Compiling rustfix v0.6.1
   Compiling lsp-types v0.60.0
   Compiling proc-macro-crate v0.1.5
   Compiling rls-data v0.19.1
   Compiling rls-vfs v0.8.0
   Compiling racer-cargo-metadata v0.1.2 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/racer/metadata)
   Compiling cargo_metadata v0.14.0
   Compiling jsonrpc-server-utils v18.0.0
   Compiling jsonrpc-pubsub v18.0.0
   Compiling jsonrpc-derive v18.0.0
   Compiling rls-analysis v0.18.3 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/rls-analysis)
   Compiling racer v2.2.2 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/racer)
   Compiling jsonrpc-ipc-server v18.0.0
   Compiling jsonrpc-client-transports v18.0.0
   Compiling jsonrpc-core-client v18.0.0
   Compiling rls-ipc v0.1.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/rls-ipc)
   Compiling rls-rustc v0.6.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls/rls-rustc)
   Compiling crates-io v0.34.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/cargo/crates/crates-io)
   Compiling git2 v0.14.2
   Compiling git2-curl v0.15.0
warning: field `clippy_preference` is never read
   --> src/tools/rls/rls/src/build/rustc.rs:215:5
    |
212 | struct RlsRustcCalls {
    |        ------------- field in this struct
...
215 |     clippy_preference: ClippyPreference,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
    = note: `RlsRustcCalls` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

warning: `rls` (lib) generated 1 warning
    Finished release [optimized] target(s) in 1m 52s
/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src
Executing cargoInstallPostBuildHook
Finished cargoInstallPostBuildHook
Finished cargoBuildHook
buildPhase completed in 1 minutes 53 seconds
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
Executing cargoCheckHook
/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls /private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src
++ cargo test -j 8 --release --target aarch64-apple-darwin --frozen -- --test-threads=8
   Compiling difference v2.0.0
   Compiling lsp-codec v0.3.0
warning: field `clippy_preference` is never read
   --> src/tools/rls/rls/src/build/rustc.rs:215:5
    |
212 | struct RlsRustcCalls {
    |        ------------- field in this struct
...
215 |     clippy_preference: ClippyPreference,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
    = note: `RlsRustcCalls` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

warning: `rls` (lib) generated 1 warning
   Compiling rls v1.41.0 (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/src/tools/rls)
warning: `rls` (lib test) generated 1 warning (1 duplicate)
    Finished release [optimized] target(s) in 12.15s
     Running unittests rls/src/lib.rs (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/target/aarch64-apple-darwin/release/deps/rls-0acb5ccf928b7a86)

running 69 tests
test actions::diagnostics::diagnostic_message_test::macro_expected_token_nested_expansion ... ok(B
test actions::diagnostics::diagnostic_message_test::message_consider_borrowing ... ok(B
test actions::diagnostics::diagnostic_message_test::message_mismatched_types ... ok(B
test actions::diagnostics::diagnostic_message_test::macro_error_no_trait ... ok(B
test actions::diagnostics::diagnostic_message_test::message_move_out_of_borrow ... ok(B
test actions::diagnostics::diagnostic_message_test::message_cannot_find_type ... ok(B
test actions::diagnostics::diagnostic_message_test::message_not_mutable ... ok(B
test actions::diagnostics::diagnostic_message_test::message_clippy_identity_op ... ok(B
test actions::diagnostics::diagnostic_message_test::message_unused_use ... ok(B
test actions::diagnostics::diagnostic_suggestion_test::suggest_macro_error_no_trait ... ok(B
test actions::diagnostics::diagnostic_suggestion_test::suggest_use_when_cannot_find_type ... ok(B
test actions::diagnostics::diagnostic_message_test::message_use_after_move ... ok(B
test actions::diagnostics::diagnostic_message_test::message_type_annotations_needed ... ok(B
test actions::diagnostics::diagnostic_suggestion_test::suggest_mut_when_not_mut ... ok(B
test actions::diagnostics::diagnostic_suggestion_test::suggest_clippy_const_static ... ok(B
test actions::format::tests::no_empty_file_lines ... ok(B
test actions::hover::test::test_extract_decl_multiline_empty_function ... ok(B
test actions::hover::test::test_extract_decl ... ok(B
test actions::hover::test::test_extract_docs_attributes ... ok(B
test actions::hover::test::test_extract_docs_comment_first_line ... ok(B
test actions::hover::test::test_extract_docs_empty_line_before_decl ... ok(B
test actions::hover::test::test_extract_docs_comment_block ... ok(B
test actions::hover::test::test_extract_docs_module_docs ... ok(B
test actions::hover::test::test_extract_docs_module_docs_with_attribute ... ok(B
test actions::hover::test::test_noindent ... ok(B
test actions::hover::test::test_extract_docs_module_docs_no_copyright ... ok(B
test actions::hover::test::test_process_docs_bash_block ... ok(B
test actions::hover::test::test_process_docs_racer_returns_extra_slashes ... ok(B
test actions::hover::test::test_process_docs_rust_blocks ... ok(B
test actions::requests::test::test_sort_deglob_str ... ok(B
test actions::test::did_save_relevant_files ... ok(B
test actions::test::test_find_word_at_pos ... ok(B
test build::auto_tune_build_wait_no_config ... ok(B
test actions::test::file_watch_relevant_files ... ok(B
test build::cargo::test::test_dedup_flags ... ok(B
test build::cargo::test::test_filter_arg ... ok(B
test build::dont_auto_tune_build_wait_configured ... ok(B
test actions::test::explicit_edition_from_manifest ... ok(B
test actions::notifications::test::learn_client_use_change_watched ... ok(B
test build::external::tests::dirty_units_path_heuristics ... ok(B
test build::external::tests::topological_sort ... ok(B
test build::external::tests::dirties_transitive ... ok(B
test cmd::url_workaround_unc_canonicals ... ok(B
test config::clippy_preference_from_str ... ok(B
test config::blacklist_default ... ok(B
test server::io::tests::read_message_fails_on_empty_input ... ok(B
test server::io::tests::read_message_fails_when_content_is_not_valid_utf8 ... ok(B
test server::io::tests::read_message_fails_when_content_type_is_invalid ... ok(B
test server::io::tests::read_message_fails_when_header_line_is_invalid ... ok(B
test server::io::tests::read_message_fails_when_input_contains_only_header ... ok(B
test server::io::tests::read_message_fails_when_length_header_is_missing ... ok(B
test server::io::tests::read_message_fails_when_length_is_not_numeric ... ok(B
test server::io::tests::read_message_fails_when_length_is_too_large_integer ... ok(B
test server::io::tests::read_message_returns_message_from_input_with_multiple_headers ... ok(B
test server::io::tests::read_message_returns_message_from_valid_lsr_input ... ok(B
test server::io::tests::read_message_returns_message_from_input_with_unknown_headers ... ok(B
test server::message::test::deserialize_message_empty_params ... ok(B
test server::message::test::raw_message_parses_valid_jsonrpc_request_with_numeric_id ... ok(B
test server::message::test::raw_message_parses_valid_jsonrpc_request_with_string_id ... ok(B
test server::message::test::raw_message_with_string_id_parses_into_request ... ok(B
test server::message::test::serialize_message_empty_params ... ok(B
test server::message::test::serialize_message_no_params ... ok(B
test server::message::test::test_parse_as_notification ... ok(B
test server::test::parse_shutdown_object_params ... ok(B
test server::test::test_use_root_path ... ok(B
test server::test::test_use_root_uri ... ok(B
test actions::format::tests::calc_text_edits ... ok(B
test actions::hover::test::test_format_object ... ok(B
test actions::hover::test::test_format_method ... ok(B

test result: ok(B. 69 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

     Running tests/tooltip.rs (/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src/target/aarch64-apple-darwin/release/deps/tooltip-d938b75184a53bd2)

running 4 tests
test test_tooltip ... ignored(B
test test_tooltip_racer ... ignored(B
test test_tooltip_std ... ignored(B
test test_tooltip_std_racer ... ignored(B

test result: ok(B. 0 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 0.00s

/private/tmp/nix-build-rls-1.63.0.drv-0/rustc-1.63.0-src
Finished cargoCheckHook
@nix { "action": "setPhase", "phase": "installPhase" }
installing
Executing cargoInstallHook
Finished cargoInstallHook
@nix { "action": "setPhase", "phase": "fixupPhase" }
post-installation fixup
strip is /nix/store/j8w19vhk1yazy96zm22apalqm1jvvlrg-clang-wrapper-11.1.0/bin/strip
stripping (with command strip and flags -S) in  /nix/store/15rnwgdbvdjgrr9icdf6hp3isl5xinmn-rls-1.63.0/bin
patching script interpreter paths in /nix/store/15rnwgdbvdjgrr9icdf6hp3isl5xinmn-rls-1.63.0
@nix { "action": "setPhase", "phase": "installCheckPhase" }
running install tests
dyld[51343]: Library not loaded: '@rpath/librustc_driver-1033b5af5bf2a3ba.dylib'
  Referenced from: '/nix/store/15rnwgdbvdjgrr9icdf6hp3isl5xinmn-rls-1.63.0/bin/.rls-wrapped'
  Reason: tried: '/nix/store/q5wxadlvfpc6cpfnp8iphcb8zr63iw4n-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/librustc_driver-1033b5af5bf2a3ba.dylib' (no such file), '/nix/store/q5wxadlvfpc6cpfnp8iphcb8zr63iw4n-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/librustc_driver-1033b5af5bf2a3ba.dylib' (no such file), '/usr/local/lib/librustc_driver-1033b5af5bf2a3ba.dylib' (no such file), '/usr/lib/librustc_driver-1033b5af5bf2a3ba.dylib' (no such file)
/nix/store/n0bj0im39g6nagjav9l59hya8rbh2wl6-stdenv-darwin/setup: line 1405: 51343 Abort trap: 6           $out/bin/rls --version

Additional context

Add any other context about the problem here.

Notify maintainers

@symphorien (maintainer) @jwiegley (latest change in the rls package)

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.6.0, macOS 12.5.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.11.0`
 - channels(ar3s3ru): `"darwin"`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
symphorien commented 2 years ago

RLS is unmaintained upstream and removed from rust at the end of the month https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html so I will remove it from nixpkgs.

ar3s3ru commented 2 years ago

Makes a lot of sense, I forgot about this one. Thanks @symphorien for the quick answer 🙇🏻