Skip to content

undefined reference to `git_branch_name_is_valid' #853

Closed
@leecannon

Description

@leecannon

Describe the bug
After commit d42b003 (found by git bisect) compilation fails with the error:

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/home/lee/src/gitui/target/release/deps/gitui-949dd8264f23690b.gitui.f8472fbe-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/lee/src/gitui/target/release/deps" "-L" "/usr/lib" "-L" "/home/lee/src/gitui/target/release/build/libssh2-sys-0a8acf086ff3fcc8/out/build" "-L" "/home/lee/src/gitui/target/release/build/openssl-sys-5066e3da5d8b1711/out/openssl-build/install/lib" "-L" "/home/lee/src/gitui/target/release/build/sys-info-0e15c68dea07eaab/out" "-L" "/home/lee/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcDHIJrs/libsys_info-9829c21529521aca.rlib" "/tmp/rustcDHIJrs/liblibssh2_sys-839056c310076187.rlib" "/tmp/rustcDHIJrs/libopenssl_sys-62ae95b1ef6c5efb.rlib" "-Wl,--start-group" "-Wl,--end-group" "/home/lee/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-96219fb718f2f3e8.rlib" "-Wl,-Bdynamic" "-lgit2" "-lz" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/lee/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/lee/src/gitui/target/release/deps/gitui-949dd8264f23690b" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/lee/src/gitui/target/release/deps/gitui-949dd8264f23690b.gitui.f8472fbe-cgu.0.rcgu.o: in function `gitui::app::App::draw_popups':
          gitui.f8472fbe-cgu.0:(.text._ZN5gitui3app3App11draw_popups17h582edd87cb015eb4E+0x3692): undefined reference to `git_branch_name_is_valid'
          collect2: error: ld returned 1 exit status

  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `gitui` due to previous error

Context (please complete the following information):

  • OS/Distro + Version: Arch
  • GitUI Version: master
  • Rust version: 1.56.0-nightly (0035d9dce 2021-08-16)
  • libgit2 version: 1.1.1
  • gcc version: 11.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions