Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error on rocksdb v0.22.0 #84

Open
nalply opened this issue Nov 28, 2024 · 0 comments
Open

Linking error on rocksdb v0.22.0 #84

nalply opened this issue Nov 28, 2024 · 0 comments

Comments

@nalply
Copy link

nalply commented Nov 28, 2024

Today I wanted to install rgit on my Arch Linux home server.

$ rustup update
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/nalp/.rustup

stable-x86_64-unknown-linux-gnu
rustc 1.82.0 (f6e511eec 2024-10-15)
$ cargo install --git https://github.com/w4/rgit
    Updating git repository `https://github.com/w4/rgit`
  Installing rgit v0.1.4 (https://github.com/w4/rgit#7cbbf9c1)
    Updating crates.io index
     Locking 359 packages to latest compatible versions
      Adding bindgen v0.69.5 (latest: v0.70.1)
      Adding comrak v0.29.0 (latest: v0.31.0)
      Adding dlv-list v0.5.2 (latest: v0.6.0)
      Adding faster-hex v0.9.0 (latest: v0.10.0)
      Adding generic-array v0.14.7 (latest: v1.1.1)

[redacted]

   Compiling gix-odb v0.65.0
   Compiling gix-worktree v0.38.0
   Compiling gix-diff v0.48.0
   Compiling gix-submodule v0.16.0
   Compiling gix v0.68.0
   Compiling rocksdb v0.22.0
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/nalp/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/nalp/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x

[redacted]

repository-1ef563a0ed4227ce/out" "-L" "/tmp/cargo-installLcH5xY/release/build/tree-sitter-grammar-repository-1ef563a0ed4227ce/out" "-L" "/tmp/cargo-installLcH5xY/release/build/tree-sitter-grammar-repository-1ef563a0ed4227ce/out" "-L" "/tmp/cargo-installLcH5xY/release/build/tree-sitter-grammar-repository-1ef563a0ed4227ce/out" "-L" "/tmp/cargo-installLcH5xY/release/build/tree-sitter-grammar-repository-1ef563a0ed4227ce/out" "-L" "/tmp/cargo-installLcH5xY/release/build/tree-sitter-ad1d93fa08170a05/out" "-L" "/home/nalp/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installLcH5xY/release/deps/rgit-cde0f5270468d4ec" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs"
  = note: /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(6b9ce5613ba2324f-scanner.o): in function `tree_sitter_html_external_scanner_create':
          scanner.cc:(.text.tree_sitter_html_external_scanner_create+0x0): multiple definition of `tree_sitter_html_external_scanner_create'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(721bdf1b04363eb7-scanner.o):scanner.cc:(.text.tree_sitter_html_external_scanner_create+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(6b9ce5613ba2324f-scanner.o): in function `tree_sitter_html_external_scanner_serialize':
          scanner.cc:(.text.tree_sitter_html_external_scanner_serialize+0x0): multiple definition of `tree_sitter_html_external_scanner_serialize'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(721bdf1b04363eb7-scanner.o):scanner.cc:(.text.tree_sitter_html_external_scanner_serialize+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(6b9ce5613ba2324f-scanner.o): in function `tree_sitter_html_external_scanner_destroy':
          scanner.cc:(.text.tree_sitter_html_external_scanner_destroy+0x0): multiple definition of `tree_sitter_html_external_scanner_destroy'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(721bdf1b04363eb7-scanner.o):scanner.cc:(.text.tree_sitter_html_external_scanner_destroy+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(6b9ce5613ba2324f-scanner.o): in function `tree_sitter_html_external_scanner_deserialize':
          scanner.cc:(.text.tree_sitter_html_external_scanner_deserialize+0x0): multiple definition of `tree_sitter_html_external_scanner_deserialize'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(721bdf1b04363eb7-scanner.o):scanner.cc:(.text.tree_sitter_html_external_scanner_deserialize+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(6b9ce5613ba2324f-scanner.o): in function `tree_sitter_html_external_scanner_scan':
          scanner.cc:(.text.tree_sitter_html_external_scanner_scan+0x0): multiple definition of `tree_sitter_html_external_scanner_scan'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(721bdf1b04363eb7-scanner.o):scanner.cc:(.text.tree_sitter_html_external_scanner_scan+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(b3aada6d28209d5c-scanner.o): in function `state_new':
          scanner.c:(.text.state_new+0x0): multiple definition of `state_new'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(29d5a2f7b44a084b-scanner.o):scanner.c:(.text.state_new+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(fff719e1cc5f1280-scanner.o): in function `scan_comment':
          scanner.c:(.text.scan_comment+0x0): multiple definition of `scan_comment'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(7916d75eb6270266-scanner.o):scanner.c:(.text.scan_comment+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(c30c88a57adc319b-scanner.o): in function `is_newline':
          scanner.c:(.text.is_newline+0x0): multiple definition of `is_newline'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(a20d3a3ca4e5ec1b-scanner.o):scanner.c:(.text.is_newline+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(c30c88a57adc319b-scanner.o): in function `is_space':
          scanner.c:(.text.is_space+0x0): multiple definition of `is_space'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(a20d3a3ca4e5ec1b-scanner.o):scanner.c:(.text.is_space+0x0): first defined here
          /usr/bin/ld: /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(fac12513b716f374-scanner.o): in function `state_new':
          scanner.c:(.text.state_new+0x0): multiple definition of `state_new'; /tmp/cargo-installLcH5xY/release/deps/libtree_sitter_grammar_repository-c2edc9237dbf1a36.rlib(29d5a2f7b44a084b-scanner.o):scanner.c:(.text.state_new+0x0): first defined here
          collect2: error: ld returned 1 exit status
          

error: could not compile `rgit` (bin "rgit") due to 1 previous error
error: failed to compile `rgit v0.1.4 (https://github.com/w4/rgit#7cbbf9c1)`, intermediate artifacts can be found at `/tmp/cargo-installLcH5xY`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
$ # help me here, please!      

Please understand: I am reporting here and not at rocksdb because I got the impression that rocksdb can fail linking if you use the wrong features. If you disagree, please tell me why and then I can create a better issue for rocksdb. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant