public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa@sourceware.org
Subject: Re: Building for Android
Date: Thu, 20 Oct 2022 07:35:41 +0200	[thread overview]
Message-ID: <CAMFYt2bqUXXa4UbgutPAonBW4dw17ar+nH5EEJUM5JCm6caW=A@mail.gmail.com> (raw)
In-Reply-To: <CAMFYt2b7ckwgQZs1XVJZaWWa_pVn_fwGB-RFtB-=Hr8zeabFtQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4756 bytes --]

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.

śr., 19 paź 2022, 19:09 użytkownik Panicz Maciej Godek <
godek.maciek@gmail.com> napisał:

> 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=$HOME/usr --without-awt --without-swt --without-sax2
> --without-swing --with-java-source=8 --without-httpserver --disable-xquery
> --disable-echo2 --disable-jemacs --disable-brl
> --with-android=/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=".:$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 +JAVA6
> +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
>
>
> śr., 19 paź 2022, 18:05 użytkownik Per Bothner <per@bothner.com> napisał:
>
>>
>>
>> On 10/19/22 02:15, Panicz Maciej Godek wrote:
>> > However, even after fixing that, I get another error:
>> >
>> > Error: Field name '\=android\,view\,View' cannot be represented in dex
>> 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/
>>
>

  reply	other threads:[~2022-10-20  5:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 14:57 Panicz Maciej Godek
2022-10-18 15:25 ` Per Bothner
2022-10-18 18:25   ` Panicz Maciej Godek
2022-10-19  9:15     ` Panicz Maciej Godek
2022-10-19 16:05       ` Per Bothner
2022-10-19 17:09         ` Panicz Maciej Godek
2022-10-20  5:35           ` Panicz Maciej Godek [this message]
2022-10-20 20:48             ` Panicz Maciej Godek
2022-10-21  5:14               ` Panicz Maciej Godek
2022-10-21 13:59                 ` Panicz Maciej Godek
2022-10-21 18:11                   ` Per Bothner
2022-10-21 19:19                     ` Panicz Maciej Godek
2022-10-21 19:31                       ` Per Bothner
2022-10-21 19:45                         ` Panicz Maciej Godek
2022-10-21 20:13                           ` Panicz Maciej Godek
2022-10-22  6:26                           ` Per Bothner
2022-10-22  9:31                             ` Panicz Maciej Godek
2022-10-22 12:08                               ` Panicz Maciej Godek
2022-10-24  7:22                                 ` Panicz Maciej Godek
2022-10-24 10:48                                   ` Per Bothner
2022-10-24 12:01                                     ` Panicz Maciej Godek
2022-10-21 18:00           ` Per Bothner

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMFYt2bqUXXa4UbgutPAonBW4dw17ar+nH5EEJUM5JCm6caW=A@mail.gmail.com' \
    --to=godek.maciek@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /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.
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).