Bug 281991 - java/openjdk8: build broken on armv7
Summary: java/openjdk8: build broken on armv7
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: Ronald Klop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-10 15:20 UTC by Ronald Klop
Modified: 2024-10-11 12:11 UTC (History)
1 user (show)

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


Attachments
git diff fixing the build (2.03 KB, text/plain)
2024-10-10 15:20 UTC, Ronald Klop
ronald: maintainer-approval? (java)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Klop freebsd_committer freebsd_triage 2024-10-10 15:20:36 UTC
Created attachment 254139 [details]
git diff fixing the build

See https://pkg-status.freebsd.org/ampere2/data/main-armv7-default/p4a16d2e85dd9_sb7cbf741d/logs/openjdk8-8.422.05.1_1.log

In file included from /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/os/bsd/vm/os_perf_bsd.cpp:61:
In file included from /usr/include/sys/user.h:51:
In file included from /usr/include/vm/pmap.h:88:
In file included from /usr/include/machine/pmap.h:48:
In file included from /usr/include/sys/systm.h:46:
/usr/include/machine/cpufunc.h:184:1: error: static declaration of 'breakpoint' follows non-static declaration
  184 | breakpoint(void)
      | ^
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:224:17: note: previous declaration is here
  224 | extern "C" void breakpoint();
      |                 ^

Attachment 254105 [details] "v1" in bug #255662 contains a fix for the same error.
Comment 1 Ronald Klop freebsd_committer freebsd_triage 2024-10-10 15:29:56 UTC
I can confirm it works in a armv7 chroot on an aarch64 rpi4.

root@rpi4:/ # /usr/local/openjdk8/bin/java  -XshowSettings -version 2>&1 | grep os
    os.arch = arm
    os.name = FreeBSD
    os.version = 15.0-CURRENT
    sun.os.patch.level = unknown
root@rpi4:/ # /usr/local/openjdk8/bin/java -version 
openjdk version "1.8.0_422"
OpenJDK Runtime Environment (build 1.8.0_422-b05)
OpenJDK Zero VM (build 25.422-b05, interpreted mode)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-10-11 11:56:05 UTC
A commit in branch main references this bug:

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

commit e13c81137266603a6a0700810b6bad419f9d98c8
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-10-10 15:12:51 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-10-11 11:55:05 +0000

    java/openjdk8: fix build on 32 bit arm

    Fixes:
    In file included from /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/os/bsd/vm/os_perf_bsd.cpp:61:
    In file included from /usr/include/sys/user.h:51:
    In file included from /usr/include/vm/pmap.h:88:
    In file included from /usr/include/machine/pmap.h:48:
    In file included from /usr/include/sys/systm.h:46:
    /usr/include/machine/cpufunc.h:184:1: error: static declaration of 'breakpoint' follows non-static declaration
      184 | breakpoint(void)
          | ^
    /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:224:17: note: previous declaration is here
      224 | extern "C" void breakpoint();
          |                 ^

    - bumped portrevision to easily spot if future bug reports are about this change.

    PR:     281991
    Approved by:    early maintainer timeout java@ (the build is broken and the patch does not affect other architectures)
    Obtained from:  Mikael Urankar <mikael@> via Attachment 254105 [details] in bug #255662

 java/openjdk8/Makefile                                    |  2 +-
 .../patch-hotspot_src_os_bsd_vm_os__perf__bsd.cpp (new)   | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)