chsh2 / nijiGPen

An add-on of Blender focusing on Grease Pencil
GNU General Public License v3.0
241 stars 12 forks source link

macOS module triangle install issue #34

Open enzyme69 opened 9 months ago

enzyme69 commented 9 months ago
  Running setup.py install for triangle: started

  Running setup.py install for triangle: finished with status 'error'

  error: subprocess-exited-with-error

  × Running setup.py install for triangle did not run successfully.
  │ exit code: 1
  ╰─> [109 lines of output]
      running install
      /Applications/Blender 40 beta/Blender.app/Contents/Resources/4.0/python/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.00-arm64-cpython-310
      creating build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/plot.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/version.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/__init__.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/tri.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/core1_run.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      copying triangle/data.py -> build/lib.macosx-11.00-arm64-cpython-310/triangle
      creating build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/dots.1.v.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.r.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/bbox.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/face.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/greenland.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex3.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/diamond_02_00009.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.q.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/diamond_02_00009.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.2.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/dots.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.4.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/square_circle_hole.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.2.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/diamond_02_00009.1.v.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.3.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/A.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/ell.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex3.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/la.1.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.2.node -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.2.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/square_circle_hole.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/greenland.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.q.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/face.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex3.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/spiral.r.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/ell.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/A.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.2.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.2.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.3.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/la.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/diamond_02_00009.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.4.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/bbox.1.ele -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/face.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/square_circle_hole.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/A.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex3.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/la.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.4.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex2.2.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.2.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.2.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/la.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/A.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/face.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/box.3.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/double_hex3.1.poly -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/bbox.1.area -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/diamond_02_00009.1.v.edge -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      copying triangle/data/dots.1.v.edge -> build/lib.macosx-11.00-arm64-cpython-310/triangle/data
      running build_ext
      building 'triangle.core' extension
      creating build/temp.macosx-11.00-arm64-cpython-310
      creating build/temp.macosx-11.00-arm64-cpython-310/c
      creating build/temp.macosx-11.00-arm64-cpython-310/triangle
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include -I/Users/brecht/dev/build_darwin/deps/Release/zlib/include -mmacosx-version-min=11.00 -arch arm64 -mmacosx-version-min=11.00 -arch arm64 -DVOID=void -DREAL=double -DNO_TIMER=1 -DTRILIBRARY=1 -DANSI_DECLARATORS=1 -Ic -I/Users/brecht/dev/build_darwin/deps/Release/python/include/python3.10 -c c/triangle.c -o build/temp.macosx-11.00-arm64-cpython-310/c/triangle.o
      c/triangle.c:3956:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        if (alignment > sizeof(VOID *)) {
            ~~~~~~~~~ ^ ~~~~~~~~~~~~~~
      c/triangle.c:4356:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            (trisize < 6 * sizeof(triangle) + sizeof(int))) {
             ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      c/triangle.c:14542:8: warning: variable 'elementnumber' set but not used [-Wunused-but-set-variable]
        long elementnumber;
             ^
      c/triangle.c:14993:21: warning: variable 'vedgenumber' set but not used [-Wunused-but-set-variable]
        long vnodenumber, vedgenumber;
                          ^
      4 warnings generated.
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include -I/Users/brecht/dev/build_darwin/deps/Release/zlib/include -mmacosx-version-min=11.00 -arch arm64 -mmacosx-version-min=11.00 -arch arm64 -DVOID=void -DREAL=double -DNO_TIMER=1 -DTRILIBRARY=1 -DANSI_DECLARATORS=1 -Ic -I/Users/brecht/dev/build_darwin/deps/Release/python/include/python3.10 -c triangle/core.c -o build/temp.macosx-11.00-arm64-cpython-310/triangle/core.o
      triangle/core.c:4:10: fatal error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> triangle

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip is available: 23.0.1 -> 23.3.1
[notice] To update, run: /Applications/Blender 40 beta/Blender.app/Contents/Resources/4.0/python/bin/python3.10 -m pip install --upgrade pip
Error: Cannot install the required package.
chsh2 commented 9 months ago

The situation remains the same as in your previous issue (#21). triangle cannot be installed in computers with Apple silicon. However, now the add-on can work without it. Only one option in the mesh generation operator will become unavailable. You can just ignore it.

I also created a document page for more detailed information: https://chsh2.github.io/nijigp/docs/get_started/installation/dependency/#impact-of-operating-systems

chsh2 commented 8 months ago

A developer proposed a solution (https://github.com/drufat/triangle/pull/75) to compile triangle for Apple Silicon, but it has not been merged yet. I tried to fork the repository to use it in NijiGPen.

Now it should become possible to install triangle for MacOS in the latest version v0.8.1, but I do not have a machine to test it myself. Can you tell me whether it works or not, if you plan to switch to the new version? Thanks.