Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: JNI binding for zactor not generated #1443

Closed
lsgro opened this issue May 11, 2016 · 3 comments
Closed

Problem: JNI binding for zactor not generated #1443

lsgro opened this issue May 11, 2016 · 3 comments

Comments

@lsgro
Copy link

lsgro commented May 11, 2016

luigi@aczglug01:~/src/czmq$ gsl -target:java project.xml
GSL/4.1c Copyright (c) 1996-2016 iMatix Corporation
gsl/4 I: Processing project.xml...
gsl/4 M: Building Java JNI binding (java)

luigi@aczglug01:~/src/czmq$ find bindings/jni/src/main -name \*.java
bindings/jni/src/main/java/org/zeromq/czmq/Zdigest.java
bindings/jni/src/main/java/org/zeromq/czmq/Zdir.java
bindings/jni/src/main/java/org/zeromq/czmq/ZdirPatch.java
bindings/jni/src/main/java/org/zeromq/czmq/Zchunk.java
bindings/jni/src/main/java/org/zeromq/czmq/Zlist.java
bindings/jni/src/main/java/org/zeromq/czmq/Ztrie.java
bindings/jni/src/main/java/org/zeromq/czmq/Zuuid.java
bindings/jni/src/main/java/org/zeromq/czmq/Zconfig.java
bindings/jni/src/main/java/org/zeromq/czmq/Zframe.java
bindings/jni/src/main/java/org/zeromq/czmq/Zproc.java
bindings/jni/src/main/java/org/zeromq/czmq/Zhashx.java
bindings/jni/src/main/java/org/zeromq/czmq/Zlistx.java
bindings/jni/src/main/java/org/zeromq/czmq/Zfile.java
bindings/jni/src/main/java/org/zeromq/czmq/Zstr.java
bindings/jni/src/main/java/org/zeromq/czmq/Zhash.java
bindings/jni/src/main/java/org/zeromq/czmq/Zmsg.java
bindings/jni/src/main/java/org/zeromq/czmq/Zsock.java
bindings/jni/src/main/java/org/zeromq/czmq/Zcertstore.java
bindings/jni/src/main/java/org/zeromq/czmq/Zclock.java
bindings/jni/src/main/java/org/zeromq/czmq/Zpoller.java
bindings/jni/src/main/java/org/zeromq/czmq/Ztimerset.java
bindings/jni/src/main/java/org/zeromq/czmq/Ziflist.java
bindings/jni/src/main/java/org/zeromq/czmq/Zarmour.java
bindings/jni/src/main/java/org/zeromq/czmq/Zcert.java
bindings/jni/src/main/java/org/zeromq/czmq/Zloop.java

This is preventing from compiling the JNI bindings for malamute, since they refer to the Zactor class:

luigi@aczglug01:~/src/malamute/bindings/jni$ gradle build
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/luigi/src/malamute/bindings/jni/src/main/java/org/zeromq/mlm/MlmClient.java:46: error: cannot find symbol
    public Zactor actor () {
           ^
  symbol:   class Zactor
  location: class MlmClient
/home/luigi/src/malamute/bindings/jni/src/main/java/org/zeromq/mlm/MlmClient.java:47: error: cannot find symbol
        return new Zactor (__actor (self));
                   ^
  symbol:   class Zactor
  location: class MlmClient
2 errors
1 warning
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.982 secs
@lsgro lsgro changed the title Problem: JNI bindings not generated Problem: JNI binding for zactor not generated May 11, 2016
@bluca
Copy link
Member

bluca commented Jan 1, 2017

The problem is that the JNI binding generator can't handle with callbacks as parameters:

https://github.com/zeromq/zproject/blob/master/zproject_java_lib.gsl#L156

        if resolve_container (argument) = 1
            my.method.okay = 0
            #echo "Skipping $(class.name).$(my.method.name) - can't deal with argument type $(argument.type)"

So the class is skipped given the constructor can't be generated.

@sappo @asokoloski any idea how to fix this?

@sappo
Copy link
Member

sappo commented Jan 2, 2017

@bluca This requires somebody with deep JNI knowledge. I sadly don't have a clue how to fix it nor have the time to investigate it.

@bluca
Copy link
Member

bluca commented Jan 2, 2017

Ok, thanks. Given it's a zproject problem I've opened an issue there: zeromq/zproject#776
And I'll close this one as we can't fix it in CZMQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants