Skip to content

TVM4J: sun.misc.SharedSecrets was removed with Java >= 9 #3301

Description

@t-vi

Hi!

Thank you for TVM.

I'm following the instructions for building tvm4j, but compilation fails with

[ERROR] tvm/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Server.java:[20,16] cannot find symbol
[ERROR]   symbol:   class SharedSecrets
[ERROR]   location: package sun.misc

as far as I can tell, this function was made even more internal with Java 9+.
One solution - keeping Java 8 compat - seems to be to do to use reflection as in this example.

On stackoverflow there is a hacky solution accessing private members of the FileDescriptor.

Neither seems particularly attractive, but if you had a favourite...

Activity

  1. tqchen commented on Jun 7, 2019

    @tqchen
    Member
  2. yzhliu commented on Jun 8, 2019

    @yzhliu
    Member

    For short-term, we can go with accessing the private field. While I believe the right approach is to move server-loop to frontend bindings, i.e.,

    while (data = read(socket)) {
      call_packed_func("process_data", data);
    }

    btw, I got lost with the registry, where is tvm.rpc.server.start gets registered? @tqchen

  3. tqchen commented on Jun 13, 2019

    @tqchen
    Member

    tvm.rpc.server.start is an optional callback, perhaps a better name should be tvm.rpc.server.on_start

  4. tqchen commented on Jul 6, 2019

    @tqchen
    Member

    @yzhliu can you followup on this thread?

  5. tqchen commented on Jul 23, 2019

    @tqchen
    Member

    ping @yzhliu

  6. yzhliu commented on Jul 23, 2019

    @yzhliu
    Member

    will look into it next week.

  7. tqchen commented on Oct 8, 2019

    @tqchen
    Member

    @yzhliu what is the status of this issue?

  8. yzhliu commented on Oct 9, 2019

    @yzhliu
    Member

    @tqchen sorry for delay, I'm working on it.

  9. tqchen commented on Oct 23, 2019

    @tqchen
    Member

    fixed by #4147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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