versatiles-org / versatiles-rs

VersaTiles - A toolbox for converting, checking and serving map tiles in various formats.
https://versatiles.org
MIT License
136 stars 3 forks source link

Creating the Nix package #115

Open wilhelmines opened 11 hours ago

wilhelmines commented 11 hours ago

Hey, I'm creating a package for the nix package repo and have some issues.

For practicable reasons, I chose to compile the crate instead of using the pre-built binaries. The build seems successful, I can install the local package on my system and can use the example commands like convert.

My problems are the tests that are run automatically. Here is the error message I get.

     Running unittests src/lib.rs (target/x86_64-unknown-linux-gnu/release/deps/versatiles-2d9553c647e1d0e4)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/x86_64-unknown-linux-gnu/release/deps/versatiles-97a9077fb0858e28)

running 44 tests
test tests::version ... ok
test tests::convert_subcommand ... ok
test tests::probe_subcommand ... ok
test tests::serve_subcommand ... ok
test tests::help ... ok
test tools::help::tests::test_help2 ... ok
memory allocation of 9223372036854775798 bytes failed
error: test failed, to rerun pass `--bin versatiles`

Caused by:
  process didn't exit successfully: `/build/versatiles-0.12.8.tar.gz/target/x86_64-unknown-linux-gnu/release/deps/versatiles-97a9077fb0858e28 --test-threads=12` (signal: 6, SIGABRT: process abort signal)
error: builder for '/nix/store/wndgk4i3xrrp6v8wddp5dzziwg913i9q-versatiles-0.12.8.drv' failed with exit code 101;
       last 10 log lines:
       > test tests::convert_subcommand ... ok
       > test tests::probe_subcommand ... ok
       > test tests::serve_subcommand ... ok
       > test tests::help ... ok
       > test tools::help::tests::test_help2 ... ok
       > memory allocation of 9223372036854775798 bytes failed
       > error: test failed, to rerun pass `--bin versatiles`
       >
       > Caused by:
       >   process didn't exit successfully: `/build/versatiles-0.12.8.tar.gz/target/x86_64-unknown-linux-gnu/release/deps/versatiles-97a9077fb0858e28 --test-threads=12` (signal: 6, SIGABRT: process abort signal)

A second log I get is this one.

