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

Failed to install via cargo: failed to run custom build command for compress-tools v0.11.2 #56

Open
dflock opened this issue Nov 5, 2022 · 0 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@dflock
Copy link

dflock commented Nov 5, 2022

Describe the bug

Installing huber using cargo fails, complaining about missing libarchive, despite it being installed.

To Reproduce

System:

  • Ubuntu 22.04.1 LTS
  • rustc 1.65.0 (897e37553 2022-11-02)
  • rustup 1.25.1 (bb60b1e89 2022-07-12)

I installed the dependencies:

$ sudo apt install libssl-dev libarchive-dev
[sudo] password for duncan: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

libssl-dev is already the newest version (3.0.2-0ubuntu1.7).

The following NEW packages will be installed:
  libarchive-dev
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 581 kB of archives.
After this operation, 2,195 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ca.archive.ubuntu.com/ubuntu jammy/main amd64 libarchive-dev amd64 3.6.0-1ubuntu1 [581 kB]
Fetched 581 kB in 1s (677 kB/s)        
Selecting previously unselected package libarchive-dev:amd64.
(Reading database ... 1116613 files and directories currently installed.)
Preparing to unpack .../libarchive-dev_3.6.0-1ubuntu1_amd64.deb ...
Unpacking libarchive-dev:amd64 (3.6.0-1ubuntu1) ...
Setting up libarchive-dev:amd64 (3.6.0-1ubuntu1) ...
Processing triggers for man-db (2.10.2-1) ...

I then tried to install huber using cargo, which failed:

