From: Per Bothner <per@bothner.com>
To: Kay Zheng <l04m33@gmail.com>, Kawa mailing list <kawa@sourceware.org>
Subject: Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
Date: Tue, 29 Aug 2017 18:02:00 -0000 [thread overview]
Message-ID: <f365bd02-77c6-220e-edb3-87d7b9a813cf@bothner.com> (raw)
In-Reply-To: <CAJCc8Oz8+Yqww7yAJduS8-mvRCNG8-P47ew-xcJPcCmaCe-Maw@mail.gmail.com>
On 08/29/2017 10:10 AM, Kay Zheng wrote:
> I tried building a simple skeleton Android app against the master
> branch, targeting Android API level 21 (Android 5.0). The compilation
> went well, but there's this ambiguous error when classes are being
> transformed to dex files:
>
> Uncaught translation error: com.android.dx.cf.code.SimException:
> local variable type mismatch: attempt to set or access a value of type
> int using a local variable of type gnu.mapping.CallContext. This is
> symptomatic of .class transformation tools that ignore local variable
> information.
Hm. It would be helpful if the error message would say what class and
method it were complaining about.
A work-around for Java code would be to Compile with -g:lines (-g:none) to
suppress of the LocalVariableTable attribute, since that is what dex seems
to be complaining about. Unfortunately, Kawa doesn't have a comparable option
for Scheme code. It shouldn't be hard to add.
> And the content of kawa-javacflags.patch:
>
> $ cat kawa-javacflags.patch
> diff --git a/Makefile.am b/Makefile.am
> index da9e490..a0df1a3 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
> | sed -e 's|./||' | sort > $@
>
> kawa/Version.class: kawa/Version.java
> - $(JAVAC) -d . $^
> + $(JAVAC) -d . $(JAVACFLAGS) $^
>
> gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
> - $(JAVAC) -d . $^
> + $(JAVAC) -d . $(JAVACFLAGS) $^
>
> JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
> $(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
> $(PREPROCESS_AWT)
Thanks - I fixed this in my sources. I'll check it in after I've tested it.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2017-08-29 18:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 17:10 Kay Zheng
2017-08-29 17:13 ` Sonny To
2017-08-29 17:31 ` Kay Zheng
2017-08-29 18:02 ` Per Bothner [this message]
2017-08-29 20:13 ` Kay Zheng
2017-08-29 20:31 ` Per Bothner
2017-08-30 0:39 ` Per Bothner
[not found] ` <CAJCc8OyZ-D4=zB-u6=V108F+=_ZauWw56L2ZzZBvVy8u67qVaQ@mail.gmail.com>
2017-08-30 5:34 ` Kay Zheng
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=f365bd02-77c6-220e-edb3-87d7b9a813cf@bothner.com \
--to=per@bothner.com \
--cc=kawa@sourceware.org \
--cc=l04m33@gmail.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).