!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

582 Members
128 Servers

Load older messages


SenderMessageTime
18 Jul 2025
@quadradical:federated.nexusQuadRadical (Ping)Any idea what I should try to fix it?19:13:45
@quadradical:federated.nexusQuadRadical (Ping) oh you said depsBuildBuild = [pkg-config lvm2]; before sorry i missed that 19:14:30
@quadradical:federated.nexusQuadRadical (Ping)sadly there is no difference with that19:23:48
@quadradical:federated.nexusQuadRadical (Ping) still this:
       >   = note: some arguments are omitted. use `--verbose` to show all linker arguments
       >   = note: /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: skipping incompatible /nix/store/6fkll672b41pqdfcgkxk9kdgj7gf9myh-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
       >           /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: cannot find -ldevmapper: No such file or directory
       >           /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: skipping incompatible /nix/store/6fkll672b41pqdfcgkxk9kdgj7gf9myh-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
       >           collect2: error: ld returned 1 exit status
19:24:08
@emilazy:matrix.orgemilyis that on top of Alyssa's rebased branch? can you share the whole expression?20:09:24
@emilazy:matrix.orgemily Alyssa Ross: I think you should be able to drop the ALLOW_CROSS thing we set somewhere too btw 20:13:14
@qyliss:fairydust.spaceAlyssa RossOh okay I'll look tomorrow (comment on the PR so I don't forget?)20:13:45
@emilazy:matrix.orgemilysure20:14:03
@emilazy:matrix.orgemilyleft a comment20:16:32
@quadradical:federated.nexusQuadRadical (Ping) Yep. Sorry, what is an expression, is that the response from the nix build? 20:21:49
@emilazy:matrix.orgemilythe patched package20:24:10
@emilazy:matrix.orgemilyjust your Nix file :)20:24:15
@quadradical:federated.nexusQuadRadical (Ping) ah okay! 20:24:27
@quadradical:federated.nexusQuadRadical (Ping)
{
  lib,
  rustPlatform,
  pkg-config,
  udev,
  lvm2,
  fetchFromGitHub,
  nixosTests,
}:
rustPlatform.buildRustPackage rec {
  pname = "thin-provisioning-tools";
  version = "1.2.0";

  src = fetchFromGitHub {
    owner = "jthornber";
    repo = "thin-provisioning-tools";
    rev = "v${version}";
    hash = "sha256-gjsURDzA4LRTTgKZPzzTcvTdi1mXx4FkWmyoPcpdPfU=";
  };

  depsBuildBuild = [pkg-config lvm2];
  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
  ];
  buildInputs = [
    udev
    lvm2
  ];

  useFetchCargoVendor = true;
  cargoHash = "sha256-H5GRAZpFl2t/bH8THyPkZq5ptS70XkhSCxQ6ko+0RC8=";

  passthru.tests = {
    inherit (nixosTests.lvm2) lvm-thinpool-linux-latest;
  };

  # Uses O_DIRECT, which is not supported on all filesystems.
  # https://github.com/jthornber/thin-provisioning-tools/issues/38
  doCheck = false;

  # required for config compatibility with configs done pre 0.9.0
  # see https://github.com/NixOS/nixpkgs/issues/317018
  postInstall = ''
    ln -s $out/bin/pdata_tools $out/bin/cache_check
    ln -s $out/bin/pdata_tools $out/bin/cache_dump
    ln -s $out/bin/pdata_tools $out/bin/cache_metadata_size
    ln -s $out/bin/pdata_tools $out/bin/cache_repair
    ln -s $out/bin/pdata_tools $out/bin/cache_restore
    ln -s $out/bin/pdata_tools $out/bin/cache_writeback
    ln -s $out/bin/pdata_tools $out/bin/era_check
    ln -s $out/bin/pdata_tools $out/bin/era_dump
    ln -s $out/bin/pdata_tools $out/bin/era_invalidate
    ln -s $out/bin/pdata_tools $out/bin/era_restore
    ln -s $out/bin/pdata_tools $out/bin/thin_check
    ln -s $out/bin/pdata_tools $out/bin/thin_delta
    ln -s $out/bin/pdata_tools $out/bin/thin_dump
    ln -s $out/bin/pdata_tools $out/bin/thin_ls
    ln -s $out/bin/pdata_tools $out/bin/thin_metadata_size
    ln -s $out/bin/pdata_tools $out/bin/thin_repair
    ln -s $out/bin/pdata_tools $out/bin/thin_restore
    ln -s $out/bin/pdata_tools $out/bin/thin_rmap
    ln -s $out/bin/pdata_tools $out/bin/thin_trim
  '';

  meta = with lib; {
    homepage = "https://github.com/jthornber/thin-provisioning-tools/";
    description = "Suite of tools for manipulating the metadata of the dm-thin device-mapper target";
    license = licenses.gpl3;
    platforms = platforms.unix;
    maintainers = [];
  };
}