$ cargo install huber
    Updating crates.io index
  Installing huber v0.3.8
   Compiling autocfg v1.1.0
   Compiling libc v0.2.137
   Compiling proc-macro2 v1.0.47
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.103
   Compiling memchr v2.5.0
   Compiling pkg-config v0.3.26
   Compiling log v0.4.17
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.147
   Compiling serde_derive v1.0.147
   Compiling indexmap v1.9.1
   Compiling num-traits v0.2.15
   Compiling futures-core v0.3.25
   Compiling num-integer v0.1.45
   Compiling slab v0.4.7
   Compiling jobserver v0.1.25
   Compiling futures-channel v0.3.25
   Compiling openssl v0.10.42
   Compiling once_cell v1.16.0
   Compiling cc v1.0.74
   Compiling scopeguard v1.1.0
   Compiling httparse v1.8.0
   Compiling native-tls v0.2.11
   Compiling itoa v1.0.4
   Compiling serde_json v1.0.87
   Compiling pin-project-lite v0.2.9
   Compiling num-bigint v0.2.6
   Compiling thiserror v1.0.37
   Compiling bytes v1.1.0
   Compiling lock_api v0.4.9
   Compiling hashbrown v0.12.3
   Compiling version_check v0.9.4
   Compiling parking_lot_core v0.9.4
   Compiling openssl-sys v0.9.77
   Compiling unicase v2.6.0
   Compiling ring v0.16.20
   Compiling aho-corasick v0.7.19
   Compiling num_cpus v1.14.0
   Compiling tokio v1.21.2
   Compiling ryu v1.0.11
   Compiling futures-sink v0.3.25
   Compiling smallvec v1.10.0
   Compiling futures-task v0.3.25
   Compiling regex-syntax v0.6.28
   Compiling encoding_rs v0.8.31
   Compiling mio v0.8.5
   Compiling socket2 v0.4.7
   Compiling time v0.1.44
   Compiling regex v1.7.0
   Compiling iana-time-zone v0.1.53
   Compiling anyhow v1.0.66
   Compiling futures-util v0.3.25
   Compiling fnv v1.0.7
   Compiling http v0.2.8
   Compiling chrono v0.4.22
   Compiling openssl-macros v0.1.0
   Compiling thiserror-impl v1.0.37
   Compiling tokio-macros v1.8.0
   Compiling futures-macro v0.3.25
   Compiling parking_lot v0.12.1
   Compiling tracing-core v0.1.30
   Compiling signal-hook-registry v1.4.0
   Compiling bitflags v1.3.2
   Compiling foreign-types-shared v0.1.1
   Compiling pin-utils v0.1.0
   Compiling lazy_static v1.4.0
   Compiling futures-io v0.3.25
   Compiling hyperx v1.4.0
   Compiling foreign-types v0.3.2
   Compiling tracing v0.1.37
   Compiling tinyvec_macros v0.1.0
   Compiling percent-encoding v2.1.0
   Compiling matches v0.1.9
   Compiling tinyvec v1.6.0
   Compiling tokio-util v0.7.4
   Compiling libz-sys v1.1.8
   Compiling atty v0.2.14
   Compiling openssl-probe v0.1.5
   Compiling base64 v0.13.1
   Compiling crossbeam-utils v0.8.12
   Compiling httpdate v1.0.2
   Compiling try-lock v0.2.3
   Compiling want v0.3.0
   Compiling h2 v0.3.15
   Compiling unicode-normalization v0.1.22
   Compiling form_urlencoded v1.0.1
   Compiling http-body v0.4.5
   Compiling memoffset v0.6.5
   Compiling tower-service v0.3.2
   Compiling unicode-bidi v0.3.8
   Compiling regex-automata v0.1.10
   Compiling unicode-width v0.1.10
   Compiling bstr v0.2.17
   Compiling idna v0.2.3
   Compiling hyper v0.14.22
   Compiling tokio-native-tls v0.3.0
   Compiling libssh2-sys v0.2.23
   Compiling csv-core v0.1.10
   Compiling terminal_size v0.1.17
   Compiling dirs v1.0.5
   Compiling crossbeam-epoch v0.9.11
   Compiling itoa v0.4.8
   Compiling termcolor v1.1.3
   Compiling mime v0.3.16
   Compiling linked-hash-map v0.5.6
   Compiling untrusted v0.7.1
   Compiling byteorder v1.4.3
   Compiling quick-error v1.2.3
   Compiling spin v0.5.2
   Compiling ucd-trie v0.1.5
   Compiling humantime v1.3.0
   Compiling pest v2.4.1
   Compiling term v0.5.2
   Compiling yaml-rust v0.4.5
   Compiling csv v1.1.6
   Compiling console v0.15.2
   Compiling hyper-tls v0.5.0
   Compiling simple_asn1 v0.4.1
   Compiling url v2.3.0
   Compiling serde_urlencoded v0.7.1
   Compiling pem v0.8.3
   Compiling dirs-sys v0.3.7
   Compiling ipnet v2.5.0
   Compiling number_prefix v0.3.0
   Compiling encode_unicode v0.3.6
   Compiling language-tags v0.3.2
   Compiling base64 v0.12.3
   Compiling rayon-core v1.9.3
   Compiling futures v0.3.25
   Compiling jsonwebtoken v7.2.0
   Compiling env_logger v0.6.2
   Compiling prettytable-rs v0.8.0
   Compiling reqwest v0.11.12
   Compiling indicatif v0.15.0
   Compiling dirs v3.0.2
   Compiling semver-parser v0.10.2
   Compiling serde_yaml v0.8.26
   Compiling futures-executor v0.3.25
   Compiling Inflector v0.11.4
   Compiling libgit2-sys v0.12.26+1.3.0
   Compiling data-encoding v2.3.2
   Compiling maplit v1.0.2
   Compiling libcli-rs v0.1.3
   Compiling hubcaps-ex v0.6.2
   Compiling pretty_env_logger v0.3.1
   Compiling semver v0.11.0
   Compiling crossbeam-deque v0.8.2
   Compiling crossbeam-channel v0.5.6
   Compiling compress-tools v0.11.2
   Compiling rayon v1.5.3
   Compiling async-trait v0.1.58
   Compiling convert_case v0.4.0
   Compiling os_str_bytes v6.3.1
   Compiling clap_lex v0.2.4
   Compiling derive_more v0.99.13
error: failed to run custom build command for `compress-tools v0.11.2`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installsFgPPI/release/build/compress-tools-32a93956b5aee2bf/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBARCHIVE_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBARCHIVE_STATIC
  cargo:rerun-if-env-changed=LIBARCHIVE_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'Unable to find libarchive: `"pkg-config" "--libs" "--cflags" "libarchive" "libarchive >= 3.2.0"` did not exit successfully: exit status: 1
  error: could not find system library 'libarchive' required by the 'compress-tools' crate

  --- stderr
  Package libarchive was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libarchive.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libarchive' found
  Package libarchive was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libarchive.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libarchive' found
  ', /home/duncan/.cargo/registry/src/github.com-1ecc6299db9ec823/compress-tools-0.11.2/src/build.rs:14:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `huber v0.3.8`, intermediate artifacts can be found at `/tmp/cargo-installsFgPPI`

Expected behavior

Install via cargo should work.

Environment

@dflock dflock added the bug Something isn't working label Nov 5, 2022
@dflock dflock changed the title failed to run custom build command for compress-tools v0.11.2 Failed to install via cargo: failed to run custom build command for compress-tools v0.11.2 Nov 5, 2022
@innobead innobead added the dependencies Pull requests that update a dependency file label Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants