From owner-freebsd-ports@freebsd.org Sat Oct 10 22:57:46 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9385942C707 for ; Sat, 10 Oct 2020 22:57:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C80hV3LCpz4MqS; Sat, 10 Oct 2020 22:57:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 296F91AC87; Sat, 10 Oct 2020 22:57:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::ec6b:716d:f188:b5ba] (unknown [IPv6:2001:470:7a58:0:ec6b:716d:f188:b5ba]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A3734687F6; Sun, 11 Oct 2020 00:57:43 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_7705E767-B350-4343-A023-A5C632A30F61"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: OpenJDK ports and 13-CURRENT Date: Sun, 11 Oct 2020 00:57:33 +0200 In-Reply-To: <20201010194926.jnypzmbpu33wilbl@mutt-hbsd> Cc: FreeBSD Ports To: Shawn Webb References: <20201010190337.qtvivmpmzw4gtk3h@mutt-hbsd> <4ADAFC01-2148-48BE-AAE8-5E6A269C14CE@FreeBSD.org> <20201010192334.auepsizn3w57soes@mutt-hbsd> <8DD818E8-2569-4E2F-8BAD-143F8AE7FAE5@FreeBSD.org> <20201010194926.jnypzmbpu33wilbl@mutt-hbsd> X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 22:57:46 -0000 --Apple-Mail=_7705E767-B350-4343-A023-A5C632A30F61 Content-Type: multipart/mixed; boundary="Apple-Mail=_242A9757-EFC8-4313-85A5-F37E933B7DEC" --Apple-Mail=_242A9757-EFC8-4313-85A5-F37E933B7DEC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 10 Oct 2020, at 21:49, Shawn Webb wrote: >=20 > On Sat, Oct 10, 2020 at 09:45:58PM +0200, Dimitry Andric wrote: >> On 10 Oct 2020, at 21:23, Shawn Webb = wrote: ... >>> Log of the HardenedBSD 13-CURRENT/amd64 package >>> = build:http://ci-03.md.hardenedbsd.org/data/hardenedbsd-13_amd64-local/2020= -10-09_14h46m02s/logs/errors/openjdk12-12.0.2+10.4_1.log ... >> Ah, that is -fno-common fallout, strange that there is no build = breakage >> reported in the FreeBSD ports build cluster? Ok, the -fno-common problems were already fixed by upstream in: https://hg.openjdk.java.net/jdk/jdk/rev/6925fca95959 https://hg.openjdk.java.net/jdk/jdk/rev/9e54ea7d9cd9 but these apparently weren't ported back to openjdk 12. The port also needed a fix for the awt wrapper for XSynchronize using the wrong return type, e.g. it should use jlong instead of jint. This should be upstreamed to the OpenJDK folks, as it is really a bug in the JDK itself. Can you try the attached patch? I haven't yet looked at openjdk 13 and up, but I assume they will need at least the XSynchronize fix, and maybe the above ones, if the upstream branches were made after 2020-02-05. -Dimitry --Apple-Mail=_242A9757-EFC8-4313-85A5-F37E933B7DEC Content-Disposition: attachment; filename=java__openjdk12-fix-clang11-build-1.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="java__openjdk12-fix-clang11-build-1.diff" Content-Transfer-Encoding: 7bit Index: java/openjdk12/files/patch-changeset-57932 =================================================================== --- java/openjdk12/files/patch-changeset-57932 (nonexistent) +++ java/openjdk12/files/patch-changeset-57932 (working copy) @@ -0,0 +1,44 @@ +changeset: 57932:9e54ea7d9cd9 +user: qpzhang +date: Wed Feb 05 20:31:09 2020 +0800 +summary: 8238388: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10 + +diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.c +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 10:45:39 2020 +0100 ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 20:31:09 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,9 @@ + #include + #include "NativeFunc.h" + ++/* global GSS function table */ ++GSS_FUNCTION_TABLE_PTR ftab; ++ + /* standard GSS method names (ordering is from mapfile) */ + static const char RELEASE_NAME[] = "gss_release_name"; + static const char IMPORT_NAME[] = "gss_import_name"; +diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.h +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 10:45:39 2020 +0100 ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 20:31:09 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -277,6 +277,6 @@ + typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR; + + /* global GSS function table */ +-GSS_FUNCTION_TABLE_PTR ftab; ++extern GSS_FUNCTION_TABLE_PTR ftab; + + #endif + Property changes on: java/openjdk12/files/patch-changeset-57932 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: java/openjdk12/files/patch-changeset-57994 =================================================================== --- java/openjdk12/files/patch-changeset-57994 (nonexistent) +++ java/openjdk12/files/patch-changeset-57994 (working copy) @@ -0,0 +1,43 @@ +changeset: 57994:6925fca95959 +user: qpzhang +date: Tue Feb 04 21:27:10 2020 +0800 +summary: 8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 + +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c +--- src/java.base/unix/native/libjava/childproc.c Tue Feb 11 11:17:37 2020 +0800 ++++ src/java.base/unix/native/libjava/childproc.c Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -34,6 +34,7 @@ + + #include "childproc.h" + ++const char * const *parentPathv; + + ssize_t + restartableWrite(int fd, const void *buf, size_t count) +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h +--- src/java.base/unix/native/libjava/childproc.h Tue Feb 11 11:17:37 2020 +0800 ++++ src/java.base/unix/native/libjava/childproc.h Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -126,7 +126,7 @@ + * The cached and split version of the JDK's effective PATH. + * (We don't support putenv("PATH=...") in native code) + */ +-const char * const *parentPathv; ++extern const char * const *parentPathv; + + ssize_t restartableWrite(int fd, const void *buf, size_t count); + int restartableDup2(int fd_from, int fd_to); + Property changes on: java/openjdk12/files/patch-changeset-57994 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java =================================================================== --- java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java (nonexistent) +++ java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java (working copy) @@ -0,0 +1,11 @@ +--- src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java.orig 2020-04-17 22:35:42 UTC ++++ src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java +@@ -529,7 +529,7 @@ static native String XSetLocaleModifiers(String modifi + display Specifies the connection to the X server. + onoff Specifies a Boolean value that indicates whether to enable or disable synchronization. + */ +- static native int XSynchronize(long display, boolean onoff); ++ static native long XSynchronize(long display, boolean onoff); + + /** + * Extracts an X event that can be processed in a secondary loop. Property changes on: java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c =================================================================== --- java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c (nonexistent) +++ java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c (working copy) @@ -0,0 +1,15 @@ +--- src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c.orig 2020-04-17 22:35:42 UTC ++++ src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c +@@ -2180,10 +2180,10 @@ Java_sun_awt_X11_XlibWrapper_copyLongArray(JNIEnv *env + } + } + +-JNIEXPORT jint JNICALL ++JNIEXPORT jlong JNICALL + Java_sun_awt_X11_XlibWrapper_XSynchronize(JNIEnv *env, jclass clazz, jlong display, jboolean onoff) + { +- return (jint) XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False)); ++ return ptr_to_jlong(XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False))); + } + + JNIEXPORT jboolean JNICALL Property changes on: java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --Apple-Mail=_242A9757-EFC8-4313-85A5-F37E933B7DEC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_242A9757-EFC8-4313-85A5-F37E933B7DEC-- --Apple-Mail=_7705E767-B350-4343-A023-A5C632A30F61 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX4I8XgAKCRCwXqMKLiCW o0wuAKDxSKlmPI9XDGLY3w6LgiBtOP7GNQCgwetNimMsb3XogboDYbA28kAnk8w= =T72H -----END PGP SIGNATURE----- --Apple-Mail=_7705E767-B350-4343-A023-A5C632A30F61--