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

[Bug] various arches fail compilation #42

Open
werdahias opened this issue Jan 17, 2023 · 1 comment · May be fixed by #46
Open

[Bug] various arches fail compilation #42

werdahias opened this issue Jan 17, 2023 · 1 comment · May be fixed by #46
Labels
help wanted Extra attention is needed

Comments

@werdahias
Copy link

Hi,
I packaged your crates for debian. It builds fine, but only for a few arches:
arm64 (aarch64), amd64 (x86-64), mips64el, ppc64el and s390x.

i386 (x86), armel, armhf and mipsel all fail to build:


Compiling effective-limits v0.5.5 (/<<PKGBUILDDIR>>)
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=effective_limits CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <robertc@robertcollins.net>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name effective_limits --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=263c2e754137088a -C extra-filename=-263c2e754137088a --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rmeta --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rmeta --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rmeta --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rmeta -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=effective_limits CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <robertc@robertcollins.net>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name effective_limits --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test -C metadata=dc26cd84d2421c51 -C extra-filename=-dc26cd84d2421c51 --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_BIN_NAME=test-limited CARGO_CRATE_NAME=test_limited CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <robertc@robertcollins.net>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name test_limited --edition=2018 src/bin/test-limited.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test -C metadata=3cf1f99cb441efbf -C extra-filename=-3cf1f99cb441efbf --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern effective_limits=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libeffective_limits-263c2e754137088a.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=memory CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_AUTHORS='Robert Collins <robertc@robertcollins.net>' CARGO_PKG_DESCRIPTION='Estimate effective resource limits for a process e.g. how much RAM is available for use.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=effective-limits CARGO_PKG_REPOSITORY='https://github.com/rbtcollins/effective-limits.rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-name memory --edition=2018 examples/memory.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d9404f750f7f7978 -C extra-filename=-d9404f750f7f7978 --out-dir /<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/examples --target armv5te-unknown-linux-gnueabi -C incremental=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern cfg_if=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libcfg_if-8c4955b915cf7a00.rlib --extern effective_limits=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libeffective_limits-263c2e754137088a.rlib --extern libc=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/liblibc-b5f738817e952bc8.rlib --extern sys_info=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libsys_info-00d91cb13fc01bb9.rlib --extern thiserror=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/deps/libthiserror-0666c8194ad7abc4.rlib -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabi-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/effective-limits-0.5.5 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry -L native=/<<PKGBUILDDIR>>/target/armv5te-unknown-linux-gnueabi/debug/build/sys-info-99a6b51ff8ec64b0/out`
error[E0308]: mismatched types
   --> src/lib.rs:380:43
    |
380 | ...                   rlim_cur: ulimit,
    |                                 ^^^^^^ expected `u32`, found `u64`

For more information about this error, try `rustc --explain E0308`.

This looks like an arch-related bug to me.

@rbtcollins
Copy link
Owner

Yep, sadly this is interfacing to C and I couldn't find an intermediate layer crate that abstracted over the various calls needed. As I don't have arm/mips, if you wanted to put a patch forward I'd be happy to merge it.

@rbtcollins rbtcollins added the help wanted Extra attention is needed label Mar 12, 2023
@decathorpe decathorpe linked a pull request Nov 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants