Skip to content

pyjnius build issue #739

Open
Open
@mmadhuhasa

Description

Explain : This issue facing on creating docker build when installing requirement.txt, which as pyjnius package in it
And tried in requirement.txt with,

  1. latest pyjnius==1.6.1
  2. pip install git+https://github.com/kivy/pyjnius.git

after trying above also still getting same issue as below,

51.46 Stored in directory: /root/.cache/pip/wheels/10/98/d8/98ab8a14374c67388933f99c95800daf3787b1a82f125df9a5
51.46 Building wheel for pyjnius (pyproject.toml): started
59.62 Building wheel for pyjnius (pyproject.toml): finished with status 'error'
59.63 error: subprocess-exited-with-error
59.63
59.63 × Building wheel for pyjnius (pyproject.toml) did not run successfully.
59.63 │ exit code: 1
59.63 ╰─> [49 lines of output]
59.63 warning: [options] bootstrap class path not set in conjunction with -source 8
59.63 1 warning
59.63 running bdist_wheel
59.63 running build
59.63 running build_py
59.63 creating build/lib.linux-x86_64-cpython-310
59.63 copying jnius_config.py -> build/lib.linux-x86_64-cpython-310
59.63 copying setup_sdist.py -> build/lib.linux-x86_64-cpython-310
59.63 creating build/lib.linux-x86_64-cpython-310/jnius
59.63 copying jnius/init.py -> build/lib.linux-x86_64-cpython-310/jnius
59.63 copying jnius/env.py -> build/lib.linux-x86_64-cpython-310/jnius
59.63 copying jnius/reflect.py -> build/lib.linux-x86_64-cpython-310/jnius
59.63 copying jnius/signatures.py -> build/lib.linux-x86_64-cpython-310/jnius
59.63 creating build/lib.linux-x86_64-cpython-310/jnius/src/org/jnius
59.63 copying jnius/src/org/jnius/NativeInvocationHandler.class -> build/lib.linux-x86_64-cpython-310/jnius/src/org/jnius
59.63 copying jnius/src/org/jnius/NativeInvocationHandler.java -> build/lib.linux-x86_64-cpython-310/jnius/src/org/jnius
59.63 running build_ext
59.63 warning: jnius/jnius.pyx:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See cython/cython#4310
59.63 Compiling jnius/jnius.pyx because it changed.
59.63 [1/1] Cythonizing jnius/jnius.pyx
59.63 building 'jnius' extension
59.63 creating build/temp.linux-x86_64-cpython-310/jnius
59.63 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/lib/jvm/java-11-openjdk/include -I/usr/lib/jvm/java-11-openjdk/include/linux -I/usr/src/app/test_venv/include -I/usr/local/include/python3.10 -c jnius/jnius.c -o build/temp.linux-x86_64-cpython-310/jnius/jnius.o
59.63 jnius/jnius.c: In function '__pyx_f_5jnius_get_jnienv':
59.63 jnius/jnius.c:22591:76: error: passing argument 2 of '(*__pyx_v_5jnius_jvm)->AttachCurrentThread' from incompatible pointer type [-Wincompatible-pointer-types]
[screen is terminating]void)((__pyx_v_5jnius_jvm[0])->AttachCurrentThread(__pyx_v_5jnius_jvm, (&pyx_v_env), NULL));
[admin@xxxxxxxxx release]$ ^C ~^~~~~~~~~~~~~
[admin@xxxxxxxxx release]$ |
59.63 | const struct JNINativeInterface
***
59.63 jnius/jnius.c:22591:76: note: expected 'void **' but argument is of type 'const struct JNINativeInterface
***'
59.63 jnius/jnius.c: In function '__pyx_f_5jnius_convert_jstring_to_python':
59.63 jnius/jnius.c:31024:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
59.63 31024 | __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);
59.63 | ^
59.63 jnius/jnius.c: In function '__pyx_pf_5jnius_13MetaJavaClass_8resolve_class':
59.63 jnius/jnius.c:43742:30: error: assignment to 'jobject' {aka 'struct _jobject *'} from incompatible pointer type 'struct _jobject **' [-Wincompatible-pointer-types]
59.63 43742 | (__pyx_v_jargs[0]) = ((jobject *)__pyx_v_classLoader);
59.63 | ^
59.63 jnius/jnius.c:43751:30: error: assignment to 'jobject' {aka 'struct _jobject *'} from incompatible pointer type 'struct _jobject **' [-Wincompatible-pointer-types]
59.63 43751 | (__pyx_v_jargs[1]) = __pyx_v_interfaces;
59.63 | ^
59.63 jnius/jnius.c: In function '__pyx_f_5jnius_create_proxy_instance':
59.63 jnius/jnius.c:61464:36: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
59.63 61464 | (__pyx_v_invoke_methods[0]).name = ((char const *)"invoke0");
59.63 | ^
59.63 jnius/jnius.c:61473:41: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
59.63 61473 | (__pyx_v_invoke_methods[0]).signature = ((char const *)"(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;");
59.63 | ^
59.63 error: command '/usr/bin/gcc' failed with exit code 1
59.63 [end of output]
59.63
59.63 note: This error originates from a subprocess, and is likely not a problem with pip.
59.63 ERROR: Failed building wheel for pyjnius
59.63 Successfully built cffi greenlet pyrsistent zope.interface flask-apscheduler SQLAlchemy SQLAlchemy-Utils
59.63 Failed to build pyjnius
59.64 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyjnius)

Dockerfile:65

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions