Bug 292672 - lang/clisp: fix build with clang >= 20
Summary: lang/clisp: fix build with clang >= 20
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-01-23 10:06 UTC by Dimitry Andric
Modified: 2026-02-10 19:37 UTC (History)
0 users

See Also:


Attachments
lang/clisp: fix build with clang >= 20 (2.48 KB, patch)
2026-01-23 10:07 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2026-01-23 10:06:29 UTC
With clang 20 or higher lang/clisp fails to build, with errors similar to:

    ./lisp.run -B . -N locale -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -m 2MW -M interpreted.mem -q -c compiler.lisp -o ./
    ;; Compiling file /wrkdirs/usr/ports/lang/clisp/work/clisp-c3ec11bab87cfdbeba01523ed88ac2a16b22304d/src/compiler.lisp ...
    *** - LIST-INIT-START: start index 44801 too large for
           (#(NIL
              #S(HASH-TABLE :TEST STABLEHASH-EQ
              #:WARN-IF-NEEDS-REHASH-AFTER-GC T
                 (#<BUILT-IN-CLASS SYMBOL> .
                  #<COMPILED-FUNCTION CLOS::MAKE-INSTANCE-<EMF-1>-1>)
                 (#<STANDARD-CLASS FUNCALLABLE-STANDARD-CLASS> .
                  #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)
                 (#<STANDARD-CLASS STANDARD-CLASS> .
                  #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)))
            CLOS::COMPUTE-APPLICABLE-METHODS-EFFECTIVE-METHOD
            #<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE>)

    0 errors, 0 warnings
    *** Error code 1

The problems are caused by clisp's usage of -fwrapv, where the
developers implicitly assume this also makes pointer wrapping defined.

After https://github.com/llvm/llvm-project/commit/1295aa2e814 however,
-fwrapv no longer implies that, and you either have to add a clang
specific -fwrapv-pointer option, or use -fno-strict-overflow, which
works for both clang and gcc.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2026-01-23 10:06:29 UTC
Maintainer informed via mail
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2026-01-23 10:07:51 UTC
Created attachment 267408 [details]
lang/clisp: fix build with clang >= 20
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-10 19:29:09 UTC
A commit in branch main references this bug:

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

commit d8ec68ea76d97ff43e709b813629c862a6bf8211
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-23 09:33:18 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-10 19:28:50 +0000

    lang/clisp: fix build with clang >= 20

    With clang 20 or higher lang/clisp fails to build, with errors similar to:

        ./lisp.run -B . -N locale -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -m 2MW -M interpreted.mem -q -c compiler.lisp -o ./
        ;; Compiling file /wrkdirs/usr/ports/lang/clisp/work/clisp-c3ec11bab87cfdbeba01523ed88ac2a16b22304d/src/compiler.lisp ...
        *** - LIST-INIT-START: start index 44801 too large for
               (#(NIL
                  #S(HASH-TABLE :TEST STABLEHASH-EQ
                  #:WARN-IF-NEEDS-REHASH-AFTER-GC T
                     (#<BUILT-IN-CLASS SYMBOL> .
                      #<COMPILED-FUNCTION CLOS::MAKE-INSTANCE-<EMF-1>-1>)
                     (#<STANDARD-CLASS FUNCALLABLE-STANDARD-CLASS> .
                      #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)
                     (#<STANDARD-CLASS STANDARD-CLASS> .
                      #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)))
                CLOS::COMPUTE-APPLICABLE-METHODS-EFFECTIVE-METHOD
                #<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE>)

        0 errors, 0 warnings
        *** Error code 1

    The problems are caused by clisp's usage of -fwrapv, where the
    developers implicitly assume this also makes pointer wrapping defined.

    After https://github.com/llvm/llvm-project/commit/1295aa2e814 however,
    -fwrapv no longer implies that, and you either have to add a clang
    specific -fwrapv-pointer option, or use -fno-strict-overflow, which
    works for both clang and gcc.

    PR:             292672
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

 lang/clisp/files/patch-src__makemake.in | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-10 19:30:10 UTC
A commit in branch 2026Q1 references this bug:

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

commit c7b2e561c43524a9cf865fd776672bf19e9ea9cf
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-23 09:33:18 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-10 19:29:11 +0000

    lang/clisp: fix build with clang >= 20

    With clang 20 or higher lang/clisp fails to build, with errors similar to:

        ./lisp.run -B . -N locale -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -m 2MW -M interpreted.mem -q -c compiler.lisp -o ./
        ;; Compiling file /wrkdirs/usr/ports/lang/clisp/work/clisp-c3ec11bab87cfdbeba01523ed88ac2a16b22304d/src/compiler.lisp ...
        *** - LIST-INIT-START: start index 44801 too large for
               (#(NIL
                  #S(HASH-TABLE :TEST STABLEHASH-EQ
                  #:WARN-IF-NEEDS-REHASH-AFTER-GC T
                     (#<BUILT-IN-CLASS SYMBOL> .
                      #<COMPILED-FUNCTION CLOS::MAKE-INSTANCE-<EMF-1>-1>)
                     (#<STANDARD-CLASS FUNCALLABLE-STANDARD-CLASS> .
                      #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)
                     (#<STANDARD-CLASS STANDARD-CLASS> .
                      #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)))
                CLOS::COMPUTE-APPLICABLE-METHODS-EFFECTIVE-METHOD
                #<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE>)

        0 errors, 0 warnings
        *** Error code 1

    The problems are caused by clisp's usage of -fwrapv, where the
    developers implicitly assume this also makes pointer wrapping defined.

    After https://github.com/llvm/llvm-project/commit/1295aa2e814 however,
    -fwrapv no longer implies that, and you either have to add a clang
    specific -fwrapv-pointer option, or use -fno-strict-overflow, which
    works for both clang and gcc.

    PR:             292672
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

    (cherry picked from commit d8ec68ea76d97ff43e709b813629c862a6bf8211)

 lang/clisp/files/patch-src__makemake.in | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)