Bug 280561 - java/openjdk17: fix build with clang 19
Summary: java/openjdk17: fix build with clang 19
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-java (Nobody)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-08-01 16:09 UTC by Dimitry Andric
Modified: 2024-08-07 16:53 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
java/openjdk17: fix build with clang 19 (1.69 KB, patch)
2024-08-01 16:09 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 2024-08-01 16:09:40 UTC
java/openjdk17: fix build with clang 19

Clang 19 has a number of new warnings, and because java/openjdk17
compiles with -Werror by default, it results in errors similar to:

    /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.12-7-1/src/hotspot/os/posix/signals_posix.cpp:1681:20: error: cast from 'void (*)(int, siginfo_t *, ucontext_t *)' (aka 'void (*)(int, __siginfo *, __ucontext *)') to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
     1681 |   act.sa_handler = (void (*)(int)) SR_handler;
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

I propose to disable warnings-as-errors for this port, similar to what
is already done for openjdk8 and openjdk11. It does not make sense to
have this on by default, unless you are an upstream maintainer.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-08-01 16:09:59 UTC
Created attachment 252428 [details]
java/openjdk17: fix build with clang 19
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-08-07 16:47:26 UTC
A commit in branch main references this bug:

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

commit 4c37f9f5f253a5701fa94ddfc00520889bca9ea4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-01 16:05:22 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-07 16:44:49 +0000

    java/openjdk17: fix build with clang 19

    Clang 19 has a number of new warnings, and because java/openjdk17
    compiles with -Werror by default, it results in errors similar to:

        /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.12-7-1/src/hotspot/os/posix/signals_posix.cpp:1681:20: error: cast from 'void (*)(int, siginfo_t *, ucontext_t *)' (aka 'void (*)(int, __siginfo *, __ucontext *)') to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
         1681 |   act.sa_handler = (void (*)(int)) SR_handler;
              |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

    I propose to disable warnings-as-errors for this port, similar to what
    is already done for openjdk8 and openjdk11. It does not make sense to
    have this on by default, unless you are an upstream maintainer.

    PR:             280561
    Approved by:    glewis (maintainer)
    MFH:            2024Q3

 java/openjdk17/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-08-07 16:52:29 UTC
A commit in branch 2024Q3 references this bug:

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

commit 50cdf3908631cd59cf470624850f5f4bb5bed5a2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-01 16:05:22 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-07 16:51:46 +0000

    java/openjdk17: fix build with clang 19

    Clang 19 has a number of new warnings, and because java/openjdk17
    compiles with -Werror by default, it results in errors similar to:

        /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.12-7-1/src/hotspot/os/posix/signals_posix.cpp:1681:20: error: cast from 'void (*)(int, siginfo_t *, ucontext_t *)' (aka 'void (*)(int, __siginfo *, __ucontext *)') to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
         1681 |   act.sa_handler = (void (*)(int)) SR_handler;
              |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

    I propose to disable warnings-as-errors for this port, similar to what
    is already done for openjdk8 and openjdk11. It does not make sense to
    have this on by default, unless you are an upstream maintainer.

    PR:             280561
    Approved by:    glewis (maintainer)
    MFH:            2024Q3

    (cherry picked from commit 4c37f9f5f253a5701fa94ddfc00520889bca9ea4)

 java/openjdk17/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)