From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69407 invoked by alias); 29 Aug 2017 18:02:11 -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 69238 invoked by uid 89); 29 Aug 2017 18:02:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=comparable, complaining, Scheme, Hx-languages-length:1832 X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Aug 2017 18:01:57 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dmkpm-0001Vy-7f; Tue, 29 Aug 2017 20:01:54 +0200 Received: from 70-36-239-209.dsl.dynamic.fusionbroadband.com ([70.36.239.209] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1dmkpg-0006hE-5o; Tue, 29 Aug 2017 20:01:48 +0200 Subject: Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex To: Kay Zheng , Kawa mailing list References: From: Per Bothner Message-ID: Date: Tue, 29 Aug 2017 18:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00011.txt.bz2 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/