From: Efraim Flashner <efraim@flashner.co.il>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 49990@debbugs.gnu.org
Subject: bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap
Date: Mon, 30 Aug 2021 14:51:41 +0300 [thread overview]
Message-ID: <YSzGTY+7unWe0zRA@3900XT> (raw)
In-Reply-To: <20210810233801.02639bd8@tachikoma.lepiller.eu>
[-- Attachment #1: Type: text/plain, Size: 3984 bytes --]
On Tue, Aug 10, 2021 at 11:38:01PM +0200, Julien Lepiller wrote:
> Hi Guix!
>
> I've finally taken the time to investigate the build failure of
> ant-bootstrap. It is failing after reporting a file exists:
>
I tried working around it a different way, and tried removing some lines
from 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
> ```
>
> 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.
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.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-08-30 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 21:38 bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Julien Lepiller
2021-08-30 11:51 ` Efraim Flashner [this message]
2021-08-31 22:32 ` Ludovic Courtès
2021-09-01 1:02 ` Julien Lepiller
2021-09-01 13:53 ` Ludovic Courtès
2021-09-02 14:15 ` Maxime Devos
2021-09-02 14:57 ` Julien Lepiller
2021-09-03 10:11 ` Ludovic Courtès
2021-09-02 22:27 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
2021-09-02 22:38 ` muradm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YSzGTY+7unWe0zRA@3900XT \
--to=efraim@flashner.co.il \
--cc=49990@debbugs.gnu.org \
--cc=julien@lepiller.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).