public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Sonny To <son.c.to@gmail.com>
To: Kay Zheng <l04m33@gmail.com>
Cc: Per Bothner <per@bothner.com>, Kawa mailing list <kawa@sourceware.org>
Subject: Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
Date: Tue, 29 Aug 2017 17:13:00 -0000	[thread overview]
Message-ID: <CAJxjsJscZFWmZFM9950ivA2OOKQ8DiuXgCHZBqzNzrzDwdAtiw@mail.gmail.com> (raw)
In-Reply-To: <CAJCc8Oz8+Yqww7yAJduS8-mvRCNG8-P47ew-xcJPcCmaCe-Maw@mail.gmail.com>

try using jdk 1.7
i had strange errors too when i compiled for jdk1.8

On Tue, Aug 29, 2017 at 8:10 PM, Kay Zheng <l04m33@gmail.com> wrote:
> Hi Per,
>
> 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.
>
> I don't really understand this error message, but since
> gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
> mailing list.
>
> The source code for the skeleton app is on
> https://github.com/l04m33/KawaAndroidTemplate
>
> And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
> 8 instead, thus the explicit JAVACFLAGS):
>
>     $ cat rebuild-kawa-latest-android.sh
>     #!/bin/sh
>
>     cd ./Kawa-latest-android
>
>     if [ -f 'Makefile' ]; then
>         make clean
>         make distclean
>     fi
>
>     git checkout -- .
>     git apply ../kawa-javacflags.patch
>
>     ./autogen.sh
>     export JAVACFLAGS="-g -source 1.6 -target 1.6"
>     ./configure
> --with-android=/home/user/android_sdk/platforms/android-21/android.jar
> \
>                 --disable-xquery \
>                 --disable-jemacs \
>                 --with-java-source=6
>     make
>
> 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)
>
> P.S.: I think this is an separate issue with hairy details, so I made
> a new thread.
>
> Regards,
> Kay Z.

  reply	other threads:[~2017-08-29 17:13 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 [this message]
2017-08-29 17:31   ` Kay Zheng
2017-08-29 18:02 ` Per Bothner
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=CAJxjsJscZFWmZFM9950ivA2OOKQ8DiuXgCHZBqzNzrzDwdAtiw@mail.gmail.com \
    --to=son.c.to@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=l04m33@gmail.com \
    --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).