Skip to content

thin-provisioning-tools-1.0.4_1 build broken #57735

@philhofer

Description

@philhofer

Is this a new report?

Yes

System Info

Void 6.12.31_1 x86_64-musl AuthenticAMD notuptodate rrrn

Package(s) Affected

thin-provisioning-tools-1.0.4_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

Build succeeds.

Actual behaviour

thin-provisioning-tools fails to link (x86_64-musl) on a clean build. I just did a clean re-build of my hostdir today on e98930c so hopefully this failure is immediately reproducible.

The actual cause of the build failure is cargo not linking against musl. I don't know if the issue is related to the packing of thin-provisioning-tools specifically or a problem with the cargo build flavor on x86_64-musl.

; ./xbps-src -N pkg kpartx
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> kpartx-0.9.6_1: removing autodeps, please wait...
=> kpartx-0.9.6_1: building with [gnu-makefile] for x86_64-musl...
   [target] device-mapper-devel-2.03.29_1: not found
=> lvm2-2.03.29_1: building with [gnu-configure] (dependency of kpartx) for x86_64-musl...
   [host] pkg-config-0.29.2_3: found (/host/binpkgs)
   [target] eudev-libudev-devel-3.2.14_2: found (/host/binpkgs)
   [target] libaio-devel-0.3.113_1: found (/host/binpkgs)
   [target] libblkid-devel-2.41.2_1: found (/host/binpkgs)
   [target] readline-devel-8.2.010_1: found (/host/binpkgs)
   [target] thin-provisioning-tools-1.0.4_1: not found
   [runtime] thin-provisioning-tools-1.0.4_1: not found
   [runtime] eudev-libudev-devel-3.2.14_2: found (/host/binpkgs)
   [runtime] libaio-devel-0.3.113_1: found (/host/binpkgs)
   [runtime] libblkid-devel-2.41.2_1: found (/host/binpkgs)
   [runtime] readline-devel-8.2.010_1: found (/host/binpkgs)
   [runtime] thin-provisioning-tools-1.0.4_1: not found
   [runtime] device-mapper-2.03.29_1: not found (subpkg, ignored)
   [runtime] eudev-libudev-devel-3.2.14_2: found (/host/binpkgs)
   [runtime] libaio-devel-0.3.113_1: found (/host/binpkgs)
   [runtime] libblkid-devel-2.41.2_1: found (/host/binpkgs)
   [runtime] readline-devel-8.2.010_1: found (/host/binpkgs)
   [runtime] thin-provisioning-tools-1.0.4_1: not found
   [runtime] device-mapper-2.03.29_1: not found (subpkg, ignored)
=> thin-provisioning-tools-1.0.4_1: building with [cargo] [rust] (dependency of lvm2) for x86_64-musl...
   [host] pkg-config-0.29.2_3: found (/host/binpkgs)
   [host] cargo-1.88.0_1: found (/host/binpkgs)
   [host] cargo-auditable-0.7.1_1: found (/host/binpkgs)
   [target] libzstd-devel-1.5.7_1: found (/host/binpkgs)
=> thin-provisioning-tools-1.0.4_1: installing host dependencies: pkg-config-0.29.2_3 cargo-1.88.0_1 cargo-auditable-0.7.1_1 ...
=> thin-provisioning-tools-1.0.4_1: installing target dependencies: libzstd-devel-1.5.7_1 ...
=> thin-provisioning-tools-1.0.4_1: running pre-build hook: 02-script-wrapper ...
=> thin-provisioning-tools-1.0.4_1: running do_build ...
warning: elided lifetime has a name
   --> src/cache/dump.rs:159:86
    |
