Bug 271711

Summary: lang/sbcl: fix build with clang 16
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Kirill Ponomarev <krion>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (krion)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 271047    
Attachments:
Description Flags
lang/sbcl: fix build with clang 16
none
Patch src/runtime/bsd-os.c, drop this file in lang/sbcl/files none

Description Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 17:52:12 UTC
Clang 16 has a new error about incompatible function types, which shows
up when building lang/sbcl:

  bsd-os.c:285:50: error: incompatible function pointer types passing '__siginfohandler_t *' (aka 'void (*)(int, struct __siginfo *, void *)') to parameter of type 'interrupt_handler_t' (aka 'void (*)(int, struct __siginfo *, struct __ucontext *)') [-Wincompati
                                                   (__siginfohandler_t *)
                                                   ^~~~~~~~~~~~~~~~~~~~~~
  ./interrupt.h:123:64: note: passing argument to parameter 'handler' here
  extern void ll_install_handler(int signal, interrupt_handler_t handler);
                                                                 ^

Indeed the __siginfohandler_t type is incompatible, but that is caused
by the cast itself, which does not seem to be good for anything. Remove
it, so the mismatch is gone.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-29 17:52:36 UTC
Created attachment 242482 [details]
lang/sbcl: fix build with clang 16
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-05-30 10:44:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=73f4bcea212048376185a1a6e2a37a1cad6d46da

commit 73f4bcea212048376185a1a6e2a37a1cad6d46da
Author:     Kirill Ponomarev <krion@FreeBSD.org>
AuthorDate: 2023-05-30 10:42:50 +0000
Commit:     Kirill Ponomarev <krion@FreeBSD.org>
CommitDate: 2023-05-30 10:42:50 +0000

    lang/sbcl: Fix build with clang 16

    PR:             271711
    Reported by:    dim

 lang/sbcl/files/patch-src_runtime_bsd-os.c (new) | 42 ++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2023-06-20 19:39:35 UTC
Created attachment 242896 [details]
Patch src/runtime/bsd-os.c, drop this file in lang/sbcl/files

The patch was intended to be applied with "git apply" at the top of the ports tree, but it apparently went wrong, and this causes the problem to actually not be patched. :)

I've attached just the patch-src_runtime_bsd-os.c file, which can be dropped verbatim in /usr/ports/lang/sbcl/files, overwriting the existing copy. Then the correct fix should be in there.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2023-06-20 19:40:06 UTC
Bugzilla forces me to put a comment here. Reopening.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-06-22 11:47:23 UTC
A commit in branch main references this bug:

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

commit ff90cfd475b6d26d90965e6a5bce0c86204c7e88
Author:     Kirill Ponomarev <krion@FreeBSD.org>
AuthorDate: 2023-06-22 11:45:46 +0000
Commit:     Kirill Ponomarev <krion@FreeBSD.org>
CommitDate: 2023-06-22 11:45:46 +0000

    lang/sbcl: Fix build with clang 16

    PR:             271711
    Reported by:    dim

 lang/sbcl/files/patch-src_runtime_bsd-os.c | 57 ++++++++----------------------
 1 file changed, 15 insertions(+), 42 deletions(-)