Re: [zstd-sys 2.0.1+zstd.1.5.2] crate failing on arm64

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Sat, 26 Nov 2022 16:14:03 UTC
Hello Jan,

"if #[cfg(all(target_os = "freebsd", target_arch = "aarch64"" seems to be
the best bet to fix build.

I'm waiting for rust package 1.65.0 lands on 131aarch64 so I be able to
test it on poudriere/qemu.

Thanks,

Jan Beich <jbeich@freebsd.org> escreveu no dia sábado, 26/11/2022 à(s)
14:56:

> Nuno Teixeira <eduardo@freebsd.org> writes:
>
> > From the log it seems [zstd-sys 2.0.1+zstd.1.5.2] crate failing.
>
> Unlikely if it shows up after "warning: build failed, waiting for other
> jobs to finish..."
> due to MAKE_JOBS_NUMBER=2 in poudriere log.
>
> >
> https://pkg-status.freebsd.org/ampere2/data/main-arm64-default/pf323e9d40f68_s41be508d31/logs/lapce-0.2.4.log
> [...]
> > [io-lifetimes 0.7.3] error[E0554]: `#![feature]` may not be used on the
> stable release channel
> > [io-lifetimes 0.7.3]  --> <anon>:1:1
> > [io-lifetimes 0.7.3]   |
> > [io-lifetimes 0.7.3] 1 | #![feature(rustc_attrs)]
> > [io-lifetimes 0.7.3]   | ^^^^^^^^^^^^^^^^^^^^^^^^
> > [io-lifetimes 0.7.3]
> > [io-lifetimes 0.7.3] error: aborting due to previous error
>
> Such errors don't abort build and also show up on amd64. If those ever
> become a problem check if adding CARGO_ENV+=RUSTC_BOOTSTRAP=1 helps.
>
> > error: unsupported platform
> >    -->
> /wrkdirs/usr/ports/editors/lapce/work/lapce-0.2.4/cargo-crates/wasmtime-runtime-1.0.2/src/traphandlers/
> unix.rs:232:13
> >     |
> > 232 |             compile_error!("unsupported platform");
> >     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > error[E0308]: mismatched types
> >    -->
> /wrkdirs/usr/ports/editors/lapce/work/lapce-0.2.4/cargo-crates/wasmtime-runtime-1.0.2/src/traphandlers/
> unix.rs:167:73
> >     |
> > 167 | unsafe fn get_pc_and_fp(cx: *mut libc::c_void, _signum:
> libc::c_int) -> (*const u8, usize) {
> >     |           -------------
>      ^^^^^^^^^^^^^^^^^^ expected tuple, found `()`
> >     |           |
> >     |           implicitly returns `()` as its body has no tail or
> `return` expression
> >     |
> >     = note:  expected tuple `(*const u8, usize)`
> >             found unit type `()`
> >
> > For more information about this error, try `rustc --explain E0308`.
> > error: could not compile `wasmtime-runtime` due to 2 previous errors
>
> Looks like
> https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/traphandlers/unix.rs
> needs something like
> https://github.com/wasmerio/wasmer/blob/dcfdea76999a/lib/vm/src/trap/traphandlers.rs#L302-L304
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)