isarandi / rlemasklib

Manipulate run-length encoded image masks
Other
6 stars 4 forks source link

Install on MacOS fails with latest changes #2

Closed Jendker closed 1 month ago

Jendker commented 1 month ago

With changes introduced in the latest commit 2240b442133cbc9e27de95e947e2dbb85104347d the installation fails on MacOS:

 Building wheel for rlemasklib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for rlemasklib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.1-arm64-cpython-310
      creating build/lib.macosx-11.1-arm64-cpython-310/rlemasklib
      copying rlemasklib/__init__.py -> build/lib.macosx-11.1-arm64-cpython-310/rlemasklib
      copying rlemasklib/rlemasklib.py -> build/lib.macosx-11.1-arm64-cpython-310/rlemasklib
      running build_ext
      Compiling rlemasklib/rlemasklib_cython.pyx because it changed.
      [1/1] Cythonizing rlemasklib/rlemasklib_cython.pyx
      building 'rlemasklib.rlemasklib_cython' extension
      creating build/temp.macosx-11.1-arm64-cpython-310
      creating build/temp.macosx-11.1-arm64-cpython-310/rlemasklib
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Volumes/Samsung_980/conda_envs/my_repo/include -arch arm64 -fPIC -O2 -isystem /Volumes/Samsung_980/conda_envs/my_repo/include -arch arm64 -I/private/var/folders/mm/2_ms63v900b255cbg337q7200000gn/T/pip-build-env-looog6a_/overlay/lib/python3.10/site-packages/numpy/core/include -Irlemasklib -I/Volumes/Samsung_980/conda_envs/my_repo/include/python3.10 -c rlemasklib/rlemasklib.c -o build/temp.macosx-11.1-arm64-cpython-310/rlemasklib/rlemasklib.o -Wno-cpp -Wno-unused-function -std=c99
      rlemasklib/rlemasklib.c:618:9: warning: variable 'r' set but not used [-Wunused-but-set-variable]
          siz r = cnts[0];
              ^
      rlemasklib/rlemasklib.c:1194:5: error: void function 'rleFrString' should not return a value [-Wreturn-type]
          return 0;
          ^      ~
      1 warning 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 rlemasklib
  Building wheel for simplepyutils (setup.py) ... done
  Created wheel for simplepyutils: filename=simplepyutils-0.1.2-py3-none-any.whl size=10285 sha256=49da63fed49fd2cafefb1297482b4135fdd5fff59a3b6b45a533822bbddf0527
  Stored in directory: /private/var/folders/mm/2_ms63v900b255cbg337q7200000gn/T/pip-ephem-wheel-cache-jayeve0g/wheels/9a/75/8a/cf51c29145eae1446a6232acfcd283633580a576e6c2df16d0
  Building wheel for poseviz (setup.py) ... done
  Created wheel for poseviz: filename=poseviz-0.1.7-py3-none-any.whl size=18576 sha256=99d98beb0935a171b283cedc6533ce2304828ba6cf23e9f53d461f651fa2ecdd
  Stored in directory: /private/var/folders/mm/2_ms63v900b255cbg337q7200000gn/T/pip-ephem-wheel-cache-jayeve0g/wheels/b0/be/46/ecf1b42f10174d3856c9d34cb366c522b05fd7e15b87aea8a2
Failed to build rlemasklib
ERROR: Could not build wheels for rlemasklib, which is required to install

Do you have an idea how that can be fixed? For now I'll stick to older version of the package.

Jendker commented 1 month ago

It was actually very easy, the error is surprisingly well described. Can you have a look at https://github.com/isarandi/rlemasklib/pull/3 ? Thank you.

isarandi commented 1 month ago

Thanks, I'll push some more fixes very soon.

isarandi commented 1 month ago

Fixed.