158 | impl<'a> HintEmitter<'a> {
    |      -- lifetime `'a` declared here
159 |     pub fn new(emitter: &'a mut dyn MetadataVisitor, valid_mappings: FixedBitSet) -> HintEmitter {
    |                                                                                      ^^^^^^^^^^^ this elided lifetime gets resolved as `'a`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default

warning: elided lifetime has a name
  --> src/era/dump.rs:29:57
   |
28 | impl<'a> EraEmitter<'a> {
   |      -- lifetime `'a` declared here
29 |     pub fn new(emitter: &'a mut dyn MetadataVisitor) -> EraEmitter {
   |                                                         ^^^^^^^^^^ this elided lifetime gets resolved as `'a`

warning: elided lifetime has a name
   --> src/thin/ls.rs:129:67
    |
128 | impl<'a> LsTable<'a> {
    |      -- lifetime `'a` declared here
129 |     fn new(fields: &'a [OutputField], nr_rows: usize, bs: u32) -> LsTable {
    |                                                                   ^^^^^^^ this elided lifetime gets resolved as `'a`

warning: elided lifetime has a name
  --> src/thin/trim.rs:28:60
   |
27 | impl<'a> RangeIterator<'a> {
   |      -- lifetime `'a` declared here
28 |     fn new(bitmaps: &'a [Block], nr_blocks: u64) -> Result<RangeIterator> {
   |                                                            ^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a`

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
  --> src/pack/vm.rs:14:17
   |
14 | #[derive(Debug, FromPrimitive)]
   |                 ^------------
   |                 |
   |                 `FromPrimitive` is not local
   |                 move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Tag`
15 | enum Tag {
   |      --- `Tag` is not local
   |
   = note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed
   = note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive`
   = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
   = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
   = note: `#[warn(non_local_definitions)]` on by default
   = note: this warning originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `thinp` (lib) generated 5 warnings
   Compiling thinp v1.0.4 (/builddir/thin-provisioning-tools-1.0.4)
error: linking with `cc` failed: exit status: 1
  |
  = note:  "cc" "-m64" "/tmp/rustckmxEF6/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/{libthinp-263152cf9dc7c670.rlib,libexitcode-e4807ee10b1e9005.rlib,librangemap-027e4ddcb625e5a7.rlib,libindicatif-b66c3ce72b61aff4.rlib,libportable_atomic-b82ec65001bce2bc.rlib,libnumber_prefix-04bd22dd27c36e9f.rlib,libconsole-97e5c2f86df757a6.rlib,libunicode_width-7b662ce8e8a8b505.rlib,liblazy_static-f2690df8eb4e4384.rlib,libthreadpool-a0b2830a94db7666.rlib,libnum_cpus-74c476e8979fe04e.rlib,libdata_encoding-0120f68424a7e7fb.rlib,libnum_traits-ce3d320685719694.rlib,librand-7ee23a1c4329d08e.rlib,librand_chacha-0505135692470d1f.rlib,libppv_lite86-4da88599804fe37b.rlib,librand_core-21b9eeeb50c1adb9.rlib,libgetrandom-a43c3cdaf4009342.rlib,libflate2-efc2472eba38eacc.rlib,libminiz_oxide-fc4fa38735a447db.rlib,libadler-3589aa159380bfb3.rlib,libcrc32fast-70712df3991c8844.rlib,libcfg_if-a5ed94d8a6d6e41e.rlib,libthiserror-0a122c094109b833.rlib,libiovec-0ebade59bb75022f.rlib,libsafemem-79b00046677cb888.rlib,libcrc32c-05bd87014e8cda57.rlib,libquick_xml-ffc37505ee40423c.rlib,libbase64-21d5e19668e642fe.rlib,libroaring-d728621f073b91e1.rlib,libbytemuck-4c615c23cf08e870.rlib,libretain_mut-6df93906bf1cd33d.rlib,libnom-0504bc004ae4ba19.rlib,libmemchr-b2b8d858a2ccd36d.rlib,libbyteorder-27ef6faf0689dd19.rlib,libfixedbitset-eed761ea419de794.rlib,libanyhow-bee850348a79cd6e.rlib,libclap-47d5f5f790a4b95f.rlib,libatty-7277179357f3d7e9.rlib,liblibc-b3090201162920aa.rlib,libstrsim-5376b4c6da415b01.rlib,libtermcolor-597d3c5ce6b6f7af.rlib,libtextwrap-dd7a85aa20aa905b.rlib,libclap_lex-34369095e1dc7026.rlib,libos_str_bytes-9da9f928e50d271c.rlib,libindexmap-dc5753a7b2f64b24.rlib,libhashbrown-acf043c0a7abd7d7.rlib,libbitflags-6fcc030ea9627edf.rlib}.rlib" "<sysroot>/lib64/rustlib/x86_64-unknown-linux-musl/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,libcfg_if-*,liblibc-*,liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lssp_nonshared" "-lexecinfo" "-lgcc_s" "-lc" "-L" "/tmp/rustckmxEF6/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "<sysroot>/lib" "-L" "<sysroot>/lib64/rustlib/x86_64-unknown-linux-musl/lib" "-o" "/builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/pdata_tools-236152c2fc7851cb" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/pdata_tools_audit_data.o" "-Wl,--undefined=AUDITABLE_VERSION_INFO"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /usr/bin/ld: /builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/libthinp-263152cf9dc7c670.rlib(thinp-263152cf9dc7c670.thinp.c47ca85a1c1cb204-cgu.02.rcgu.o): in function `thinp::io_engine::base::read_vectored_at':
          /builddir/thin-provisioning-tools-1.0.4/src/io_engine/base.rs:118:(.text._ZN105_$LT$thinp..io_engine..utils..VectoredBlockIo$LT$T$GT$$u20$as$u20$thinp..io_engine..utils..ReadBlocks$GT$11read_blocks17h5b6b8d87632c5d70E+0x20b): undefined reference to `preadv64'
          /usr/bin/ld: /builddir/thin-provisioning-tools-1.0.4/src/io_engine/base.rs:118:(.text._ZN105_$LT$thinp..io_engine..utils..VectoredBlockIo$LT$T$GT$$u20$as$u20$thinp..io_engine..utils..ReadBlocks$GT$11read_blocks17h745243dbaf6d0d9eE+0x1f3): undefined reference to `preadv64'
          /usr/bin/ld: /builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/libthinp-263152cf9dc7c670.rlib(thinp-263152cf9dc7c670.thinp.c47ca85a1c1cb204-cgu.02.rcgu.o): in function `thinp::io_engine::base::write_vectored_at':
          /builddir/thin-provisioning-tools-1.0.4/src/io_engine/base.rs:128:(.text._ZN106_$LT$thinp..io_engine..utils..VectoredBlockIo$LT$T$GT$$u20$as$u20$thinp..io_engine..utils..WriteBlocks$GT$12write_blocks17h78050f205525e06dE+0x1fa): undefined reference to `pwritev64'
          /usr/bin/ld: /builddir/thin-provisioning-tools-1.0.4/target/x86_64-unknown-linux-musl/release/deps/libthinp-263152cf9dc7c670.rlib(thinp-263152cf9dc7c670.thinp.c47ca85a1c1cb204-cgu.06.rcgu.o): in function `thinp::file_utils::libc_stat64':
          /builddir/thin-provisioning-tools-1.0.4/src/file_utils.rs:25:(.text._ZN5thinp10file_utils11libc_stat6417h478edb6ae80340d0E+0x83): undefined reference to `stat64'
          collect2: error: ld returned 1 exit status

  = note: 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#rustc-link-lib)

error: could not compile `thinp` (bin "pdata_tools") due to 1 previous error
=> ERROR: thin-provisioning-tools-1.0.4_1: do_build: '${make_cmd} build --release --locked --target ${RUST_TARGET} ${configure_args} ${make_build_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8

Steps to reproduce

  1. xbps-src zap
  2. xbps-src -A x86_64-musl -N pkg thin-provisioning-tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-testingTesting a PR or reproducing an issue needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions