public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marko Dimjašević" <marko@dimjasevic.net>
To: Andrew Haley <aph@redhat.com>
Cc: java-patches@gcc.gnu.org
Subject: Re: Compiling Scala-generated bytecode
Date: Mon, 20 Oct 2014 13:50:00 -0000	[thread overview]
Message-ID: <1413813034.4798.20.camel@neelix> (raw)
In-Reply-To: <5444C1F9.7060306@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

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 <built-in>: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?


-- 
Regards,
Marko
http://dimjasevic.net/marko


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-10-20 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  6:19 Marko Dimjašević
2014-10-20  8:04 ` Andrew Haley
2014-10-20 13:50   ` Marko Dimjašević [this message]
2014-10-20 21:46     ` Andrew Hughes
2014-10-20 21:51       ` Marko Dimjašević

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=1413813034.4798.20.camel@neelix \
    --to=marko@dimjasevic.net \
    --cc=aph@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    /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).