Derive([("out","/nix/store/wfiscnm2qrsw3l6a5mzxbghzfsx87mcl-versatiles-0.12.8","","")],[("/nix/store/5z7v4k39nc80xqc3vh1piz4lqbx93lga-versatiles-0.12.8.tar.gz.drv",["out"]),("/nix/store/77pvngz232flmhpvsxwkr0b8y76wkamh-versatiles-0.12.8-vendor.tar.gz.drv",["out"]),("/nix/store/d4xqlxgkq99jfql5l8sybrh3jnn2zvj6-cargo-install-hook.sh.drv",["out"]),("/nix/store/diappn3n1z5acaqnk6kw0mj53pzwbw47-stdenv-linux.drv",["out"]),("/nix/store/hrb2k9y27lsy7x0w2cms1cd3vb0z16bz-rustc-wrapper-1.81.0.drv",["out"]),("/nix/store/k2390c0gza3gsiwdmsf2papzjd7pjxm9-auditable-cargo-1.81.0.drv",["out"]),("/nix/store/lnamq8bbafa0yzaf6awphri6s5pszcvk-cargo-setup-hook.sh.drv",["out"]),("/nix/store/nkj6x4ajnxz1w80mhi7sspjpkvgp3bpk-bash-5.2p32.drv",["out"]),("/nix/store/s2iqvpn78n255xlkz92138wqqhydvvy7-cargo-build-hook.sh.drv",["out"]),("/nix/store/xw8fmrxxbnqq1v0xwmjnfmvkf0c4h3xb-cargo-check-hook.sh.drv",["out"])],["/nix/store/nk6b2ckznjic5wj8ddw0wgdrn4mbz3lg-patch-registry-deps","/nix/store/v6x3cs394jgqfbi0a42pam708flxaphh-default-builder.sh"],"x86_64-linux","/nix/store/717iy55ncqs0wmhdkwc5fg2vci5wbmq8-bash-5.2p32/bin/bash",["-e","/nix/store/v6x3cs394jgqfbi0a42pam708flxaphh-default-builder.sh"],[("PKG_CONFIG_ALLOW_CROSS","0"),("__structuredAttrs",""),("buildInputs",""),("builder","/nix/store/717iy55ncqs0wmhdkwc5fg2vci5wbmq8-bash-5.2p32/bin/bash"),("cargoBuildFeatures",""),("cargoBuildNoDefaultFeatures",""),("cargoBuildType","release"),("cargoCheckFeatures",""),("cargoCheckNoDefaultFeatures",""),("cargoCheckType","release"),("cargoDeps","/nix/store/gwwbla3ldbyg3vapd2p42ai4vdrv4shj-versatiles-0.12.8-vendor.tar.gz"),("cargoHash","sha256-KH7pgS9KqHzTWdW0EC8Xf73Rlw1TihE/NRjSrl5l+qs="),("checkFlags",""),("cmakeFlags",""),("configureFlags",""),("configurePhase","runHook preConfigure\nrunHook postConfigure\n"),("depsBuildBuild",""),("depsBuildBuildPropagated",""),("depsBuildTarget",""),("depsBuildTargetPropagated",""),("depsHostHost",""),("depsHostHostPropagated",""),("depsTargetTarget",""),("depsTargetTargetPropagated",""),("doCheck","1"),("doInstallCheck",""),("mesonFlags",""),("name","versatiles-0.12.8"),("nativeBuildInputs","/nix/store/nkly9ryl33j1038lsv7gc9mp92wvwh2b-auditable-cargo-1.81.0 /nix/store/wq6pchscpv8dvl87la9mmml4a0rbbfba-cargo-build-hook.sh /nix/store/6b7mhw8m9yiqafc0yh36lry45j70mjfh-cargo-check-hook.sh /nix/store/s57n3fcgl7ddwvjv2wy9c86nx5haxkmk-cargo-install-hook.sh /nix/store/xyk9lscawjfn4a0cz052xc8f0x52d0cr-cargo-setup-hook.sh /nix/store/csadsvzmnzvb952kjky9ziinky5q8abr-rustc-wrapper-1.81.0"),("out","/nix/store/wfiscnm2qrsw3l6a5mzxbghzfsx87mcl-versatiles-0.12.8"),("outputs","out"),("patchRegistryDeps","/nix/store/nk6b2ckznjic5wj8ddw0wgdrn4mbz3lg-patch-registry-deps"),("patches",""),("pname","versatiles"),("postUnpack","eval \"$cargoDepsHook\"\n\nexport RUST_LOG=\n"),("propagatedBuildInputs",""),("propagatedNativeBuildInputs",""),("src","/nix/store/yya23p90h06ih17p32p331cfsq46xs9m-versatiles-0.12.8.tar.gz"),("stdenv","/nix/store/ncv68hjnidcd2bm5abkhklrijhn0cgn6-stdenv-linux"),("strictDeps","1"),("system","x86_64-linux"),("version","0.12.8")])

I deactivated testing to get my current working installation, but this wouldn't be a nice solution. Maybe you, as the developer, have an idea where this issue could come from. I'm not a rust developer and this is my first nixpackage as well. I wouldn't be surprised if the problem is on my side.

MichaelKreil commented 9 hours ago

Hi, First of all, nix package? Hurray! Thank you so much! This has been on my todo list for a very long time.

The problem with the error message is that it occurs in a group of tests that do not test code in individual modules or functions, but run the compiled application itself (example).

So if one of those tests in that group fails, it is almost impossible to debug. But maybe the same error happens in one of the other tests. So my first step would be to force cargo to run each test individually, and to continue testing even if one fails: cargo test -v --workspace --jobs 1 --no-fail-fast.

If you could provide the log, it might help us to locate the problem. If for some reason the log is too long, you can also email it to: mailšŸŒ€versatiles.org