Bug 222824 - x11/alacritty: unbreak runtime on 12.0-CURRENT
Summary: x11/alacritty: unbreak runtime on 12.0-CURRENT
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: Jan Beich
URL: https://github.com/jwilm/alacritty/is...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-10-06 11:06 UTC by Jan Beich
Modified: 2018-03-30 08:46 UTC (History)
2 users (show)

See Also:
tobik: maintainer-feedback+


Attachments
v0 (ino64 + kqueue/abstime) (8.62 KB, patch)
2017-10-06 11:06 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-10-06 11:06:51 UTC
Created attachment 186947 [details]
v0 (ino64 + kqueue/abstime)

$ RUST_BACKTRACE=1 alacritty
thread 'main' panicked at 'create mio Poll: Error { repr: Os { code: 22, message: "Invalid argument" } }', src/libcore/result.rs:860:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_new
   4: std::panicking::begin_panic_fmt
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
             at /usr/ports/lang/rust/work/rustc-1.20.0-src/src/libcore/macros.rs:41
   7: alacritty::run
             at /usr/ports/lang/rust/work/rustc-1.20.0-src/src/libcore/result.rs:762
             at ./src/event_loop.rs:186
             at src/main.rs:124
   8: alacritty::main
             at src/main.rs:45
   9: main
  10: _start
             at /usr/src/lib/csu/amd64/crt1.c:72
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2017-10-06 11:22:04 UTC
I have no way to test it at the time, but it looks fine to me.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2017-10-06 11:26:48 UTC
Comment on attachment 186947 [details]
v0 (ino64 + kqueue/abstime)

Build logs (pay attention to "Applying extra patch" lines):

  10.3 i386:  http://sprunge.us/ZdMM
  11.0 amd64: http://sprunge.us/FaiU
  12.0 i386:  http://sprunge.us/VACU
  12.0 amd64: http://sprunge.us/ZWBa

Runtime tested on both i386 and amd64 inside jail with host running drm-next kernel.
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2017-10-06 11:34:56 UTC
(In reply to Jan Beich from comment #2)
Ok, go ahead.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-10-06 11:58:30 UTC
Comment on attachment 186947 [details]
v0 (ino64 + kqueue/abstime)

Turns out only kqueue/abstime changes for mio-0.6.2 + nix-0.7.0 were required to fix the crash. Should I drop the rest for simplicity: ino64 changes for libc-0.2.23 and/or kqueue/abstime changes for mix-0.5.1 + nix-0.5.1?
Comment 5 Jan Beich freebsd_committer freebsd_triage 2017-10-06 13:03:00 UTC
Let's roll with all changes in v0 then to avoid surprising crashes in future.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-10-06 13:05:20 UTC
A commit references this bug:

Author: jbeich
Date: Fri Oct  6 13:04:57 UTC 2017
New revision: 451380
URL: https://svnweb.freebsd.org/changeset/ports/451380

Log:
  x11/alacritty: adjust for ino64 and kqueue/abstime on 12.0

  PR:		222824
  Obtained from:	lang/rust (ino64)
  Approved by:	tobik (maintainer)

Changes:
  head/x11/alacritty/Makefile
  head/x11/alacritty/files/
  head/x11/alacritty/files/extra-patch-freebsd12
Comment 7 vali gholami 2017-11-26 20:46:35 UTC
MARKED AS SPAM
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-03-30 08:28:34 UTC
A commit references this bug:

Author: jbeich
Date: Fri Mar 30 08:28:22 UTC 2018
New revision: 465950
URL: https://svnweb.freebsd.org/changeset/ports/465950

Log:
  x11/alacritty: update libc crate to 0.2.39

  alacritty >= g20180312 works fine as is on FreeBSD >= 12.0 as libc >= 0.2.38
  uses pre-ino64 syscalls (via COMPAT_FREEBSD11). To simplify maintenance, update
  libc and drop the patch, similar to what lang/rust-nightly did.

  https://github.com/rust-lang/libc/commit/969ad2b73cdc
  https://github.com/rust-lang/libc/commit/78f93220d70e

  PR:		222824

Changes:
  head/x11/alacritty/Makefile
  head/x11/alacritty/distinfo
  head/x11/alacritty/files/
Comment 9 Jan Beich freebsd_committer freebsd_triage 2018-03-30 08:46:39 UTC
comment 8 also fixed user input for alacritty >= g20180312 as mio/nix crates ended up using "struct kevent" with "freebsd11_kevent" syscall.