From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72525 invoked by alias); 29 Aug 2017 17:13:06 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 72516 invoked by uid 89); 29 Aug 2017 17:13:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:10.28.6.1 X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Aug 2017 17:12:55 +0000 Received: by mail-wm0-f53.google.com with SMTP id t201so1703910wmt.1 for ; Tue, 29 Aug 2017 10:12:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=o8ViNNJzsr2c6rUcHjitD0pYnnOobJToKlhhf6xGoyM=; b=NYL0heD1YNChnlWEYDpq0ar/uOM7rvzw8DiNx5i52vBMQm5rw3eElfRPb3SyMQPIem gKITQ6woWv8vpspvPqDfzo56TFd0JxA3Nsy0z+eU8nE/yIwQwps2dCcjvKh3NKwJYyO6 K7vB+U64WYK5lOdBY8Z7+NrkaRiyxKB8bdZ1moCVuMVZm4LiDOsiGOuBYULO23d8Z/Fb HJjlrTwKZghnV4tZvF2RnSIM0+uZLlecupPvKrVUdc+MUJPKdd4nSDOZBk9MW1l0bE+a YRZYj/a+CQU5j4wjVXJfBihQTBLWeWebOYeWI2FNvaLEWtr34iWS/jcktrGNgYT03MZV LFOA== X-Gm-Message-State: AHYfb5j7qpv5QabRI3DmeD2/zBJJ0kw6H+2Rf637sPxKpfSuFDI8rkgn 5QIeCH/OPo2wYsG6/HoqAy94WUqD5w== X-Received: by 10.28.6.1 with SMTP id 1mr132224wmg.114.1504026773127; Tue, 29 Aug 2017 10:12:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.151.111 with HTTP; Tue, 29 Aug 2017 10:12:52 -0700 (PDT) In-Reply-To: References: From: Sonny To Date: Tue, 29 Aug 2017 17:13:00 -0000 Message-ID: Subject: Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex To: Kay Zheng Cc: Per Bothner , Kawa mailing list Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00009.txt.bz2 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 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.