From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by sourceware.org (Postfix) with ESMTPS id 002803858D32 for ; Tue, 18 Oct 2022 18:25:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 002803858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vk1-xa33.google.com with SMTP id s185so7332980vkb.0 for ; Tue, 18 Oct 2022 11:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bM+o5L2aSsHkY6zh7Uteqv+4WjEZtvxah2peLZeeJdk=; b=UEa5gWnzhXRRyVm2p+H5gnXV3cWjAUgOLTAyIDV3xoMrkuFk8ZQlNzuwNA0yJsMnih 0Tmo9YpZnsMgfj//Yrs3JWQwxqPDpvFglk6DxzZH7jdRReh9gyp1FVYie/oDes12XD4B +2CiPUh4WAfvW2BJ5dfbATIdd6MOUx4MhwSZtpp6GmuqrJqUG1n5x3ZvwtWZiKegTnXC qxx/gNU0wnn8OHTb3l/bDLcKzhgeYF0hAQEMA9B4+sFvW0UBoslCDKeovdAZGJiVfWHE WI0Tdob7a2bioJdV3ctt2l14hhgzMfdMTG4+45QUbfMEggshjQNusCK6YZaAPN7QnVwq OQjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bM+o5L2aSsHkY6zh7Uteqv+4WjEZtvxah2peLZeeJdk=; b=D3b4BhjqsbU2Lv6yCcO5FuobiWxyCIsIaMpnN0CF73ypgnddnslXKOHr0jfRm9I/JZ wzU5Nnhm0jfEP66kGY0bUcLK4lnrIg+GwutgfsW+DUMBphxrUQnQ6fPHBEGngZIHUXQ0 Rp2Gyku6FpvL/yuLpzgeNtwiyoyLkGLjt+dLKql5s0uOyLm+uWetC2/i21tKubyYpRFR CKJFrlVymiJNXVi8D4xrjvD1FjaNwZqMn+8pwyv9YettiDz78rxcFOb9rp7J4StUcce+ 5DirSQB0ZCDqmM1dRq2q5RfcQlqNXYzBb50mUxVbRJmPjmsvUiJ47OZ1pPyCbtS8pUGI uSRQ== X-Gm-Message-State: ACrzQf0+Zq49uIbbcwlChoAkajj9AsGn+eJ0uL3MzyP7i8kXUWQqiCot 3tRvp3pmbqduftraki1OO2wapTgkzjndfEsTS1lz77Ri X-Google-Smtp-Source: AMsMyM736Jp2xFRlFsZUcTd2ZxjYhRoxr+VyjjXIyBz5U+LVKvSwBWJh/9uF3ewB56L+9Kdout034xD6QvsVbXj0DYM= X-Received: by 2002:a1f:43cc:0:b0:3ab:ad61:bf73 with SMTP id q195-20020a1f43cc000000b003abad61bf73mr2080928vka.33.1666117555233; Tue, 18 Oct 2022 11:25:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Panicz Maciej Godek Date: Tue, 18 Oct 2022 20:25:43 +0200 Message-ID: Subject: Re: Building for Android To: Per Bothner Cc: kawa@sourceware.org Content-Type: multipart/alternative; boundary="00000000000008a8b705eb533913" X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000008a8b705eb533913 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable wt., 18 pa=C5=BA 2022, 17:25 u=C5=BCytkownik Per Bothner = napisa=C5=82: > > > On 10/18/22 07:57, Panicz Maciej Godek via Kawa wrote: > > PARSE ERROR: > > unsupported class file version 61.0 > > ...while parsing gnu/bytecode/Access.class > > > > So, what I suppose happens, is that the javac which builds Kawa emits > byte > > code that is unsupported by dx. > > Try specifying the --release to javac. This may be helpful: > > https://stackoverflow.com/questions/43102787/what-is-the-release-flag-in-= the-java-9-compiler > > > I tried building Kawa having passed --with-java-source=3D7 to the > 'configure' > > script, but that didn't help. > > Yes, IIRC (if I recall correctly) that doesn't change teh options passed > to javac. > > You can pass the --target option to the kawa command when compiling Scheme > to class files, > but that currently defaults to 52 (Java 8), which hopefuly dexer will > handle. > > > I also tried aliasing javac as javac -release 7, but it still seens to > > produce the class file version 61.0. > > Hm. That is weird. You can try an exlicit 'javac --target 8' (say). > It seems that aliasing doesn't work with make. So I did the same thing as I did with ecj -- wrote a shell script under prioritized $PATH which invoked javac with --release N flag. For N=3D7, I got a compilation error: RuntimeParameterAnnotationsAttr.java:81: error: incompatible types: ArrayList cannot be converted to List attr.parameterEntries.add(new ArrayList<>()); ^ RuntimeParameterAnnotationsAttr.java:85: error: incompatible types: ArrayList cannot be converted to List attr.parameterEntries.add(new ArrayList<>()); ^ RuntimeParameterAnnotationsAttr.java:110: error: incompatible types: ArrayList cannot be converted to List parameterEntries.add(new ArrayList<>()); ^ Fortunately, for N=3D8 the process completes successfully, and dexer no longer complains on the class file version. However, the dexing process now seems to be taking forever (ie. over 5 minutes), and the only way it managed to terminate so far was either by throwing out-of-memory exception, or by complaining that it is unable to allocate sufficiently large memory block due to fragmentation. I've been doing it on my phone, which has 6GB of RAM -- I'd thought that's sufficient -- but I'll also try it on a larger machine (still, I find that behavior surprising: the jar for kawa 1.13 has 2.2MB, whereas the latest one - 2.9MB, so it doesn't seem that much larger - yet dexing the old version takes about 30 seconds and doesn't blow anything up) According to https://en.wikipedia.org/wiki/Java_version_history > class file version 61.0 is Java 17. > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ > --00000000000008a8b705eb533913--