From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19857 invoked by alias); 20 Oct 2014 21:46:22 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 19845 invoked by uid 89); 20 Oct 2014 21:46:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx4-phx2.redhat.com Received: from mx4-phx2.redhat.com (HELO mx4-phx2.redhat.com) (209.132.183.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 20 Oct 2014 21:46:19 +0000 Received: from zmail17.collab.prod.int.phx2.redhat.com (zmail17.collab.prod.int.phx2.redhat.com [10.5.83.19]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s9KLkF2R024373; Mon, 20 Oct 2014 17:46:15 -0400 Date: Mon, 20 Oct 2014 21:46:00 -0000 From: Andrew Hughes To: Marko =?utf-8?Q?Dimja=C5=A1evi=C4=87?= Cc: Andrew Haley , java-patches@gcc.gnu.org Message-ID: <962977923.12239202.1413841573304.JavaMail.zimbra@redhat.com> In-Reply-To: <1413813034.4798.20.camel@neelix> References: <1413785951.4798.12.camel@neelix> <5444C1F9.7060306@redhat.com> <1413813034.4798.20.camel@neelix> Subject: Re: Compiling Scala-generated bytecode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-q4/txt/msg00025.txt.bz2 ----- Original Message ----- > On Mon, 2014-10-20 at 09:04 +0100, Andrew Haley wrote: > > > You have to link with the Scala library, either directly or indirectly. > > You will want to compile the library to a shared object. > > That's what I thought. > > > > Before explaining any more, do you have experience with shared > > libraries in C and C++? > > Just a tiny bit. > > As far as my understanding goes, I'd first create a shared library with > something like this: > > gcj -fPIC /usr/share/java/scala-library.jar -shared -o scala-library.so > > and then when compiling a Scala program, I'd say: > > gcj --classpath=.:/usr/share/java/scala-library.jar HelloWorld*.class > scala-library.so > > But I haven't managed to create the shared library. When I attempt to > run the first command, I get something like: > > scala/collection/immutable/StringLike.scala: In class > 'scala.collection.immutable.StringLike$class': > scala/collection/immutable/StringLike.scala: In method > 'scala.collection.immutable.StringLike > $class.replaceAllLiterally(scala.collection.immutable.StringLike,java.lang.String,java.lang.String)': > In file included from scala/collection/immutable/StringLike.scala:28:0, > from scala/collection/immutable/StringLike.scala:190, > from scala/collection/immutable/StringLike.scala:142, > ... > from scala/AnyVal.scala:7, > from :3: > scala/collection/immutable/StringLike.scala:174:0: error: class > 'java.util.regex.Pattern' has no method named 'quote' matching signature > '(Ljava/lang/String;)Ljava/lang/String;' > In file included from scala/collection/immutable/StringLike.scala:28:0, > from scala/collection/immutable/StringLike.scala:190, > from scala/collection/immutable/StringLike.scala:142, > ... > > > Can you please tell me how to get the shared library? > Which version of gcj are you using? This one looks to be too old to include the Pattern.quote(String) method needed by Scala. > > -- > Regards, > Marko > http://dimjasevic.net/marko > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07