Bug 267917 - java/openjdk19: compile error: 'warning' attribute does not appear on the first declaration
Summary: java/openjdk19: compile error: 'warning' attribute does not appear on the fir...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-java (Nobody)
URL: https://www.freshports.org/java/openj...
Keywords:
: 268602 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-22 05:19 UTC by O. Hartmann
Modified: 2024-01-26 22:28 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2022-11-22 05:19:31 UTC
Port fails to build in a poudriere jail running 13-STABLE:
[...]

=>> Building java/openjdk19
build started at Tue Nov 22 05:11:55 UTC 2022
port directory: /usr/ports/java/openjdk19
package name: openjdk19-19.0.1+10.1
building for: FreeBSD poudriere 13.1-STABLE FreeBSD 13.1-STABLE 1301509 amd64
maintained by: java@FreeBSD.org
Makefile datestamp: -rw-r--r--  1 root  wheel  5797 Oct 31 06:28 /usr/ports/java/openjdk19/Makefile
Ports top last git commit: 53c396443a88
Ports top unclean checkout: no
Port dir last git commit: 4f48011386bb
Port dir unclean checkout: no
Poudriere version: poudriere-git-3.3.99.20220831
Host OSVERSION: 1400073
Jail OSVERSION: 1301509
Job Id: 02

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1301509
UNAME_v=FreeBSD 13.1-STABLE 1301509
UNAME_r=13.1-STABLE
BLOCKSIZE=K
MAIL=/var/mail/root
MM_CHARSET=UTF-8
LANG=C.UTF-8
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
POUDRIERE_NAME=poudriere-git
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.99.20220831
MAKEOBJDIRPREFIX=/pool/sources/13-STABLE/obj/
MASTERMNT=/pool/poudriere/data/.m/13-amd64-head-default/ref
LC_COLLATE=C
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
OUTPUT_REDIRECTED_STDERR=4
OUTPUT_REDIRECTED=1
PWD=/pool/poudriere/data/.m/13-amd64-head-default/02/.p
OUTPUT_REDIRECTED_STDOUT=3
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=13-amd64-head-default
SCRIPTPREFIX=/usr/local/share/poudriere
SCRIPTNAME=bulk.sh
OLDPWD=/pool/poudriere/data/.m/13-amd64-head-default/ref/.p/pool
POUDRIERE_PKGNAME=poudriere-git-3.3.99.20220831
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=
DEPENDS_ARGS=
MAKE_ARGS=
---End Poudriere Port Flags/Env---


[...]
c++: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
c++: warning: argument unused during compilation: '-static-libgcc' [-Wunused-command-line-argument]
gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/make/hotspot'
gmake[4]: Entering directory '/wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/make/hotspot'
Creating support/modules_libs/java.base/server/libjvm.so from 1007 file(s)
In file included from /wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/src/hotspot/share/precompiled/precompiled.hpp:34:
In file included from /wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/src/hotspot/share/classfile/classLoaderData.hpp:28:
In file included from /wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/src/hotspot/share/memory/allocation.hpp:29:
/wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/src/hotspot/share/utilities/globalDefinitions.hpp:165:1: error: 'warning' attribute does not appear on the first declaration
FORBID_C_FUNCTION(void exit(int), "use os::exit");
^
/wrkdirs/usr/ports/java/openjdk19/work/jdk19u-jdk-19.0.1-10-1/src/hotspot/share/utilities/compilerWarnings_gcc.hpp:85:29: note: expanded from macro 'FORBID_C_FUNCTION'
  extern "C" __attribute__((__warning__(alternative))) signature;
                            ^
/usr/include/stdlib.h:101:17: note: previous declaration is here
_Noreturn void   exit(int);
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2024-01-26 17:17:46 UTC
Does the issue still exist? I cannot reproduce on 13-STABLE (13.3-PRERELEASE).
Comment 2 Michael Osipov freebsd_committer freebsd_triage 2024-01-26 22:28:22 UTC
*** Bug 268602 has been marked as a duplicate of this bug. ***