-
Notifications
You must be signed in to change notification settings - Fork 161
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
build failure on i686 #1181
Comments
sunfishcode
pushed a commit
that referenced
this issue
Oct 13, 2024
Given that this function has no generics, it could easily use `global_asm!` instead. This is a backport of #722, except without the part that removes outline asm for x86, as that's still needed on the 0.37 branch. It fixes compilation errors on the 0.37 when compiled with the latest nightly, due to `asm!` in `#[naked]` functions needed to be change to `naked_asm!`. Fixes #1181.
sunfishcode
added a commit
that referenced
this issue
Oct 18, 2024
* Remove naked_functions feature usage for x86 (#722) Given that this function has no generics, it could easily use `global_asm!` instead. This is a backport of #722, except without the part that removes outline asm for x86, as that's still needed on the 0.37 branch. It fixes compilation errors on the 0.37 when compiled with the latest nightly, due to `asm!` in `#[naked]` functions needed to be change to `naked_asm!`. Fixes #1181. * Disable some tests and rebuilding of the archive files to fix building the 0.37 branch on current CI systems. * Update Cirrus CI on the 0.37 branch Remove freebsd-12, as it is no longer supported. And, update freebsd-13 to freebsd-13-3. * Don't assume that `target_env = "gnu"` implies Linux. * Fix the cc crate to 1.0.68 for Rust 1.48 compat. * Update CI to macos-12, actions/checkout@v4, node20. --------- Co-authored-by: Gary Guo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rustix building on i686 failed:
Running
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name rustix --edition=2021 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.37/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 --warn=unexpected_cfgs --check-cfg 'cfg(alloc_c_string)' --check-cfg 'cfg(alloc_ffi)' --check-cfg 'cfg(apple)' --check-cfg 'cfg(asm_experimental_arch)' --check-cfg 'cfg(bsd)' --check-cfg 'cfg(core_c_str)' --check-cfg 'cfg(core_ffi_c)' --check-cfg 'cfg(core_intrinsics)' --check-cfg 'cfg(criterion)' --check-cfg 'cfg(document_experimental_runtime_api)' --check-cfg 'cfg(fix_y2038)' --check-cfg 'cfg(freebsdlike)' --check-cfg 'cfg(libc)' --check-cfg 'cfg(linux_kernel)' --check-cfg 'cfg(linux_like)' --check-cfg 'cfg(linux_raw)' --check-cfg 'cfg(netbsdlike)' --check-cfg 'cfg(rustc_attrs)' --check-cfg 'cfg(solarish)' --check-cfg 'cfg(staged_api)' --check-cfg 'cfg(static_assertions)' --check-cfg 'cfg(thumb_mode)' --check-cfg 'cfg(wasi)' --check-cfg 'cfg(wasi_ext)' --check-cfg 'cfg(target_arch, values("xtensa"))' --cfg 'feature="alloc"' --cfg 'feature="fs"' --cfg 'feature="libc-extra-traits"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("all-apis", "alloc", "cc", "compiler_builtins", "core", "default", "event", "fs", "io_uring", "itoa", "libc", "libc-extra-traits", "libc_errno", "linux_4_11", "linux_latest", "mm", "mount", "net", "once_cell", "param", "pipe", "process", "procfs", "pty", "rand", "runtime", "rustc-dep-of-std", "rustc-std-workspace-alloc", "shm", "std", "stdio", "system", "termios", "thread", "time", "try_close", "use-explicitly-provided-auxv", "use-libc", "use-libc-auxv"))' -C metadata=9b2fbe7903156ece -C extra-filename=-9b2fbe7903156ece --out-dir /home/runner/work/libublk-rs/libublk-rs/target/debug/deps -L dependency=/home/runner/work/libublk-rs/libublk-rs/target/debug/deps --extern bitflags=/home/runner/work/libublk-rs/libublk-rs/target/debug/deps/libbitflags-2a54fc7d8f815a15.rmeta --extern linux_raw_sys=/home/runner/work/libublk-rs/libublk-rs/target/debug/deps/liblinux_raw_sys-b77fbec2cd3ef233.rmeta --cap-lints allow --cfg static_assertions --cfg linux_raw --cfg linux_like --cfg linux_kernel
Running
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name rustix --edition=2018 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.37.27/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 --cfg 'feature="fs"' --cfg 'feature="io-lifetimes"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("all-apis", "all-impls", "alloc", "cc", "compiler_builtins", "core", "default", "fs", "fs-err", "io-lifetimes", "io_uring", "itoa", "libc", "libc_errno", "linux_4_11", "linux_latest", "mm", "net", "once_cell", "os_pipe", "param", "process", "procfs", "pty", "rand", "runtime", "rustc-dep-of-std", "std", "termios", "thread", "time", "use-libc", "use-libc-auxv"))' -C metadata=e088a2761abc7c6e -C extra-filename=-e088a2761abc7c6e --out-dir /home/runner/work/libublk-rs/libublk-rs/target/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -L dependency=/home/runner/work/libublk-rs/libublk-rs/target/i686-unknown-linux-gnu/debug/deps -L dependency=/home/runner/work/libublk-rs/libublk-rs/target/debug/deps --extern bitflags=/home/runner/work/libublk-rs/libublk-rs/target/i686-unknown-linux-gnu/debug/deps/libbitflags-c2726dea9205a036.rmeta --extern io_lifetimes=/home/runner/work/libublk-rs/libublk-rs/target/i686-unknown-linux-gnu/debug/deps/libio_lifetimes-c5fbefa3f481abb4.rmeta --extern linux_raw_sys=/home/runner/work/libublk-rs/libublk-rs/target/i686-unknown-linux-gnu/debug/deps/liblinux_raw_sys-47fbf4ab65ba5657.rmeta --cap-lints allow --cfg rustc_attrs --cfg linux_raw --cfg core_intrinsics --cfg asm --cfg naked_functions --cfg linux_like --cfg linux_kernel
error[E0787]: the
asm!
macro is not allowed in naked functions--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.37.27/src/backend/linux_raw/vdso_wrappers.rs:302:5
|
302 | asm!("int $$0x80", "ret", options(noreturn))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider using the
naked_asm!
macro insteadThe text was updated successfully, but these errors were encountered: