From unknown Fri Jun 20 07:11:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49990 <49990@debbugs.gnu.org> To: bug#49990 <49990@debbugs.gnu.org> Subject: Status: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Reply-To: bug#49990 <49990@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:11:35 +0000 retitle 49990 [core-updates-frozen] Ant-bootstrap broken by classpath-boots= trap reassign 49990 guix submitter 49990 Julien Lepiller severity 49990 important thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 17:38:28 2021 Received: (at submit) by debbugs.gnu.org; 10 Aug 2021 21:38:28 +0000 Received: from localhost ([127.0.0.1]:60982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDZS4-0000vW-GH for submit@debbugs.gnu.org; Tue, 10 Aug 2021 17:38:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:59646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDZRy-0000vK-Pb for submit@debbugs.gnu.org; Tue, 10 Aug 2021 17:38:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDZRy-0005MS-HM for bug-guix@gnu.org; Tue, 10 Aug 2021 17:38:18 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:43956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDZRv-0003b8-LL for bug-guix@gnu.org; Tue, 10 Aug 2021 17:38:18 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 95fc77d0 for ; Tue, 10 Aug 2021 21:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=dkim; bh=DJm6NmQ1vVb5dBGKmWSNKMVZe ABfcXjc8uo8zJNGpRQ=; b=Lo5XYgVkQkbIZS/eXNqOQ6JvBlWlFy6HWLiAvuzhg AJGsNLVX/N0n4xRsV3yW+doUPAzvf5mx5bLkHeTjJF8NugjtVBeZyDO6dedLO3HL Zl1NDoPow/VujIWjdK8iy1dzI/c6EpZ1BjA8e4+7u9z5CTwbHzsXngv8YlaLl8bp jH1RVgEJKgDDKoVFqTLpsZ43JHciwPwjNR8ROu5Lx4kd53zxicBEnn2v4VCc/qzr 1KUCctCwFKvn6c9iRAkw43YoxUCNrOACzVcbst6l39Qr4hzwXw9WgKDmGtw+kwtl 2qTfFq4Cu1tnIJ6DMYI/coJzIhWbG8dIdX+4fkmn4T9hg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 6374f4d7 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Tue, 10 Aug 2021 21:38:07 +0000 (UTC) Date: Tue, 10 Aug 2021 23:38:01 +0200 From: Julien Lepiller To: bug-guix@gnu.org Subject: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Message-ID: <20210810233801.02639bd8@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Guix! I've finally taken the time to investigate the build failure of ant-bootstrap. It is failing after reporting a file exists: ``` /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558: Unable to create directory as a file already exists with that name: /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build ``` So, I set an environment variable to pass a different build directory to ant (-Dbuild.dir=bootstrapped-build), but it fails in the same way: ``` /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558: Unable to create directory as a file already exists with that name: /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/bootstrapped-build ``` However, using -K, I could check the directory does not exist. After investigating a bit, I found that File.isFile() is not working as expected. With the following file (Test.java): ``` import java.io.File; public class Test { public static void main(String[] args) { File f = new File("non-existent"); if(f.isFile()) System.out.println("yes"); else System.out.println("no"); } } ``` compiled in a guix environment for ant-bootstrap (I had to temporarily export it): ``` $ ./pre-inst-env guix environment ant-bootstrap [env]$ CLASSPATH=$GUIX_ENVIRONMENT/lib/rt.jar jikes Test.java [env]$ java Test no [env]$ jamvm Test yes ``` (java comes from outside the environment). jamvm from master is working, and I don't see any difference in it, classpath or jikes recipes. After investigation, it turns out that java.io.File is actually implemented in classpath, not jamvm, and there is a comment that refers to another similar issue: https://issues.guix.gnu.org/issue/36685 I tried the obvious, that is to introduce a new memory leak, but that did not work. So, to better understand what was going on, I instead added some printing: ``` @@ -256,7 +256,9 @@ only faster.") (lambda _ (substitute* "native/jni/java-io/java_io_VMFile.c" (("result = cpio_isFileExists.*" m) - (string-append m "\n//"))) + (string-append m "\n//")) + (("result = cpio_checkType.*" m) + (string-append m "\nfprintf(stderr, \"type? %s : %d -- %d -- %d;\\n\", filename, result, entryType, ((result == CPNATIVE_OK && entryType == CPFILE_FILE) ? 1 : 0));\n"))) #t)) (add-after 'install 'install-data (lambda _ (invoke "make" "install-data")))))) ``` and surprisingly, this prints the expected values, and it is enough to get the correct answer from the java side too. With the above diff, I'm able to build ant-bootstrap and all the dependencies of icedtea@1, with a lot of useless debug lines... Unfortunately icedtea itself ends in a failure after building quite a lot. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 07:53:51 2021 Received: (at 49990) by debbugs.gnu.org; 30 Aug 2021 11:53:51 +0000 Received: from localhost ([127.0.0.1]:58312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfrK-0000xF-M8 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 07:53:51 -0400 Received: from flashner.co.il ([178.62.234.194]:50944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfrG-0000wr-UV for 49990@debbugs.gnu.org; Mon, 30 Aug 2021 07:53:49 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id 9B74A40336; Mon, 30 Aug 2021 11:53:40 +0000 (UTC) Date: Mon, 30 Aug 2021 14:51:41 +0300 From: Efraim Flashner To: Julien Lepiller Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Message-ID: Mail-Followup-To: Efraim Flashner , Julien Lepiller , 49990@debbugs.gnu.org References: <20210810233801.02639bd8@tachikoma.lepiller.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6nzhSwq/T0tVU2rq" Content-Disposition: inline In-Reply-To: <20210810233801.02639bd8@tachikoma.lepiller.eu> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49990 Cc: 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --6nzhSwq/T0tVU2rq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 10, 2021 at 11:38:01PM +0200, Julien Lepiller wrote: > Hi Guix! >=20 > I've finally taken the time to investigate the build failure of > ant-bootstrap. It is failing after reporting a file exists: >=20 I tried working around it a different way, and tried removing some lines =66rom build.xml but didn't make it to a built package. Interestingly, ant-bootstrap as it currently exists in core-updates-frozen, builds just fine on armhf, aarch64 and powerpc. > ``` > /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558: > Unable to create directory as a file already exists with that name: > /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build > ``` >=20 > So, I set an environment variable to pass a different build directory > to ant (-Dbuild.dir=3Dbootstrapped-build), but it fails in the same way: >=20 > ``` > /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build.xml:558: > Unable to create directory as a file already exists with that name: > /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/bootstrapped-b= uild > ``` >=20 > However, using -K, I could check the directory does not exist. After > investigating a bit, I found that File.isFile() is not working as > expected. With the following file (Test.java): >=20 > ``` > import java.io.File; > public class Test { > public static void main(String[] args) { > File f =3D new File("non-existent"); > if(f.isFile()) > System.out.println("yes"); > else > System.out.println("no"); > } > } > ``` >=20 > compiled in a guix environment for ant-bootstrap (I had to temporarily > export it): >=20 > ``` > $ ./pre-inst-env guix environment ant-bootstrap > [env]$ CLASSPATH=3D$GUIX_ENVIRONMENT/lib/rt.jar jikes Test.java > [env]$ java Test > no > [env]$ jamvm Test > yes > ``` >=20 > (java comes from outside the environment). jamvm from master is > working, and I don't see any difference in it, classpath or jikes > recipes. >=20 > After investigation, it turns out that java.io.File is actually > implemented in classpath, not jamvm, and there is a comment that refers > to another similar issue: >=20 > https://issues.guix.gnu.org/issue/36685 >=20 > I tried the obvious, that is to introduce a new memory leak, but that > did not work. So, to better understand what was going on, I instead > added some printing: >=20 > ``` > @@ -256,7 +256,9 @@ only faster.") > (lambda _ > (substitute* "native/jni/java-io/java_io_VMFile.c" > (("result =3D cpio_isFileExists.*" m) > - (string-append m "\n//"))) > + (string-append m "\n//")) > + (("result =3D cpio_checkType.*" m) > + (string-append m "\nfprintf(stderr, \"type? %s : %d -- > %d -- %d;\\n\", filename, result, entryType, ((result =3D=3D CPNATIVE_OK = && > entryType =3D=3D CPFILE_FILE) ? 1 : 0));\n"))) #t)) (add-after 'install > 'install-data (lambda _ (invoke "make" "install-data")))))) > ``` >=20 > and surprisingly, this prints the expected values, and it is enough to > get the correct answer from the java side too. With the above diff, I'm > able to build ant-bootstrap and all the dependencies of icedtea@1, with > a lot of useless debug lines... Unfortunately icedtea itself ends in a > failure after building quite a lot. I was able to use your diff to build ant-bootstrap for x86_64. aarch64, armhf and powerpc still build and i686 still fails. I'm not sure why icedtea@1 didn't build for you, I was able to build it on x86_64. The other architectures are building more slowly. Looks to me like you should add it, with a comment like: With the power of ... debug spam? we magically enable building on x86_64. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --6nzhSwq/T0tVU2rq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmEsxkkACgkQQarn3Mo9 g1E5Fw//bAFlbKz/qGrKAzJu6JZY3Owa25a5SHMJA992AQ0M7hvyNmAVnWSS/8Pi EQa1TE7ss4Jv9s7vjPNTOX3T7cYGmnipbB0eLTopr84nzcyK59blPI3bOo24UbiK kUQSMUMXelQ1ShnaYlw+ugspvj/XFUusqG9etDXuyhl8QYCdUmsCRO0AF1Fmvbvw IOSyLHdxRrZRrx1YQgrSrVIaHzKMCJFJ6D7Qu40dPm99fjVBcQlw62Bgfm95Zr+7 ezTsUbqzE2z4tfFZdvqHNhUyCxkFb5gBLxq4uspfhl++aQYLPMC6pwgvjr9rzKER wXWb1jFUq0tAek5UGyn5HoqnFxTPGH487exjX744jcvHE/NnJs+pbJHKT6zNyfyY lqUmy9NHPm6qrKwbI0FOptcaV5UNWFH8S/7kDvj24toyTQVwYRBWOsEIXXNHqrYu O1RwXCp2KFK6xE+vb/z0Bq+VERDIXZbV2XQ0BXcHLaE7p9hLK1ORN8Y+3qRtA0BD dOz3Z9wSbkwPDl/OTLjunPp4U3H9IgA/9ottyUYGztsK2ztjqAO+nBHZDeg0uRbp FGWsN293AvJt7JfN8b/sQWr7Qy7nCZgMUN8L3+TzePDGIo1p31jeRA5A9+OnECuO Bud9VYsNbyyg5BIZGh2HyGAR2g3imx4Mta4tAmgoxw4Q1hDZtjw= =zgz1 -----END PGP SIGNATURE----- --6nzhSwq/T0tVU2rq-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 17:48:44 2021 Received: (at control) by debbugs.gnu.org; 30 Aug 2021 21:48:44 +0000 Received: from localhost ([127.0.0.1]:60542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKp92-0000Wk-53 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 17:48:44 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:40277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKp8y-0000WL-PM for control@debbugs.gnu.org; Mon, 30 Aug 2021 17:48:42 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3Aen1nRqO3lqpLr8BcTsyjsMiBIKoaSvp037BZ?= =?us-ascii?q?7TEXdfU1SL39qynAppQmPHPP5Qr5HUtQ/OxoW5PwI080l6QV3WDAB9mftWDd0Q?= =?us-ascii?q?PCEGgh1+TfKlbbcREWmNQw6U4tSdkcNOHN?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="391478569" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 23:48:34 +0200 Date: Mon, 30 Aug 2021 23:48:33 +0200 Message-Id: <87czpubo3y.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #49990 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) severity 49990 important quit From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 18:32:52 2021 Received: (at 49990) by debbugs.gnu.org; 31 Aug 2021 22:32:52 +0000 Received: from localhost ([127.0.0.1]:35645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLCJH-00066a-UB for submit@debbugs.gnu.org; Tue, 31 Aug 2021 18:32:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLCJE-00066I-Tf for 49990@debbugs.gnu.org; Tue, 31 Aug 2021 18:32:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56690) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLCJ9-0006PJ-2M; Tue, 31 Aug 2021 18:32:43 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48800 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLCJ8-0005lT-3N; Tue, 31 Aug 2021 18:32:42 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap References: <20210810233801.02639bd8@tachikoma.lepiller.eu> Date: Wed, 01 Sep 2021 00:32:39 +0200 In-Reply-To: (Efraim Flashner's message of "Mon, 30 Aug 2021 14:51:41 +0300") Message-ID: <878s0h8cu0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49990 Cc: Julien Lepiller , 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! As discussed on IRC, I had a semi-victory with the attached patch, which works around a miscompilation issue in =E2=80=98Java_java_io_VMFile_isFile= =E2=80=99. Unfortunately, with this patch applied, =E2=80=98ant-bootstrap=E2=80=99 fai= ls to build with: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -e '(@@ (gnu packages java) ant-bootstrap)' -K [=E2=80=A6] ... Copying Required Files ... Building Ant Distribution Buildfile: /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build= .xml BUILD FAILED Could not load the version information. Total time: 0 seconds ... Failed Building Ant Distribution ! error: in phase 'build': uncaught exception: %exception #<&invoke-error program: "bash" arguments: ("bootstrap.sh" "-Ddi= st.dir=3D/gnu/store/88qc3rkp3bc6qsf6gmknv51vprd3r8j4-ant-bootstrap-1.8.4") = exit-status: 1 term-signal: #f stop-signal: #f>=20 phase `build' failed after 0.8 seconds command "bash" "bootstrap.sh" "-Ddist.dir=3D/gnu/store/88qc3rkp3bc6qsf6gmkn= v51vprd3r8j4-ant-bootstrap-1.8.4" failed with status 1 --8<---------------cut here---------------end--------------->8--- The message =E2=80=9CCould not load the version information.=E2=80=9D indic= ates a NullPointerException in Main.java: --8<---------------cut here---------------start------------->8--- try { Properties props =3D new Properties(); InputStream in =3D Main.class.getResourceAsStream("/org/apache/tools/ant/version= .txt"); props.load(in); // =E2=80=A6 } catch (NullPointerException npe) { throw new BuildException("Could not load the version information.= "); } --8<---------------cut here---------------end--------------->8--- Specifically, =E2=80=98in=E2=80=99 is null. =E2=80=98version.txt=E2=80=99 is looked for in /tmp/guix-build-ant-bootstrap-1.8.4.drv-0/apache-ant-1.8.4/build/classes/or= g/apache/tools/ant/version.txt but at this point it=E2=80=99s still in src/ only. My understanding is tha= t the =E2=80=9Cbuild=E2=80=9D target in =E2=80=98build.xml=E2=80=99 should copy i= t to build/classes/. Ideas? What a wonderful puzzle we have! :-) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 08ef7a8213..d3c95a456d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -230,7 +230,8 @@ only faster.") (sha256 (base32 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) - (patches (search-patches "classpath-aarch64-support.patch")))) + (patches (search-patches "classpath-aarch64-support.patch" + "classpath-miscompilation.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -247,17 +248,6 @@ only faster.") "--disable-gjdoc") #:phases (modify-phases %standard-phases - ;; XXX: This introduces a memory leak as we remove a call to free up - ;; memory for the file name string. This was necessary because of a - ;; runtime error that would have prevented us from building - ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 - ;; for the gnarly details. - (add-after 'unpack 'remove-call-to-free - (lambda _ - (substitute* "native/jni/java-io/java_io_VMFile.c" - (("result = cpio_isFileExists.*" m) - (string-append m "\n//"))) - #t)) (add-after 'install 'install-data (lambda _ (invoke "make" "install-data")))))) (native-inputs diff --git a/gnu/packages/patches/classpath-miscompilation.patch b/gnu/packages/patches/classpath-miscompilation.patch new file mode 100644 index 0000000000..835113df71 --- /dev/null +++ b/gnu/packages/patches/classpath-miscompilation.patch @@ -0,0 +1,31 @@ +For some reason, the original code gets miscompiled on x86_64, leading +'Java_java_io_VMFile_isFile' to return true when the return value of +'cpio_checkType' is ENOENT (= 2). + +See +and . + +diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c +index de1320b..9a5d375 100644 +--- a/native/jni/java-io/java_io_VMFile.c ++++ b/native/jni/java-io/java_io_VMFile.c +@@ -278,6 +278,7 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + const char *filename; + int result; + jint entryType; ++ jboolean isfile; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -288,9 +289,10 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + } + + result = cpio_checkType (filename, &entryType); ++ isfile = (result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0; ++ return isfile; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 21:03:14 2021 Received: (at 49990) by debbugs.gnu.org; 1 Sep 2021 01:03:14 +0000 Received: from localhost ([127.0.0.1]:35689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLEek-0001Tm-GM for submit@debbugs.gnu.org; Tue, 31 Aug 2021 21:03:14 -0400 Received: from lepiller.eu ([89.234.186.109]:56598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLEee-0001TY-C2 for 49990@debbugs.gnu.org; Tue, 31 Aug 2021 21:03:09 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id f38519ec; Wed, 1 Sep 2021 01:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type; s=dkim; bh=A8daQEPXz7R1C0e6flNAyEBl4UoIeHQWYAUwDy UN9iQ=; b=E2RGOVZQ1+VMRwavqUrCIQ2kk13a6YYeQsDprMj4cBBqeB91I8roWY Z+Jkev0p0/kFqzGz0Q5LyuqLHZDcib5hLgSTEypftF6bGJIRY2f04ZF9qRPUOirZ F+hOIe+aCIcTMNwVzusSamT42vQQn8+XXH7+DpYtJXDhNaglTBTRFUtCstoFkGwC QMGkyL/9t9pXsgArM3GAnUVEULoBVuNNNaUgpunXfSsdmEjcI2zWiFXPli8qaiox tGxeGdIfs/jJg+CJD7V2S7S0m6SANHmqV7rionJpzVoZY5DbDTvoy3RPEzLSzRgH wLHU6/z8EIBTJla06CMINzuZOBQz2Rhg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id f1aac32e (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 1 Sep 2021 01:03:01 +0000 (UTC) Date: Wed, 1 Sep 2021 03:02:55 +0200 From: Julien Lepiller To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Message-ID: <20210901030255.27bfdd2d@tachikoma.lepiller.eu> In-Reply-To: <878s0h8cu0.fsf@gnu.org> References: <20210810233801.02639bd8@tachikoma.lepiller.eu> <878s0h8cu0.fsf@gnu.org> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/gCRo1p7.yqGfjx913__iHNz" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49990 Cc: Efraim Flashner , 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --MP_/gCRo1p7.yqGfjx913__iHNz Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le Wed, 01 Sep 2021 00:32:39 +0200, Ludovic Court=C3=A8s a =C3=A9crit : > Hello! >=20 > As discussed on IRC, I had a semi-victory with the attached patch, > which works around a miscompilation issue in > =E2=80=98Java_java_io_VMFile_isFile=E2=80=99. another possibility I tested was to disable optimization by adding CFLAGS=3D-O0 to the configure-flags. This creates an unoptimized version, but that should be fine since it's only for the bootstrap. However, I noticed that my debug messages from my previous attempt were still visible when compiling icedtea. I don't know what happened, since there is at least another classpath version before it. >=20 > Unfortunately, with this patch applied, =E2=80=98ant-bootstrap=E2=80=99 f= ails to build > with: >=20 > Ideas? What a wonderful puzzle we have! :-) Even more wonderful is the fact I do not get this error at all when using CFLAGS=3D-O0, but I do with your patch. I didn't have any issue either with my previous attempt with debugging. Could there be other problems with optimizations in classpath? I attached my counter-patch :) > Thanks, > Ludo=E2=80=99. >=20 --MP_/gCRo1p7.yqGfjx913__iHNz Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=classpath.patch diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 08ef7a8213..b2fddcc055 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -244,7 +244,8 @@ only faster.") "--disable-plugin" "--disable-dssi" "--disable-alsa" - "--disable-gjdoc") + "--disable-gjdoc" + "CFLAGS=-O0") #:phases (modify-phases %standard-phases ;; XXX: This introduces a memory leak as we remove a call to free up @@ -333,7 +334,7 @@ other small VMs it supports the full spec, including object finalisation and JNI.") (license license:gpl2+))) -(define ant-bootstrap +(define-public ant-bootstrap (package (name "ant-bootstrap") ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which --MP_/gCRo1p7.yqGfjx913__iHNz-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 09:54:02 2021 Received: (at 49990) by debbugs.gnu.org; 1 Sep 2021 13:54:02 +0000 Received: from localhost ([127.0.0.1]:36721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLQgk-0007Lj-4t for submit@debbugs.gnu.org; Wed, 01 Sep 2021 09:54:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLQgi-0007LH-LE for 49990@debbugs.gnu.org; Wed, 01 Sep 2021 09:54:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49962) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLQgd-0000P5-64; Wed, 01 Sep 2021 09:53:55 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48802 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLQgc-0002hR-Tj; Wed, 01 Sep 2021 09:53:55 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Julien Lepiller Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap References: <20210810233801.02639bd8@tachikoma.lepiller.eu> <878s0h8cu0.fsf@gnu.org> <20210901030255.27bfdd2d@tachikoma.lepiller.eu> Date: Wed, 01 Sep 2021 15:53:52 +0200 In-Reply-To: <20210901030255.27bfdd2d@tachikoma.lepiller.eu> (Julien Lepiller's message of "Wed, 1 Sep 2021 03:02:55 +0200") Message-ID: <87y28g766n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49990 Cc: Efraim Flashner , 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Julien Lepiller skribis: > Le Wed, 01 Sep 2021 00:32:39 +0200, > Ludovic Court=C3=A8s a =C3=A9crit : > >> Hello! >>=20 >> As discussed on IRC, I had a semi-victory with the attached patch, >> which works around a miscompilation issue in >> =E2=80=98Java_java_io_VMFile_isFile=E2=80=99. > > another possibility I tested was to disable optimization by adding > CFLAGS=3D-O0 to the configure-flags. This creates an unoptimized version, > but that should be fine since it's only for the bootstrap. However, I > noticed that my debug messages from my previous attempt were still > visible when compiling icedtea. I don't know what happened, since > there is at least another classpath version before it. > >>=20 >> Unfortunately, with this patch applied, =E2=80=98ant-bootstrap=E2=80=99 = fails to build >> with: The root cause is that, even tough we=E2=80=99re passing =E2=80=9C-classpath build/classes:src=E2=80=9D, only the first element of the classpath is searched. If we pass =E2=80=9C-classpath foobar:build/classes=E2=80=9D, th= en Main.class is not found. That suggests another problem with =E2=80=98stat=E2=80=99-re= lated functions. >> Ideas? What a wonderful puzzle we have! :-) > Even more wonderful is the fact I do not get this error at all when > using CFLAGS=3D-O0, but I do with your patch. I didn't have any issue > either with my previous attempt with debugging. Could there be other > problems with optimizations in classpath? Hmm -O0 is brute-force. It doesn=E2=80=99t work for me though if I also re= move the =E2=80=98remove-call-to-free=E2=80=99 phase, though. I also tried this Classpath patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/include/jni_md.h b/include/jni_md.h index 989dbfe..f7867d7 100644 --- a/include/jni_md.h +++ b/include/jni_md.h @@ -32,7 +32,7 @@ executable file might be covered by the GNU General Public License. */ #define JNIEXPORT #define JNIIMPORT -typedef unsigned char jboolean; +typedef int jboolean; typedef signed char jbyte; typedef unsigned short jchar; typedef short jshort; --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It seems to have the same effect as my initial patch. I=E2=80=99m lacking inspiration now! Ludo=E2=80=99. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 02 10:15:45 2021 Received: (at 49990) by debbugs.gnu.org; 2 Sep 2021 14:15:45 +0000 Received: from localhost ([127.0.0.1]:41678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLnVJ-0003uY-Cp for submit@debbugs.gnu.org; Thu, 02 Sep 2021 10:15:45 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:37412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLnVI-0003uP-1n for 49990@debbugs.gnu.org; Thu, 02 Sep 2021 10:15:44 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by andre.telenet-ops.be with bizsmtp id p2Fi2500e0mfAB4012Fieu; Thu, 02 Sep 2021 16:15:42 +0200 Message-ID: Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap From: Maxime Devos To: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Julien Lepiller Date: Thu, 02 Sep 2021 16:15:41 +0200 In-Reply-To: <87y28g766n.fsf@gnu.org> References: <20210810233801.02639bd8@tachikoma.lepiller.eu> <878s0h8cu0.fsf@gnu.org> <20210901030255.27bfdd2d@tachikoma.lepiller.eu> <87y28g766n.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-yLTYlachbPL6FY1xXE9Q" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630592142; bh=J5eEgGfwJmp27pg72ZVt1saL1W4hVUWFyufrrU4PofQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=cCnDKJV/2ftBU935UHYbJpQ0no9llElTrQncVtAtaMmOjmyddskZaIHq/VPw4InGC TeylUAptComDUhHpWoBJsGWW5Jli4cvQHJc5HE3m3FgMjQ0HQ8AY8f17S0jCX7/KTR xkLIwD5rtbCw5HMkwilFkklqXJ5+xX9rEYfHep4golrYubMz85Et0acb0ZuebTPjox rVfvx54zhzB0DL4VFl7DLrQqcuCajcjqCJWYrPOgTzFvkZaq29q4J6Z96OVigdoJ0X YPMo1nQx4VCL/1xM++shcR4asIYdTVanW7I5osRz8zLkIyIG9sgcohfgWrANODBgJM etakfOcFHaDug== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49990 Cc: 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-yLTYlachbPL6FY1xXE9Q Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op wo 01-09-2021 om 15:53 [+0200]: > Hmm -O0 is brute-force. What about only using "-O0" for whatever C file is responsible for Java_java_io_VMFile_isFile? Greetings, Maxime --=-yLTYlachbPL6FY1xXE9Q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTDcjRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g/0AP9UdFl1KzgY/GsusIZlnu88Cwn4 Jl1HLqWzDSC4DuP0SgEA+jzDYLoasX0p5apWkpuE1g87G19+zLGly5lH/acmpws= =bmfE -----END PGP SIGNATURE----- --=-yLTYlachbPL6FY1xXE9Q-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 02 10:57:43 2021 Received: (at 49990) by debbugs.gnu.org; 2 Sep 2021 14:57:43 +0000 Received: from localhost ([127.0.0.1]:41727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLo9v-0004yE-I2 for submit@debbugs.gnu.org; Thu, 02 Sep 2021 10:57:43 -0400 Received: from lepiller.eu ([89.234.186.109]:56744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLo9s-0004y1-0P for 49990@debbugs.gnu.org; Thu, 02 Sep 2021 10:57:42 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id aa31ff25; Thu, 2 Sep 2021 14:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=nJzDZfRX10v2 +3L3J6BpJT65q+WLPAtXQc6v1Rm50Yk=; b=fVveuptlvzqQmYGwdJx8kut7TmvZ XWIjmDAPBrCfy+d+/4Y6zp0d45HQaxpcptKy+IszeV121bwAJRw9VCgzl84Ekldi ZsmIPDH8jl8M1Gx6JZMpCyPQ4aKIfaxLhhHwMEftP2pyVBLPHCMbumNAtbTcIy8f 79iDkU/JwpcvfE8dj0gzoGWexHwjDTEUaTBwuuZLMHb+iK19sr0B4PJJS8DooQ3i On2MmNyqgWfsnZjwrRqElLdvv307E9t9BkXxM+ak5Uhdstyf815Lp37JjIiWuO2k hojGo6iXuIMGJ4L7M5eHvi4Q3BvHS2XIIU1aRBa4TLKPTggXc6HvzTHooA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 3b76c295 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 2 Sep 2021 14:57:37 +0000 (UTC) Date: Thu, 02 Sep 2021 10:57:29 -0400 From: Julien Lepiller To: Maxime Devos , =?ISO-8859-1?Q?Ludovic_Court=E8s?= Subject: =?US-ASCII?Q?Re=3A_bug=2349990=3A_=5Bcore-updates-frozen=5D_Ant?= =?US-ASCII?Q?-bootstrap_broken_by_classpath-bootstrap?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20210810233801.02639bd8@tachikoma.lepiller.eu> <878s0h8cu0.fsf@gnu.org> <20210901030255.27bfdd2d@tachikoma.lepiller.eu> <87y28g766n.fsf@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----XTBFEAGR7KOIBVU6CC5E9TBKNLH1UY Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49990 Cc: 49990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------XTBFEAGR7KOIBVU6CC5E9TBKNLH1UY Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Actually, Ludo's patch works, but we should not remove the workaround for i= sDirectory=2E With the patch to isFile and the workaround in isDirectory, I= can build up to (but not including) icedtea@1=2E Ludo's patch is nicer tha= n using -O0 :) Le 2 septembre 2021 10:15:41 GMT-04:00, Maxime Devos a =C3=A9crit=C2=A0: >Ludovic Court=C3=A8s schreef op wo 01-09-2021 om 15:53 [+0200]: >> Hmm -O0 is brute-force=2E > >What about only using "-O0" for whatever C file is responsible for >Java_java_io_VMFile_isFile? > >Greetings, >Maxime ------XTBFEAGR7KOIBVU6CC5E9TBKNLH1UY Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Actually, Ludo's patch works, but we should not re= move the workaround for isDirectory=2E With the patch to isFile and the wor= karound in isDirectory, I can build up to (but not including) icedtea@1=2E = Ludo's patch is nicer than using -O0 :)

L= e 2 septembre 2021 10:15:41 GMT-04:00, Maxime Devos <maximedevos@telenet= =2Ebe> a =C3=A9crit=C2=A0:
Ludovic Court=C3=A8s schreef op wo 01-0=
9-2021 om 15:53 [+0200]:
Java_java_io_VMFile_isFile?
<= br>Greetings,
Maxime
------XTBFEAGR7KOIBVU6CC5E9TBKNLH1UY-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 02 18:32:54 2021 Received: (at 49990) by debbugs.gnu.org; 2 Sep 2021 22:32:54 +0000 Received: from localhost ([127.0.0.1]:42289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLvGQ-0001W2-L3 for submit@debbugs.gnu.org; Thu, 02 Sep 2021 18:32:54 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:46768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLvGM-0001Rn-9T for 49990@debbugs.gnu.org; Thu, 02 Sep 2021 18:32:53 -0400 Received: by mail-ed1-f49.google.com with SMTP id j13so5167227edv.13 for <49990@debbugs.gnu.org>; Thu, 02 Sep 2021 15:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mI9WtJTLTo4SZSU9U0P3GCRxrmGK9SR0K2MTHYxYBG8=; b=L61DJgQTF5o5KkQ8HuKBGXFurusl2endVucuFIW8/2rJCIoOCdPrbmWplGHylm9Na4 5wz/jb0RU8eSRZRtwTjrmH7DpszH6wF99z8uAGMdtSJmxTjnHBCPmvRG4UH6INm98VQE 2ZhVp0UUqAbR1KCFc6Oy1yyKIOE8KHmQ5QlW/tSl4GQEJm4ktd03IDjl6js30AUB52oq GNyFWu/41cmxzRN+cTsr/MI8/H5Z+mZyeenS4cApcL8qy87j3WyCXecGYiM4hfqxOTDa FImPxOb+cNgLGlTHj+cBVQOsnRlKUBhZNKZfoa259+w1yvUfv5o0UAriLya4sFg/eCbX OTug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mI9WtJTLTo4SZSU9U0P3GCRxrmGK9SR0K2MTHYxYBG8=; b=VvVMSu4h6WDZawfvomBBXPNl17bBj70GSEn0iFt7MVX6Yl3P3QgvtkEjKZ+KxAwQom 32+f2Uf2AONipqK1rD1v1Ik1C1tS69E7lKNk2928xVacGQKrR1j6lGOj9KHPticHYKFg BUnOHONq83gO3NN89pHdmSqhsUMgvztW3zfD8lJXkyPIF/jeQKR929ButERFcOuKFLJz dbBnrsGUtAQORmtsr2DMmHXAwmvIhVHwerT5nSUDq+2/i8zOWj7thp1ufkw7jdLP1qB7 QSLM+TJ1MveHOvFBPvnKFhXO3xZCoXggmANkQvvBDYcxhRh6mJDkeAlKHw31BJKgpyb7 22VA== X-Gm-Message-State: AOAM5331YphRYVYJloMX2d631fO2o0GAhR4z4FfRtl1ztv/QBI9aG7QJ ooYzAiB2+wbCjzTeLvvHP85+0FXNBXBuz/pl X-Google-Smtp-Source: ABdhPJy8zIG/4gaB/taGz16mj4tSy68jPMrTL6AmINewYYuOM6kMsEatDEdO6W9QF/OxV0CkpRyCJw== X-Received: by 2002:a50:fe8b:: with SMTP id d11mr643213edt.330.1630621963837; Thu, 02 Sep 2021 15:32:43 -0700 (PDT) Received: from localhost.localdomain ([176.234.10.27]) by smtp.gmail.com with ESMTPSA id by28sm1936449edb.1.2021.09.02.15.32.42 for <49990@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 15:32:42 -0700 (PDT) From: muradm To: 49990@debbugs.gnu.org Subject: [PATCH] gnu: Fix classpath-bootstrap compilation Date: Fri, 3 Sep 2021 01:27:49 +0300 Message-Id: <20210902222749.28633-1-mail@muradm.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49990 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- gnu/packages/java.scm | 3 +- .../patches/classpath-instruction-order.patch | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/classpath-instruction-order.patch diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 08ef7a8213..1e29cac401 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -230,7 +230,8 @@ only faster.") (sha256 (base32 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) - (patches (search-patches "classpath-aarch64-support.patch")))) + (patches (search-patches "classpath-aarch64-support.patch" + "classpath-instruction-order.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/classpath-instruction-order.patch b/gnu/packages/patches/classpath-instruction-order.patch new file mode 100644 index 0000000000..278ae912c7 --- /dev/null +++ b/gnu/packages/patches/classpath-instruction-order.patch @@ -0,0 +1,35 @@ +diff -ruN ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c ./native/jni/java-io/java_io_VMFile.c +--- ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c 2006-09-23 08:17:45.000000000 +0300 ++++ ./native/jni/java-io/java_io_VMFile.c 2021-09-03 01:08:17.073644627 +0300 +@@ -278,6 +278,7 @@ + const char *filename; + int result; + jint entryType; ++ int fres; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -288,9 +289,22 @@ + } + + result = cpio_checkType (filename, &entryType); ++ ++ fres = 1; ++ ++ if (result != CPNATIVE_OK) ++ { ++ fres = 0; ++ } ++ ++ if (entryType != CPFILE_FILE) ++ { ++ fres = 0; ++ } ++ + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0; ++ return fres; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ -- 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 02 18:45:20 2021 Received: (at 49990) by debbugs.gnu.org; 2 Sep 2021 22:45:20 +0000 Received: from localhost ([127.0.0.1]:42323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLvSR-00027X-SW for submit@debbugs.gnu.org; Thu, 02 Sep 2021 18:45:20 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:40612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLvSO-0001yE-5b for 49990@debbugs.gnu.org; Thu, 02 Sep 2021 18:45:19 -0400 Received: by mail-ej1-f48.google.com with SMTP id lc21so7966915ejc.7 for <49990@debbugs.gnu.org>; Thu, 02 Sep 2021 15:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=user-agent:from:to:subject:in-reply-to:date:message-id:mime-version; bh=97kyQLpY/PEPpLN3phwQhKi7OT83hgS+0VKMdkti1Jk=; b=1SAM+lim8jWlPNWu9UG31HLNtBfWAvwEPMl4FDFrfYDVy8ZJ6dMWr8Zm5HIhXWToXa 3DI7kvJAxTEARW7Ro7dy0gykEdS5d+OgyrHlkwHinnwMdEqQhHQIEZzkU9oBv7uS7BRq JCWOPS43qbqv5fAK4mrorZ8yPMHeOpkVz0KEHTm7IuN9pX+2alYwfPJ34R2Mei8BQltm AbkSgI+OUZxKQdOxvQhvd5UFgiyPpSI5/l36TP0qsR+Mnmg1tzmqGGKm7NspPdsGxrKJ sdR6SNxICMB8JQFE7o5wfp4lbmefbCVQ4ZLHJcgkSR9tPb/WAmgytTKONZyptqZUqAyP Db0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:in-reply-to:date :message-id:mime-version; bh=97kyQLpY/PEPpLN3phwQhKi7OT83hgS+0VKMdkti1Jk=; b=F01PnmYt5R5qLd661kmKqyZyb7rqZW9iPrs2/QkU3mgamwumCcWZCbs9DkSHf5sXfR PiYVgNxu3gagq+T17Gvt/R0onTUC2rEYmHqbbn6o7JvcVtR1w80hF7YXvqMWg+T3g8RT GmdlUFE17FoojsPxdD24Fm6t16A1zLwuA1LEhAUtDB3qWBniTq6CdjZTFwP7uVgoPP6j 8vQ/ozhOTurNkQcfXgxlLa05ry6Xsr3rZz0qDoB3PEauPF9pYLcfl0oFBEdOXJSz4icR z4tPWl08E+T6y7qxo+fU0bjD1RLC5Pv2KGj1e7CKSKeITt/GyMMnaeTQMpGrcnfpadJT Jutg== X-Gm-Message-State: AOAM5323bHdFKxOihsIZDAAoV4KzxGBbi1xNkzjwLiCSGAnx50jyX3n/ 2f0psfgh35JekS+96u6HdhyxsyCB4dofMgzv X-Google-Smtp-Source: ABdhPJyc75RBVlQU0JdeF4jjpL7TH+GAqFUFVB9h+aZr2Rk5ymCbljFAxIR1RSFPL2NdMrOWV1Hjhg== X-Received: by 2002:a17:906:a18f:: with SMTP id s15mr532287ejy.269.1630622709736; Thu, 02 Sep 2021 15:45:09 -0700 (PDT) Received: from nomad-lp1 ([176.234.10.27]) by smtp.gmail.com with ESMTPSA id u9sm1921694edo.37.2021.09.02.15.45.08 for <49990@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 15:45:09 -0700 (PDT) User-agent: mu4e 1.6.5; emacs 28.0.50 From: muradm To: 49990@debbugs.gnu.org Subject: RE: [PATCH] gnu: Fix classpath-bootstrap compilation In-Reply-To: <20210902222749.28633-1-mail@muradm.net> Date: Fri, 03 Sep 2021 01:38:31 +0300 Message-ID: <87k0jy7g24.fsf@muradm.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49990 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This patch fixes issue in the way that it: a) calculates the result before call to (*env)->ReleaseStringUTFChars b) attempt to trick gcc optimizations by complicating path I suppose issue is with what (*env)->ReleaseStringUTFChars does and how. One should note that similar approach is not applicable to substitute in package definition. Why not just build ancient code with ancient gcc? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 03 06:11:52 2021 Received: (at 49990-done) by debbugs.gnu.org; 3 Sep 2021 10:11:52 +0000 Received: from localhost ([127.0.0.1]:43016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM6Aq-0000XU-D0 for submit@debbugs.gnu.org; Fri, 03 Sep 2021 06:11:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM6Ao-0000XD-UU for 49990-done@debbugs.gnu.org; Fri, 03 Sep 2021 06:11:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46662) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM6Ai-0004PT-Iy; Fri, 03 Sep 2021 06:11:44 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48840 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM6Ai-0006Hc-Aa; Fri, 03 Sep 2021 06:11:44 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Julien Lepiller Subject: Re: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap References: <20210810233801.02639bd8@tachikoma.lepiller.eu> <878s0h8cu0.fsf@gnu.org> <20210901030255.27bfdd2d@tachikoma.lepiller.eu> <87y28g766n.fsf@gnu.org> Date: Fri, 03 Sep 2021 12:11:42 +0200 In-Reply-To: (Julien Lepiller's message of "Thu, 02 Sep 2021 10:57:29 -0400") Message-ID: <87fsum2ckh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49990-done Cc: muradm , Maxime Devos , 49990-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi there! I pushed a variant of the patch proposed earlier, adding a similar workaround to =E2=80=98Java_java_io_VMFile_exists=E2=80=99 and =E2=80=98Java_java_io_VMFile_isDirectory=E2=80=99: https://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dcore-updates-froze= n&id=3D7f50543d55b20cd528b28d7e15f1bb81001a8da9 With this, I can build =E2=80=98ant-bootstrap=E2=80=99 just fine. \o/ Next up: icedtea 1.13.13 chokes on obscure C++ issues: --8<---------------cut here---------------start------------->8--- In file included from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.1= 3/openjdk-ecj/hotspot/src/share/vm/asm/assembler.hpp:29, from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.1= 3/openjdk-ecj/hotspot/src/share/vm/precompiled/precompiled.hpp:29: /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/= src/share/vm/code/relocInfo.hpp:374:27: error: friend declaration of =E2=80= =98relocInfo prefix_relocInfo(int)=E2=80=99 specifies default arguments and= isn=E2=80=99t a definition [-fpermissive] 374 | inline friend relocInfo prefix_relocInfo(int datalen =3D 0); | ^~~~~~~~~~~~~~~~ In file included from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.1= 3/openjdk-ecj/hotspot/src/share/vm/asm/assembler.hpp:29, from /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.1= 3/openjdk-ecj/hotspot/src/share/vm/precompiled/precompiled.hpp:29: /tmp/guix-build-icedtea-1.13.13.drv-0/icedtea6-1.13.13/openjdk-ecj/hotspot/= src/share/vm/code/relocInfo.hpp:472:18: error: friend declaration of =E2=80= =98relocInfo prefix_relocInfo(int)=E2=80=99 specifies default arguments and= isn=E2=80=99t the only declaration [-fpermissive] 472 | inline relocInfo prefix_relocInfo(int datalen) { | ^~~~~~~~~~~~~~~~ --8<---------------cut here---------------end--------------->8--- Anyway, we=E2=80=99re making progress! Ludo=E2=80=99. From unknown Fri Jun 20 07:11:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Oct 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator