Skip to content

Use of newer Java methods fail on Android #2982

@donv

Description

@donv

Hi!

I have made a branch for not loading the IR compiler when setting compile mode OFF (or truffle).

https://github.com/jruby/jruby/tree/test-optional_compiler

It seems to do the job, but when running JRuby 9000 master on Android (Ruboto), I get an error in Kernel#puts:

https://gist.github.com/donv/9896b7c3890d34726efa

The source for the failing line is here:

https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/os/LoggingPrintStream.java#L64

I have not found exactly how it fails, but my guess is that LoggingPrintStream implements all known methods for PrintStream for Java 6, but JRuby 9K uses a method for Java 7 or later that then falls through to OutputStream#write which throws an AssertionError.

My guess it is

org.jruby.util.io.PosixShim.write(PosixShim.java:92)

I guess JRuby can be made to have different behaviour under Android...

Any help with this is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions