Bug 268929 - editors/lapce: Fix aarch64 build
Summary: editors/lapce: Fix aarch64 build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-13 14:08 UTC by Nuno Teixeira
Modified: 2023-01-15 13:52 UTC (History)
1 user (show)

See Also:


Attachments
fix wasmtime-runtime-1.0.2 crate (1.43 KB, patch)
2023-01-13 14:08 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Teixeira freebsd_committer freebsd_triage 2023-01-13 14:08:30 UTC
Created attachment 239443 [details]
fix wasmtime-runtime-1.0.2 crate

- Fix aarch64 build: wasmtime-runtime-1.0.2 crate

https://github.com/bytecodealliance/wasmtime/issues/5499
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-01-14 14:11:34 UTC
Build fails on armv7 FreeBSD 13.1:

error[E0308]: mismatched types                                   
   --> /wrkdirs/usr/ports/editors/lapce/work/lapce-0.2.5/cargo-crates/rustix-0.35.10/src/backend/libc/net/syscalls.rs:565:21
    |                                                            
565 |                     tv_sec,                       
    |                     ^^^^^^ expected `i64`, found `i32`
    |                                                                                                                              help: you can convert an `i32` to an `i64`      
    |                                                            
565 |                     tv_sec: tv_sec.into(),    
    |                     +++++++       +++++++     
                                                                 
[num-traits 0.2.15] cargo:rustc-cfg=has_leading_trailing_ones
[num-traits 0.2.15] cargo:rustc-cfg=has_int_assignop_ref
For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustix` due to previous error

This is due to time_t not being a long on armv7.

Build succeeds on arm64 FreeBSD 13.1.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-15 13:44:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75a1d429216aa977d1bf6b1f4a9c5eb4eb474ac8

commit 75a1d429216aa977d1bf6b1f4a9c5eb4eb474ac8
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-01-15 13:40:21 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-01-15 13:40:21 +0000

    editors/lapce: Fix aarch64 build

    - Fix aarch64 build: wasmtime-runtime-1.0.2 crate
      See: https://github.com/bytecodealliance/wasmtime/issues/5499

    PR:             268929
    Tested by:      Robert Clausecker <fuz@fuz.su>

 editors/lapce/Makefile                                    |  2 +-
 ..._wasmtime-runtime-1.0.2_src_traphandlers_unix.rs (new) | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2023-01-15 13:52:07 UTC
(In reply to Robert Clausecker from comment #1)

Hello Robert,

Thanks for testing.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2023-01-15 13:52:28 UTC
Committed.