python-javabridge icon indicating copy to clipboard operation
python-javabridge copied to clipboard

Can't install on M1 Mac, Python 3.9

Open bethac07 opened this issue 1 year ago • 1 comments

Stack trace below, for both Cython 3 and 0.29.37

Cython3

pip install python-javabridge
Collecting python-javabridge
  Using cached python-javabridge-4.0.3.tar.gz (1.3 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.20.1 in /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages (from python-javabridge) (1.26.4)
Building wheels for collected packages: python-javabridge
  Building wheel for python-javabridge (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [86 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/locate.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/noseplugin.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_cpython.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_javabridge.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/rhino-1.7R4.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/runnablequeue.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/cpython.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/test.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/libjava2cpython.jnilib -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      running build_ext
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-x44thk71/python-javabridge_a7ab182562424921b9e8cbccc45e2b2c/java/org/cellprofiler/runnablequeue/RunnableQueue.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-x44thk71/python-javabridge_a7ab182562424921b9e8cbccc45e2b2c/java/org/cellprofiler/javabridge/test/RealRect.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-x44thk71/python-javabridge_a7ab182562424921b9e8cbccc45e2b2c/java/org/cellprofiler/javabridge/CPython.java /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-x44thk71/python-javabridge_a7ab182562424921b9e8cbccc45e2b2c/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      Note: /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-x44thk71/python-javabridge_a7ab182562424921b9e8cbccc45e2b2c/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java uses unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      4 warnings
      building 'javabridge._javabridge' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include/darwin -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include/python3.9 -c _javabridge.c -o build/temp.macosx-11.0-arm64-cpython-39/_javabridge.o
      In file included from _javabridge.c:610:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929:
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      _javabridge.c:5225:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5516:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5749:37: warning: cast to smaller integer type 'int' from 'jclass' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6115:41: warning: cast to smaller integer type 'int' from 'jmethodID' (aka 'struct _jmethodID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6403:41: warning: cast to smaller integer type 'int' from 'jfieldID' (aka 'struct _jfieldID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:21144:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:21278:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:30352:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
        import_array();
        ^~~~~~~~~~~~~~
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/__multiarray_api.h:1558:151: note: expanded from macro 'import_array'
      #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                            ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
      #  define NULL ((void*)0)
                     ^~~~~~~~~~
      8 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-javabridge
  Running setup.py clean for python-javabridge
Failed to build python-javabridge
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (python-javabridge)

Cython 0.29.37

pip install python-javabridge                                                     
Collecting python-javabridge
  Using cached python-javabridge-4.0.3.tar.gz (1.3 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.20.1 in /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages (from python-javabridge) (1.22.4)
Building wheels for collected packages: python-javabridge
  Building wheel for python-javabridge (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [86 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/locate.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/noseplugin.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_cpython.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_javabridge.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/rhino-1.7R4.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/runnablequeue.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/cpython.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/test.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/libjava2cpython.jnilib -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      running build_ext
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-qo16oce6/python-javabridge_f6ded621593c4b8da30e984049ba634c/java/org/cellprofiler/runnablequeue/RunnableQueue.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-qo16oce6/python-javabridge_f6ded621593c4b8da30e984049ba634c/java/org/cellprofiler/javabridge/test/RealRect.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-qo16oce6/python-javabridge_f6ded621593c4b8da30e984049ba634c/java/org/cellprofiler/javabridge/CPython.java /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-qo16oce6/python-javabridge_f6ded621593c4b8da30e984049ba634c/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      Note: /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-install-qo16oce6/python-javabridge_f6ded621593c4b8da30e984049ba634c/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java uses unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      4 warnings
      building 'javabridge._javabridge' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include/darwin -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include/python3.9 -c _javabridge.c -o build/temp.macosx-11.0-arm64-cpython-39/_javabridge.o
      In file included from _javabridge.c:610:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1960:
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      _javabridge.c:5225:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5516:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5749:37: warning: cast to smaller integer type 'int' from 'jclass' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6115:41: warning: cast to smaller integer type 'int' from 'jmethodID' (aka 'struct _jmethodID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6403:41: warning: cast to smaller integer type 'int' from 'jfieldID' (aka 'struct _jfieldID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:21144:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:21278:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:30352:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
        import_array();
        ^~~~~~~~~~~~~~
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/__multiarray_api.h:1545:151: note: expanded from macro 'import_array'
      #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                            ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
      #  define NULL ((void*)0)
                     ^~~~~~~~~~
      8 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-javabridge
  Running setup.py clean for python-javabridge
Failed to build python-javabridge
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (python-javabridge)

Just for funsies, with version that incorporates all of Lee's newer changes (which I apologize, I didn't actually mean to pull, just do a PR to pull, but whoops)

pip install git+https://github.com/CellProfiler/python-javabridge.git             
Collecting git+https://github.com/CellProfiler/python-javabridge.git
  Cloning https://github.com/CellProfiler/python-javabridge.git to /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t
  Running command git clone --filter=blob:none --quiet https://github.com/CellProfiler/python-javabridge.git /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t
  Resolved https://github.com/CellProfiler/python-javabridge.git to commit 79c1a9169d747572c0fcdfa43b0778a54cf4c0ca
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.20.1 in /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages (from python-javabridge==4.0.3) (1.22.4)
Building wheels for collected packages: python-javabridge
  Building wheel for python-javabridge (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [106 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/locate.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      copying javabridge/noseplugin.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_cpython.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_javabridge.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_jutil.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      copying javabridge/tests/test_wrappers.py -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/tests
      creating build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      copying javabridge/jars/rhino-1.7R4.jar -> build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars
      running build_ext
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java/org/cellprofiler/runnablequeue/RunnableQueue.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      jar cf /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars/runnablequeue.jar -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/runnablequeue/RunnableQueue.class -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/runnablequeue/RunnableQueue$1.class
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java/org/cellprofiler/javabridge/test/RealRect.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      4 warnings
      jar cf /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars/test.jar -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/test/RealRect.class
      javac -source 8 -target 8 /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java/org/cellprofiler/javabridge/CPython.java /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java
      warning: [options] bootstrap class path not set in conjunction with -source 8
      warning: [options] source value 8 is obsolete and will be removed in a future release
      warning: [options] target value 8 is obsolete and will be removed in a future release
      warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
      Note: /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java/org/cellprofiler/javabridge/CPythonInvocationHandler.java uses unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      4 warnings
      jar cf /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/build/lib.macosx-11.0-arm64-cpython-39/javabridge/jars/cpython.jar -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/CPythonInvocationHandler.class -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/CPython.class -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/CPython$WrappedException.class -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/CPython$StackFrame.class -C /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/java org/cellprofiler/javabridge/CPythonInvocationHandler.class
      warning: _javabridge_osspecific.pxd:12:4: 'JavaVMOption' redeclared
      warning: _javabridge_osspecific.pxd:19:4: 'JavaVMInitArgs' redeclared
      warning: _javabridge.pyx:94:4: 'jvalue' redeclared
      warning: _javabridge.pyx:112:4: 'JavaVMOption' redeclared
      warning: _javabridge.pyx:119:4: 'JavaVMInitArgs' redeclared
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/_javabridge_mac.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)
      warning: _javabridge_osspecific.pxd:12:4: 'JavaVMOption' redeclared
      warning: _javabridge_osspecific.pxd:19:4: 'JavaVMInitArgs' redeclared
      warning: _javabridge_mac.pyx:4:4: 'jint' redeclared
      warning: _javabridge_mac.pyx:5:4: 'jboolean' redeclared
      warning: _javabridge_mac.pyx:9:4: 'JavaVM' redeclared
      warning: _javabridge_mac.pyx:14:4: 'JavaVMOption' redeclared
      warning: _javabridge_mac.pyx:21:4: 'JavaVMInitArgs' redeclared
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/8t/hj0jrcld7sjbfvg6svqpwggr0000gq/T/pip-req-build-_gsi1r9t/_javabridge_nomac.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)
      warning: _javabridge_nomac.pxd:15:4: 'JavaVMInitArgs' redeclared
      warning: _javabridge_nomac.pxd:20:4: 'JavaVMOption' redeclared
      warning: _javabridge_nomac.pyx:4:4: 'jint' redeclared
      warning: _javabridge_nomac.pyx:5:4: 'jboolean' redeclared
      warning: _javabridge_nomac.pyx:9:4: 'JavaVM' redeclared
      building 'javabridge._javabridge' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include -arch arm64 -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/include/darwin -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/include/python3.9 -c _javabridge.c -o build/temp.macosx-11.0-arm64-cpython-39/_javabridge.o
      In file included from _javabridge.c:752:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
      In file included from /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1960:
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      _javabridge.c:5385:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5676:37: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:5909:37: warning: cast to smaller integer type 'int' from 'jclass' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
                                          ^~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6275:41: warning: cast to smaller integer type 'int' from 'jmethodID' (aka 'struct _jmethodID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:6563:41: warning: cast to smaller integer type 'int' from 'jfieldID' (aka 'struct _jfieldID *') [-Wpointer-to-int-cast]
        __pyx_t_4 = __Pyx_PyUnicode_From_int(((int)__pyx_v_self->id), 0, ' ', 'x'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
                                              ^~~~~~~~~~~~~~~~~~~~~
      _javabridge.c:21304:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:21438:18: warning: cast to smaller integer type 'int' from 'jobject' (aka 'struct _jobject *') [-Wpointer-to-int-cast]
        __pyx_t_1 = ((((int)__pyx_v_s->o) == 0) != 0);
                       ^~~~~~~~~~~~~~~~~
      _javabridge.c:29042:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
        import_array();
        ^~~~~~~~~~~~~~
      /opt/homebrew/Caskroom/mambaforge/base/envs/cellprofiler_ilastik/lib/python3.9/site-packages/numpy/core/include/numpy/__multiarray_api.h:1545:151: note: expanded from macro 'import_array'
      #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                            ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
      #  define NULL ((void*)0)
                     ^~~~~~~~~~
      8 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-javabridge
  Running setup.py clean for python-javabridge
Failed to build python-javabridge
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (python-javabridge)

bethac07 avatar Sep 02 '24 13:09 bethac07

(not currently showstopping for me personally, but based on traffic here and in Lee's repo, might not just be a me issue. LMK if stuff I can do to help out with testing - already tried a couple different cython versions, numpy versions (pre-2), with and without --use-pep517, but I confess I don't know if I got a full matrix of those.)

bethac07 avatar Sep 02 '24 13:09 bethac07