20:24:29
@quadradical:federated.nexusQuadRadical (Ping) its the regular package with depsBuildBuild = [pkg-config lvm2]; added 20:24:39
@emilazy:matrix.orgemily I fear this may be precisely because of the ALLOW_CROSS thing. can you add preConfigure = ''unset PKG_CONFIG_ALLOW_CROSS; env'';? 20:26:32
@quadradical:federated.nexusQuadRadical (Ping)sure!20:26:41
@emilazy:matrix.orgemily(I'd expect a different error message, ideally; but the environment dump it prints early in the build will be interesting to see in either case)20:26:57
@quadradical:federated.nexusQuadRadical (Ping) same error 20:29:34
@quadradical:federated.nexusQuadRadical (Ping)
       > error: linking with `/nix/store/7w8g0i44psrx7p1gl92s1s479kcf9xja-gcc-wrapper-14.3.0/bin/cc` failed: exit status: 1
       >   |
       >   = note:  "/nix/store/7w8g0i44psrx7p1gl92s1s479kcf9xja-gcc-wrapper-14.3.0/bin/cc" "-m64" "/build/rustcYVLBFb/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/build/source/target/release/deps/{libdevicemapper_sys-588c6103ed122e5d.rlib,libsemver-153b5263e3dd1e07.rlib}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/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" "-ldevmapper" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/build/rustcYVLBFb/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/nix/store/6fkll672b41pqdfcgkxk9kdgj7gf9myh-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/build/source/target/release/build/devicemapper-f9856069ae5ea4d9/build_script_build-f9856069ae5ea4d9" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
       >   = note: some arguments are omitted. use `--verbose` to show all linker arguments
       >   = note: /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: skipping incompatible /nix/store/6fkll672b41pqdfcgkxk9kdgj7gf9myh-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
       >           /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: cannot find -ldevmapper: No such file or directory
       >           /nix/store/lg4hb0n4z18dfyi7jwrmrkw2dvc4fig8-binutils-2.44/bin/ld: skipping incompatible /nix/store/6fkll672b41pqdfcgkxk9kdgj7gf9myh-lvm2-aarch64-unknown-linux-gnu-2.03.32-lib/lib/libdevmapper.so when searching for -ldevmapper
       >           collect2: error: ld returned 1 exit status
       >           
       >
       > error: could not compile `devicemapper` (build script) due to 1 previous error
       > warning: build failed, waiting for other jobs to finish...
20:29:36
@quadradical:federated.nexusQuadRadical (Ping) im building it like this is that not correct? nix build .#pkgsCross.aarch64-multiplatform.thin-provisioning-tools 20:29:49
@emilazy:matrix.orgemilyyes (assuming that your local tree has Alyssa's patch applied)20:30:18
@quadradical:federated.nexusQuadRadical (Ping)yes, it does20:30:25
@emilazy:matrix.orgemilycan you share the part of the log where it dumps every environment variable?20:30:31
@quadradical:federated.nexusQuadRadical (Ping)
SHELL=/nix/store/xfbygkx0hw830b6afsgkfxhrk253s33a-bash-5.3p0/bin/bash
NIX_BUILD_CORES=12
configureFlags=--build=x86_64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu
cargoBuildType=release
mesonFlags=--cross-file=/nix/store/hr9vv8yrnnbbfbam46hw71zdjv7swr45-cross-file.conf
PKG_CONFIG_PATH=/nix/store/f35mrashq0mbqhh4zzf04ac16vqw0jdl-systemd-minimal-libs-aarch64-unknown-linux-gnu-257.6-dev/lib/pkgconfig:/nix/store/f35mrashq0mbqhh4zzf04ac16vqw0jdl-systemd-minimal-libs-aarch64-unknown-linux-gnu-257.6-dev/share/pkgconfig:/nix/store/1mrj01sfx05zh52ah4n732dygfmz2y64-lvm2-aarch64-unknown-linux-gnu-2.03.32-dev/lib/pkgconfig
shell=/nix/store/xfbygkx0hw830b6afsgkfxhrk253s33a-bash-5.3p0/bin/bash
depsHostHost=
PKG_CONFIG_AARCH64_UNKNOWN_LINUX_GNU=aarch64-unknown-linux-gnu-pkg-config
cargoCheckNoDefaultFeatures=
STRINGS=aarch64-unknown-linux-gnu-strings
src=/nix/store/aa1hi8acvcyx1yrmhhckbq1vfql9d8r3-source
depsTargetTarget=
cargoDeps=/nix/store/nplbzibili0rl1479108lk14haj21zba-thin-provisioning-tools-1.2.0-vendor
stdenv=/nix/store/fj5fcj5ywgqylw39gynf1bd7dcpsy5m0-stdenv-linux
builder=/nix/store/xfbygkx0hw830b6afsgkfxhrk253s33a-bash-5.3p0/bin/bash
NIX_CC_WRAPPER_TARGET_HOST_aarch64_unknown_linux_gnu=1
PWD=/build/source
SOURCE_DATE_EPOCH=315532800
pname=thin-provisioning-tools
NIX_ENFORCE_NO_NATIVE=1
NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_aarch64_unknown_linux_gnu=1
cargoCheckFeatures=
CXX=aarch64-unknown-linux-gnu-g++
TEMPDIR=/build
system=x86_64-linux
TZ=UTC
cargoCheckType=release
LIBCLANG_PATH=/nix/store/m7i65652v6m008jqin9ai8m91vwnrln7-clang-19.1.7-lib/lib
doInstallCheck=
HOME=/homeless-shelter
NIX_BINTOOLS=/nix/store/naly8fq73fn95cyrq7ykfi6v01xs5qmp-aarch64-unknown-linux-gnu-binutils-wrapper-2.44
GZIP_NO_TIMESTAMPS=1
depsTargetTargetPropagated=
cmakeFlags=-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_HOST_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_PROCESSOR=x86_64
NIX_SSL_CERT_FILE=/no-cert-file.crt
version=1.2.0
outputs=out
NIX_STORE=/nix/store
TMPDIR=/build
LD=aarch64-unknown-linux-gnu-ld
NIX_ENFORCE_PURITY=1
READELF=aarch64-unknown-linux-gnu-readelf
doCheck=
NIX_LOG_FD=2
PKG_CONFIG_X86_64_UNKNOWN_LINUX_GNU=pkg-config
depsBuildBuild=/nix/store/hddym3bsqnnkn91kfnk5c75bsvayzi33-pkg-config-wrapper-0.29.2 /nix/store/6698sansb3nghj6wak8spmp25f2qky9l-lvm2-2.03.32-dev
TERM=xterm-256color
SIZE=aarch64-unknown-linux-gnu-size
propagatedNativeBuildInputs=
strictDeps=1
PKG_CONFIG_PATH_FOR_BUILD=/nix/store/6698sansb3nghj6wak8spmp25f2qky9l-lvm2-2.03.32-dev/lib/pkgconfig
AR=aarch64-unknown-linux-gnu-ar
AS=aarch64-unknown-linux-gnu-as
configurePhase=runHook preConfigure
runHook postConfigure

TEMP=/build
preConfigure=unset PKG_CONFIG_ALLOW_CROSS; env
SHLVL=1
NIX_BUILD_TOP=/build
NM=aarch64-unknown-linux-gnu-nm
NIX_CFLAGS_COMPILE= -frandom-seed=276mmwyb7f -isystem /nix/store/f35mrashq0mbqhh4zzf04ac16vqw0jdl-systemd-minimal-libs-aarch64-unknown-linux-gnu-257.6-dev/include -isystem /nix/store/1mrj01sfx05zh52ah4n732dygfmz2y64-lvm2-aarch64-unknown-linux-gnu-2.03.32-dev/include
patches=
PKG_CONFIG_FOR_BUILD=pkg-config
20:31:32
@quadradical:federated.nexusQuadRadical (Ping)wait theres more20:32:08
@emilazy:matrix.orgemilyuh, hm20:34:29
@emilazy:matrix.orgemily Alyssa Ross: I don't think the uppercase will work 20:34:37
@emilazy:matrix.orgemilygoing by https://docs.rs/pkg-config/latest/src/pkg_config/lib.rs.html#638-65920:34:42
@emilazy:matrix.orgemily unless TARGET and HOST are shouty 20:34:48

Show newer messages


Back to Room ListRoom Version: 6