MaaAssistantArknights / MaaAssistantArknights/maa-cli

Cannot build from Git

Open
#443 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
117
Forks
39
PR merge metrics
No merged PRs in 30d

Description

```
...
Compiling icu_provider v2.1.1
Compiling icu_properties v2.1.1
Compiling icu_normalizer v2.1.1
Compiling rustls-webpki v0.103.8
Compiling idna_adapter v1.2.1
Compiling idna v1.1.0
Compiling url v2.5.7
Compiling git2 v0.20.2
Compiling ureq v3.1.4
Compiling maa-installer v0.1.0 (/home/cc/.cargo/git/checkouts/maa-cli-362759bf91170e3f/d4b1dbe/crates/maa-installer)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustc2Ro2hN/symbols.o" "<17 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/tmp/cargo-installRzJC1P/release/deps/{libclap_mangen-522020f27d23cf27,libroff-bf337d7acc9154ac,libself_replace-70f10729193d2b9f,libtempfile-992f1d05d672d400,libgetrandom-47edda2ebf89cf12,libfastrand-f565f1a7b3f68bb1,libserde_yaml-118a80dc1d79f4a8,libunsafe_libyaml-216d25b87716b072,libtoml-d859543237ef7575,libtoml_writer-8b41576b824a95b2,libtoml_parser-ba250643a9db7f2c,libwinnow-b52961487c9d63d7,libserde_spanned-ba7e33ac144e583b,libtoml_datetime-dd8cdf8439e2235e,libenv_logger-5f4aa6a3c7fd6995,libenv_filter-0c6881da921e235e,libsignal_hook-ad1df4d098f468cf,libsignal_hook_registry-7dc437c02b552c4f,libcolor_print-4400fb2dcae36ea2,libprettytable-4312f13ecbf4e345,libis_terminal-2ca4c2f2be8831ce,libunicode_width-bb5540a93b7c89ae,libencode_unicode-39547e9f84479856,libterm-5929326be88b6313,libdirs_next-8ea7dbfa4b24dddb,libdirs_sys_next-37db5b38f3a3b26c,liblazy_static-7733bdc5d6350bbf,libgit2-c898c8e7df4a6c18,libopenssl_probe-36f9bb70e767b639,liburl-f6015c8faea10408,libidna-d1d2b0c991e3edf2,libutf8_iter-0aad727db90d4d62,libidna_adapter-decd42a54f26c9aa,libicu_properties-9686cb61ed21e93c,libicu_properties_data-ef9c711b8170a596,libicu_normalizer-93edb43601cb4a21,libsmallvec-65bfae78c85bd836,libicu_normalizer_data-273c81267cba9d5c,libicu_collections-e03de0acffcc5b15,libpotential_utf-c709fe3806e39570,libicu_provider-2992e6c139219e14,libicu_locale_core-70052978dd774ad0,libtinystr-176e7645644796c8,liblitemap-ea6050eccb480f9d,libwriteable-2e0fbba5ce2920b8,libzerovec-88e422c32552fc58,libzerotrie-f1e7c089bf9814fa,libyoke-f88673fa825db529,libstable_deref_trait-6af59c95fd80f2a9,libzerofrom-54fdb35faccfb498,libform_urlencoded-bc491499882f9453,liblibgit2_sys-d509a645734ba527,liblibssh2_sys-57b9579d68b00fc9,libopenssl_sys-38c245eb06ebbd59,liblibz_sys-03ce05b5dd4efb80,libsha2-faa4ed47d7a372f0,libcpufeatures-068a9aeb591fa98f,libmaa_version-362e5a1f04b9a3e8,libmaa_installer-20ef4f966974c9bd,libtar-4df3433af8582239,libxattr-df0355955f5dbb3c,librustix-dc438bb02aa16def,libbitflags-a60d8276ad909838,liblinux_raw_sys-12e5cd4e0d0ddf4c,libfiletime-21af5615107e858d,libdigest-148e1edc9dfe47be,libblock_buffer-d93051ed7e8f4227,libcrypto_common-2036d10fc4fab8d8,libgeneric_array-3b2c50be290a8526,libtypenum-a7d1a241502b59f6,libzip-a331a5f5961033df,libindexmap-ceebce83e6e1abcc,libequivalent-f60641437efedd8b,libhashbrown-941e5637549e52c5,libindicatif-be89c25d3618435f,libportable_atomic-947f59cffda68009,libunit_prefix-fc74239bc174a67a,libconsole-d45da10c01d0fa8f,libunicode_width-c678b6817f2c38e8,libonce_cell-2370782cc8dc072f,libmaa_sys-5d8eaf2ccfdb159c,liblibloading-bb6b288a41d68917,libthiserror-da9fc89defc29c4f,libmaa_types-dc1ff323513b6636,libclap_complete-70571a64aba50361,libclap-965c0adcbe466651,libclap_builder-04e28dc58d8ae12d,libstrsim-f17402e02b4d3bcf,libanstream-5b2bdd00492e0491,libanstyle_query-cee754a6e05b1ca8,libis_terminal_polyfill-85b42470572a0c30,libcolorchoice-0095ccddabf1706b,libanstyle_parse-6a6de9f4eaf7fab5,libutf8parse-34a4bc8679111977,libclap_lex-474316980cf9e376,libanstyle-7384e7d7527efb1b,libchrono-6b1d5f51c4dc406a,libiana_time_zone-2d35782b46185695,libnum_traits-e4266f95f40aecd9,libanyhow-5926c138e48fda6f,libureq-73a345294a700c05,libwebpki_roots-8b9bcc99f781445d,libserde_json-87902785b5ce4171,libmemchr-05d465e5ff2fe041,libryu-c3883f738d3ee0b7,libserde-8eb73b0b0eb8f328,libserde_core-1f5fe0739a7bb1d3,librustls-741828a9a374d188,libsubtle-1d3332f9fc91a2c5,libwebpki-9ec6b13de5bb9e3e,libring-26662ffcccf0dacb,libgetrandom-ffca45367dbf49f0,libuntrusted-b992b3e513593994,librustls_pki_types-6fc08979ba5c1fab,libzeroize-6768254ad43f095e,libpercent_encoding-63e4375395f2f69a,libflate2-f39ce65ad4cbd777,libminiz_oxide-85ae3465d08af8ca,libsimd_adler32-72175c4226279fcc,libcrc32fast-8bdaf5e5d36ce61f,libcfg_if-d2e636d86701c50e,libutf8-ab0a148fed647037,libureq_proto-feacda8451226c40,libhttparse-0ab50c148b1d0866,libbase64-976ffa02751f2cad,libhttp-19f6071d698045db,libitoa-f6afa94d8c1bb202,libbytes-1bc52c0be0e0af2c,libsemver-306231ed42157a4e,libmaa_dirs-3a7037160cf96f64,liblog-c837ca6d84e1e7c9,libconstcat-416fe2df6bc137f2,libdunce-2ec3023ff4649113,libdirectories-1a61e18c990253d7,libdirs_sys-e8878806a926854b,liblibc-ed67dd57e461733a,liboption_ext-2e6fc8e1c8e0792c}.rlib" "/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgit2" "-lssl" "-lcrypto" "-lssl" "-lcrypto" "-lz" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/tmp/rustc2Ro2hN/raw-dylibs" "-B/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/tmp/cargo-installRzJC1P/release/build/libssh2-sys-72f6eab8766a99f7/out/build" "-L" "/tmp/cargo-installRzJC1P/release/build/ring-34fafee288429b0c/out" "-L" "/usr/lib64" "-L" "/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installRzJC1P/release/deps/maa-50b5f7cd453e6db4" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: rust-lld: error: corrupt input file: version definition index 0 for symbol git_merge_file_result_free is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_blob_filtered_content is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_stream_register is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_rebase_operation_entrycount is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_note_next is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_remote_free is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_filter_source_path is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_revparse_ext is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_oid_pathfmt is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_diff_commit_as_email is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_indexer_commit is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_reflog_rename is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_index_remove_directory is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_diff_tree_to_index is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_signature_default_from_env is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_diff_status_char is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_attr_foreach_ext is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_tag_foreach is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_credential_default_new is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: corrupt input file: version definition index 0 for symbol git_reflog_delete is out of bounds
>>> defined in /usr/lib64/libgit2.so

rust-lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
collect2: error: ld returned 1 exit status

error: could not compile `maa-cli` (bin "maa") due to 1 previous error
error: failed to compile `maa-cli v0.6.0 (https://github.com/MaaAssistantArknights/maa-cli#d4b1dbed)`, intermediate artifacts can be found at `/tmp/cargo-installRzJC1P`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
$ cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,cobol,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-15.2.1-build/gcc-15.2.1-20251111/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.2.1 20251111 (Red Hat 15.2.1-4) (GCC)
$
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Git-based installation of maa-cli v0.6.0 with the reported Rust and cc versions, starting from the cargo install command and the linker invocation. Inspect how the maa-installer crate and libgit2 dependency are linked; done means the project builds successfully from Git without the reported rust-lld errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.