From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by sourceware.org (Postfix) with ESMTPS id 644353856DD9 for ; Thu, 20 Oct 2022 05:35:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 644353856DD9 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-vs1-xe2b.google.com with SMTP id s28so3513596vsr.10 for ; Wed, 19 Oct 2022 22:35:54 -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=NLvJ16Mvpwn/UZxMdLWmLyTEK8htMR5VyYBoIiBu4gk=; b=iQBx6bsY/PPKEdYwDJAtvWmAfrwL/6UGQtDZsr1sHrb79g8XaMfNmyiWBfK/wp/G/f i+ZmMdsJ3WUaOqy+gc/v1FXeSsmRq8mOytzuOWwAM0mLCevurOTs97Nec4Dp+lqCqetQ uDpKnGqydYDGZ5anorxqXHt8ykqwn672cIrLPg/O9Bw+RfyyOQAvavBRpyu+oIHFIzpT yh8ANcyZ+AgAddbTHR/B5qB2sp6HFED0TvsuPeudUb3rfZlWb2u0UTPZG7CzC2fi0TWC nRQmK6U8BZwgW2b4XYP2IzZLkLrB5PnXn6zLXzdT6A6VksEHF6YDqs5AILhDTPeCjy4m 1PyA== 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=NLvJ16Mvpwn/UZxMdLWmLyTEK8htMR5VyYBoIiBu4gk=; b=YWjX9SkojaG7Ndf04TwdLq3bYpujMSeucvqHLzm81b0xEyHPLcLVo6RiQYGFV9aGHm cQpSDB5ePLzkH/hpH5RzeipCCNnswnGRk0kLA9JkeWnV6pitrXukKqY0LFknlIJEMwXT psL8lBBhrKkPuwV2conxJUypp9/+sF7QlOXkhipumZSeVlxkSNJ1FnpPL8wGE786mv1o dT897tfLpLaHg/Khs0RBb3WJdeMxnotgBbdgBeLqY/GR1ASm27Lurc5zWSDkd+RTOPgT ZwyJAB6MvGyG4tbT7W970jPI9PPO56pJuxnW5gHy9NlSCbElWWlqT4Kyuu9mf7tqNA/T JcAg== X-Gm-Message-State: ACrzQf1Oedh0eljIN/BiNRI09YaBdMnpwgRbkLoZsHVWWO4lgzgMPAfX 51X4s11oMdToxf3Ngwz/OMccKX275HldHldc438ZLvAT X-Google-Smtp-Source: AMsMyM695C8PaIWmMfieSyIBAxRiQWoovQVhcwz89eoFBHSBAYQotumXml3URxCz6cOZoWaNNb/KIsgqnewsKAyGwrE= X-Received: by 2002:a67:a246:0:b0:398:a4f4:aed1 with SMTP id t6-20020a67a246000000b00398a4f4aed1mr5887546vsh.6.1666244153590; Wed, 19 Oct 2022 22:35:53 -0700 (PDT) MIME-Version: 1.0 References: <0986a08f-c28f-882c-8236-f5f3ecc5cb6a@bothner.com> In-Reply-To: From: Panicz Maciej Godek Date: Thu, 20 Oct 2022 07:35:41 +0200 Message-ID: Subject: Re: Building for Android To: Per Bothner Cc: kawa@sourceware.org Content-Type: multipart/alternative; boundary="000000000000e2489b05eb70b202" X-Spam-Status: No, score=-0.5 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: --000000000000e2489b05eb70b202 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable After modifying gnu/expr/Mangle.java and running 'make clean; make' it seems to work properly. The d8 tool reports the folowing issues: Stripped invalid locals information from 5 methods. In libs/kawa.jar:gnu/kawa/slib/syntaxutils.class: Methods with invalid locals information: java.lang.Object gnu.kawa.slib.syntaxutils.unrewriteQuote(gnu.expr.QuoteExp) Type information in locals-table is inconsistent. Cannot constrain type: BOTTOM (empty) for value: v39(val) by constraint INT. In libs/kawa.jar:kawa/lib/bytevectors.class: Methods with invalid locals information: java.lang.Object kawa.lib.bytevectors.bytevectorAppend(gnu.lists.U8Vector[]) Attempt to define local of type int as result:gnu.lists.U8Vector In libs/kawa.jar:kawa/lib/kawa/mstrings.class: Methods with invalid locals information: java.lang.CharSequence kawa.lib.kawa.mstrings.stringMap(java.lang.Object, java.lang.CharSequence, java.lang.CharSequence[]) Type information in locals-table is inconsistent. Cannot constrain type: INT for value: v126 by constraint OBJECT. In libs/kawa.jar:kawa/lib/numbers.class: Methods with invalid locals information: boolean kawa.lib.numbers.isInteger(java.lang.Object) Type information in locals-table is inconsistent. Cannot constrain type: BOTTOM (empty) for value: v50 by constraint INT. In libs/kawa.jar:kawa/lib/strings.class: Methods with invalid locals information: void kawa.lib.strings.stringForEach(java.lang.Object, java.lang.CharSequence, java.lang.Object[]) Type information in locals-table is inconsistent. Cannot constrain type: INT for value: v164 by constraint OBJECT. Some warnings are typically a sign of using an outdated Java toolchain. To fix, recompile the source with an updated toolchain. But other than that, the build finishes, and the example program runs properly. Thanks. =C5=9Br., 19 pa=C5=BA 2022, 19:09 u=C5=BCytkownik Panicz Maciej Godek < godek.maciek@gmail.com> napisa=C5=82: > So, I did check, and USE_SYMBOLIC is set to true. > > I followed your instruction: I removed selected-java-source, make clean, > and then I typed this: > > ./configure --prefix=3D$HOME/usr --without-awt --without-swt --without-sa= x2 > --without-swing --with-java-source=3D8 --without-httpserver --disable-xqu= ery > --disable-echo2 --disable-jemacs --disable-brl > --with-android=3D/data/data/com.termux/files/usr/share/java/android.jar > > (I also tried --disable-xml, but then make reported an error while > attempting to compile some scm module) > > But despite that, USE_SYMBOLIC is still set to true in Mangle.java > > The output of make that I think might be relevant: > > javac -d . -g gnu/kawa/util/PreProcess.java > CLASSPATH=3D".:$CLASSPATH" java gnu.kawa.util.PreProcess \ > %java8 -use:com.sun.net.httpserver +enable:XML -with:jline3 -with:lsp4j > -use:java.awt \ > `sed -e 's|\([^ ]*\)|./\1|' < ./patch-source-list` > (variant java8 maps to: +JAVA5 +JAVA2 +use:java.util.IdentityHashMap > +use:java.lang.CharSequence +use:java.lang.Throwable.getCause > +use:java.net.URI +use:java.util.regex +SAX2 +use:java.nio > +use:org.w3c.dom.Node +use:javax.xml.transform +JAXP-1.3 -JAXP-QName +JAV= A6 > +JAVA7 +JAVA8 -JAVA9 -JAVA6COMPAT5 +use:java.text.Normalizer > +use:javax.lang.model +use:java.lang.invoke -Android) > make[1]: Leaving directory > '/data/data/com.termux/files/home/Kawa2' echo "%java8 > -use:com.sun.net.httpserver +enable:XML -with:jline3 -with:lsp4j > -use:java.awt" >selected-java-source > > > =C5=9Br., 19 pa=C5=BA 2022, 18:05 u=C5=BCytkownik Per Bothner napisa=C5=82: > >> >> >> On 10/19/22 02:15, Panicz Maciej Godek wrote: >> > However, even after fixing that, I get another error: >> > >> > Error: Field name '\=3Dandroid\,view\,View' cannot be represented in d= ex >> format. >> > >> > I really don't know how to overcome that one (IIRC Kawa 1.13 used $Dt >> as a replacement for a dot) >> >> There is still logic in Kawa to use-old style mangling (such as "$Dt" for >> ".") when Kawa >> is build for Android. Notice the /* #ifdef Android */ in >> gnu/expr/Magling.java. >> >> This code is supposed to be enable by the gnu/kawa/util/PreProcess.java >> helper, >> specifically if you configure --with-android. >> >> So the first step is to make sure your working copy of Mangling.java >> actually does have the USE_SYMBOLIC >> set to false. If it doesn't, delete the file selected-java-source, and >> re-run configure and make. >> Check the PreProcess in the 'make' log. >> -- >> --Per Bothner >> per@bothner.com http://per.bothner.com/ >> > --000000000000e2489b05eb70b202--