From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89395 invoked by alias); 18 Jan 2017 06:51:04 -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 89377 invoked by uid 89); 18 Jan 2017 06:51:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,KAM_BADIPHTTP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT autolearn=no version=3.3.2 spammy=swing, Getting, 1297, Swing 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; Wed, 18 Jan 2017 06:50:53 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cTk4z-0000h7-Tb; Wed, 18 Jan 2017 07:50:45 +0100 Received: from 76-9-64-11-rt-broadband-00.broadband.oakhurst.sti.net ([76.9.64.11] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1cTk4w-0003QT-Bb; Wed, 18 Jan 2017 07:50:42 +0100 Subject: Re: Getting kawa -w to work on OS X To: Duncan Mak , kawa mailing list References: From: Per Bothner Message-ID: Date: Wed, 18 Jan 2017 06:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------B4C5E5A2C9E17C1C25B9E28F" X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00024.txt.bz2 This is a multi-part message in MIME format. --------------B4C5E5A2C9E17C1C25B9E28F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1845 On 01/17/2017 10:16 PM, Duncan Mak wrote: > Hello Per, > > I just tried building kawa from source (using a checkout from the > gitlab repo) and "kawa -w" works if I build it locally. > > Running it from the official binary distribution fails > (https://github.com/Homebrew/homebrew-core/pull/8301#issuecomment-273030690) > - this means there's something system-dependent that got baked into > the JAR file? My guess is the "system dependency" is DomTerm and/or JLine. If you build from source, if you don't specify the configure flags --with-domterm and/or --with-jline3 then -w will be equivalent to -wswing - it won't try to use any of the DomTerm console variations. However, the binary distribution includes both, so -w will try to use Domterm (and jline) and fail. The old Swing console works, but it has some basic problems, specifically rather limited input editing. You can use the DomTerm and JLine from the binary distribution to build the source distribution: ./configure --with-domterm=/tmp/kawa-2.3 --with-jline3=/tmp/kawa-2.3/lib/jline.jar assuming you unziped kawa-2.3.zip into /tmp You can also try the attached patch. You're supposed to see something like: $ bin/kawa -w java.lang.Error: setCurL:kawa.standard.Scheme@1a86f2f1 th:Thread[main,5,main] p1:#|kawa:%N|# p2:#|%P.%N|# at gnu.expr.Language.setCurrentLanguage(Language.java:55) at gnu.expr.Language.setDefaults(Language.java:1206) at kawa.repl.getLanguage(repl.java:227) at kawa.repl.processArgs(repl.java:383) at kawa.repl.main(repl.java:820) Started web server on port 46315. Browse http://127.0.0.1:46315/ java.lang.Error: DomTerm.run th:Thread[Thread-9,5,main] p1:#|kawa:%N|# p2:#|%P.%N|# at kawa.DomTermBackend.run(DomTermBackend.java:132) at java.lang.Thread.run(Thread.java:745) -- --Per Bothner per@bothner.com http://per.bothner.com/ --------------B4C5E5A2C9E17C1C25B9E28F Content-Type: text/x-patch; name="kawa1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kawa1.patch" Content-length: 1229 diff --git a/gnu/expr/Language.java b/gnu/expr/Language.java index 0447af9..2bd0663 100644 --- a/gnu/expr/Language.java +++ b/gnu/expr/Language.java @@ -52,6 +52,7 @@ public abstract class Language CheckConsole.prompt1.set(language.getPrimaryPrompt()); if (CheckConsole.prompt2.get(null) == null) CheckConsole.prompt2.set(language.getSecondaryPrompt()); + new Error("setCurL:"+language+" th:"+Thread.currentThread()+" p1:"+CheckConsole.prompt1.get(null)+" p2:"+CheckConsole.prompt2.get(null)).printStackTrace(); } public static Language setSaveCurrent (Language language) diff --git a/kawa/DomTermBackend.java b/kawa/DomTermBackend.java index feb4f81..0492b0b 100644 --- a/kawa/DomTermBackend.java +++ b/kawa/DomTermBackend.java @@ -129,6 +129,7 @@ public class DomTermBackend extends Backend implements Runnable { } public void run() { + new Error("DomTerm.run th:"+Thread.currentThread()+" p1:"+CheckConsole.prompt1.get(null)+" p2:"+CheckConsole.prompt2.get(null)).printStackTrace(); Writer errWriter = new DomTermErrorWriter(termWriter); OutPort outp = new OutPort(termWriter, true, true, Path.valueOf("/dev/stdout")); --------------B4C5E5A2C9E17C1C25B9E28F--