Skip to content

Build broken for i386 architectures #4400

@rosorio

Description

@rosorio

What is the current bug behavior?

Build for i386 architecture fail with the following message:

Running `CARGO=/usr/local/bin/cargo CARGO_CRATE_NAME=regex CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/www/hurl/work/hurl-7.0.0/cargo-crates/regex-1.11.2 CARGO_MANIFEST_PATH=/
wrkdirs/usr/ports/www/hurl/work/hurl-7.0.0/cargo-crates/regex-1.11.2/Cargo.toml CARGO_PKG_AUTHORS='The Rust Project Developers:Andrew Gallant <jamslam@gmail.com>' CARGO_PKG_D
ESCRIPTION='An implementation of regular expressions for Rust. This implementation uses
finite automata and guarantees linear time matching on all inputs.
' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang/regex' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=regex CARGO_PKG_README=README.md CARG
O_PKG_REPOSITORY='https://github.com/rust-lang/regex' CARGO_PKG_RUST_VERSION=1.65 CARGO_PKG_VERSION=1.11.2 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=11 CARGO_PKG_VERS
ION_PATCH=2 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/wrkdirs/usr/ports/www/hurl/work/target/release/deps /usr/local/bin/rustc --crate-name regex --edition=2021 /wrkdirs/usr/
ports/www/hurl/work/hurl-7.0.0/cargo-crates/regex-1.11.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-
info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="perf"' --cfg 'feature="perf-backtrack"' --c
fg 'feature="perf-cache"' --cfg 'feature="perf-dfa"' --cfg 'feature="perf-inline"' --cfg 'feature="perf-literal"' --cfg 'feature="perf-onepass"' --cfg 'feature="std"' --cfg '
feature="unicode"' --cfg 'feature="unicode-age"' --cfg 'feature="unicode-bool"' --cfg 'feature="unicode-case"' --cfg 'feature="unicode-gencat"' --cfg 'feature="unicode-perl"'
--cfg 'feature="unicode-script"' --cfg 'feature="unicode-segment"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "logging", "pattern", "perf", "
perf-backtrack", "perf-cache", "perf-dfa", "perf-dfa-full", "perf-inline", "perf-literal", "perf-onepass", "std", "unicode", "unicode-age", "unicode-bool", "unicode-case", "u
nicode-gencat", "unicode-perl", "unicode-script", "unicode-segment", "unstable", "use_std"))' -C metadata=2b37982fa6ff4157 -C extra-filename=-289f1f881373c578 --out-dir /wrkd
irs/usr/ports/www/hurl/work/target/release/deps -C strip=symbols -L dependency=/wrkdirs/usr/ports/www/hurl/work/target/release/deps --extern aho_corasick=/wrkdirs/usr/ports/w
ww/hurl/work/target/release/deps/libaho_corasick-7c9f573abe504af4.rmeta --extern memchr=/wrkdirs/usr/ports/www/hurl/work/target/release/deps/libmemchr-7873b88471f2b3f0.rmeta
--extern regex_automata=/wrkdirs/usr/ports/www/hurl/work/target/release/deps/libregex_automata-f34203b9a2957235.rmeta --extern regex_syntax=/wrkdirs/usr/ports/www/hurl/work/t
arget/release/deps/libregex_syntax-a5874ef35ee43d1a.rmeta --cap-lints warn -C ar=ar -C linker=/usr/local/llvm19/bin/clang`
error[E0080]: attempt to compute `16_usize - 20_usize`, which would overflow
  --> /wrkdirs/usr/ports/www/hurl/work/target/release/build/libxml-808547634d8bc94c/out/bindings.rs:417:29
   |
417 |   ["Size of __max_align_t"][::std::mem::size_of::<__max_align_t>() - 20usize];
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `bindings::_` failed here

For more information about this error, try `rustc --explain E0080`.
warning: `libxml` (lib) generated 1 warning (1 duplicate)
error: could not compile `libxml` (lib) due to 1 previous error; 1 warning emitted

No issue reported for other architectures (arm64, aarch64, armv6, armv7, powerpc)

Steps to reproduce

The issue occurs for all versions of FreeBSD (14.3, 15) on i386 architecture.

Execution context

FreeBSD 1403i386-head 14.3-RELEASE-p2 FreeBSD 14.3-RELEASE-p2 i386

  • Hurl Version (hurl --version): 7.0.0

The build environment includes

  • brotli-1.1.0,1
  • ccache-3.7.12_8
  • curl-8.15.0
  • gettext-runtime-0.23.1
  • indexinfo-0.3.1_1
  • libedit-3.1.20250104,1
  • libffi-3.5.1
  • libidn2-2.3.8
  • liblz4-1.10.0,1
  • libnghttp2-1.67.0
  • libpsl-0.21.5_2
  • libssh2-1.11.1,3
  • libunistring-1.3
  • libxml2-2.14.5
  • llvm19-19.1.7_1
  • lua53-5.3.6_1
  • mpdecimal-4.0.1
  • perl5-5.42.0_1
  • pkg-2.3.1
  • pkgconf-2.4.3,1
  • python311-3.11.13_1
  • readline-8.2.13_2
  • rust-1.89.0
  • zstd-1.5.7

Possible fixes

I try to move rust-libxml2 from 0.3.6 to 0.3.7, but without success

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions