From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aKfsAyiuLmGhgwAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 00:33:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qGwoOyeuLmHNbwAAbx9fmQ (envelope-from ) for ; Tue, 31 Aug 2021 22:33:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2E1CB3A5C for ; Wed, 1 Sep 2021 00:33:11 +0200 (CEST) Received: from localhost ([::1]:37158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLCJa-0001uj-75 for larch@yhetil.org; Tue, 31 Aug 2021 18:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLCJS-0001uU-QK for bug-guix@gnu.org; Tue, 31 Aug 2021 18:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLCJS-0006aF-Iy for bug-guix@gnu.org; Tue, 31 Aug 2021 18:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mLCJS-000677-GV for bug-guix@gnu.org; Tue, 31 Aug 2021 18:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 31 Aug 2021 22:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49990 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Received: via spool by 49990-submit@debbugs.gnu.org id=B49990.163044917223477 (code B ref 49990); Tue, 31 Aug 2021 22:33:02 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 49990@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630449191; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=W4BHbNWjIHF6t8iFapwrJLlv6hHbgDMGwz3whk37qCU=; b=Xc+P//i67tXII3F1zAqdUUicXJNg0b7UnxOjvlgvMLIYfsPvUb5aIaFWWWltg6u26ysgVc V7isrVMJtuHKfZepNs/dX48u7KT5bxL9zeD4FCTrbD59W6kCFHmiS4KLUvf9+cX56jZL2j leLHtC6Afa6gej5yJiTgAlBcxd0WTPuVTDqSQHWny193qd1rjIqFfgJ9bU7giTP+D5CPxZ dSSjjQPQL+ZJsMkAsvuYa/GEnoTrLtRJlNP2zAm7NopRj5hnrOQBOVnnxuBvazJa236uJ2 mA76OqiOMV62oevQ7WZbdr4r2VGXYNgRBof/wY7qZrURIbsVhs1DfcLy8dJ9ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630449191; a=rsa-sha256; cv=none; b=mQmvJrjb/23ytLBtgqAvVQjvmREKZekzGsLAFzarCJwoEphjYPN2tQQH5WVAZTSjwmc7xx FXTH50RXuO2QAZv5uB05wsjUmobt0xIZFidtUiCgiuCk3TyVaTx8rQs3XufXtq6mHPeXZY QF0bxO7CbgcFZPIBm6iH90roR2bebB8ulp0++M8+6sc1r4OVQqsh46E40OT/e3lk/3WOBx kiNH7KBXs+j9AoLOu+D5WyMNQUH7tAG/rnufv1eWdK8uFLkprlUgSnmf2jqNzGb2m/NTwS DshHiEoxSSogLm/kjgw1c1tT7WSiRhVyzkQx+iXnZyuKbkNqRXYdkFuUqYMtwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 2E1CB3A5C X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: STdgPQXOA85H --=-=-= 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 */ --=-=-=--