electronstudio / raylib-python-cffi

Python CFFI bindings for Raylib
http://electronstudio.github.io/raylib-python-cffi
Eclipse Public License 2.0
142 stars 29 forks source link

[MacOS M1] installation failed #63

Closed pkulev closed 2 years ago

pkulev commented 2 years ago

Hi! It seems that package doesn't provide wheel, so pip tries to compile wrapper and then failes.

Setup

MacOS Monterey 12.3 on M1 chip (arm64).

Raylib library:

➜  tanki git:(main) ✗ brew list -v raylib
/opt/homebrew/Cellar/raylib/4.0.0/INSTALL_RECEIPT.json
/opt/homebrew/Cellar/raylib/4.0.0/LICENSE
/opt/homebrew/Cellar/raylib/4.0.0/.brew/raylib.rb
/opt/homebrew/Cellar/raylib/4.0.0/CHANGELOG
/opt/homebrew/Cellar/raylib/4.0.0/include/rlgl.h
/opt/homebrew/Cellar/raylib/4.0.0/include/raudio.h
/opt/homebrew/Cellar/raylib/4.0.0/include/raymath.h
/opt/homebrew/Cellar/raylib/4.0.0/include/raylib.h
/opt/homebrew/Cellar/raylib/4.0.0/HISTORY.md
/opt/homebrew/Cellar/raylib/4.0.0/README.md
/opt/homebrew/Cellar/raylib/4.0.0/lib/pkgconfig/raylib.pc
/opt/homebrew/Cellar/raylib/4.0.0/lib/cmake/raylib/raylib-config-version.cmake
/opt/homebrew/Cellar/raylib/4.0.0/lib/cmake/raylib/raylib-config.cmake
/opt/homebrew/Cellar/raylib/4.0.0/lib/libraylib.4.0.0.dylib
/opt/homebrew/Cellar/raylib/4.0.0/lib/libraylib.a
/opt/homebrew/Cellar/raylib/4.0.0/lib/libraylib.dylib
/opt/homebrew/Cellar/raylib/4.0.0/lib/libraylib.400.dylib

Compiler

➜  tanki git:(main) ✗ clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Python

➜  tanki git:(main) ✗ python3.9 --version
Python 3.9.12

Envronment

Clean python3.9 environment.

➜  tanki git:(main) ✗ rm -rf .venv
➜  tanki git:(main) ✗ python3.9 -m venv .venv

Problem

➜  tanki git:(main) ✗ .venv/bin/pip install --no-cache raylib
Collecting raylib
  Downloading raylib-4.0.0.6.tar.gz (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.8/61.8 KB 609.2 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting cffi>=1.14.6
  Downloading cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 174.0/174.0 KB 586.4 kB/s eta 0:00:00
Collecting inflection
  Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 1.1 MB/s eta 0:00:00
Using legacy 'setup.py install' for raylib, since package 'wheel' is not installed.
Installing collected packages: pycparser, inflection, cffi, raylib
  Running setup.py install for raylib ... error
  error: subprocess-exited-with-error

  × Running setup.py install for raylib did not run successfully.
  │ exit code: 1
  ╰─> [107 lines of output]
      not windows, trying Unix build

      *************** WARNING ***************

      /opt/homebrew/Cellar/raylib/4.0.0/include/raygui.h not found.  Build will not contain these extra functions.

      Please copy file from src/extras to /opt/homebrew/Cellar/raylib/4.0.0/include/raygui.h if you want them.

      **************************************

      *************** WARNING ***************

      /opt/homebrew/Cellar/raylib/4.0.0/include/physac.h not found.  Build will not contain these extra functions.

      Please copy file from src/extras to /opt/homebrew/Cellar/raylib/4.0.0/include/physac.h if you want them.

      **************************************

      Pre-processing /opt/homebrew/Cellar/raylib/4.0.0/include/raylib.h
      clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument]
      <stdin>:139:9: warning: 'RL_VECTOR2_TYPE' macro redefined [-Wmacro-redefined]
      #define RL_VECTOR2_TYPE
              ^
      <command line>:5:9: note: previous definition is here
      #define RL_VECTOR2_TYPE 1
              ^
      <stdin>:140:9: warning: 'RL_VECTOR3_TYPE' macro redefined [-Wmacro-redefined]
      #define RL_VECTOR3_TYPE
              ^
      <command line>:4:9: note: previous definition is here
      #define RL_VECTOR3_TYPE 1
              ^
      <stdin>:141:9: warning: 'RL_VECTOR4_TYPE' macro redefined [-Wmacro-redefined]
      #define RL_VECTOR4_TYPE
              ^
      <command line>:3:9: note: previous definition is here
      #define RL_VECTOR4_TYPE 1
              ^
      <stdin>:142:9: warning: 'RL_QUATERNION_TYPE' macro redefined [-Wmacro-redefined]
      #define RL_QUATERNION_TYPE
              ^
      <command line>:2:9: note: previous definition is here
      #define RL_QUATERNION_TYPE 1
              ^
      <stdin>:143:9: warning: 'RL_MATRIX_TYPE' macro redefined [-Wmacro-redefined]
      #define RL_MATRIX_TYPE
              ^
      <command line>:1:9: note: previous definition is here
      #define RL_MATRIX_TYPE 1
              ^
      5 warnings generated.
      Pre-processing /opt/homebrew/Cellar/raylib/4.0.0/include/rlgl.h
      clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument]
      BUILDING FOR MAC
      running install
      /Users/most/proj/tanki/.venv/lib/python3.9/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-12-arm64-3.9
      creating build/lib.macosx-12-arm64-3.9/raylib
      copying raylib/build.py -> build/lib.macosx-12-arm64-3.9/raylib
      copying raylib/enums.py -> build/lib.macosx-12-arm64-3.9/raylib
      copying raylib/version.py -> build/lib.macosx-12-arm64-3.9/raylib
      copying raylib/__init__.py -> build/lib.macosx-12-arm64-3.9/raylib
      copying raylib/colors.py -> build/lib.macosx-12-arm64-3.9/raylib
      creating build/lib.macosx-12-arm64-3.9/pyray
      copying pyray/__init__.py -> build/lib.macosx-12-arm64-3.9/pyray
      running egg_info
      writing raylib.egg-info/PKG-INFO
      writing dependency_links to raylib.egg-info/dependency_links.txt
      writing requirements to raylib.egg-info/requires.txt
      writing top-level names to raylib.egg-info/top_level.txt
      reading manifest file 'raylib.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'raylib/*.so'
      warning: no files found matching 'raylib/*.pyd'
      warning: no previously-included files found matching 'raylib/*.a'
      warning: no files found matching 'raylib/*.h'
      warning: no previously-included files found matching 'raylib/*.c'
      warning: no previously-included files found matching 'raylib/*.o'
      adding license file 'LICENSE'
      writing manifest file 'raylib.egg-info/SOURCES.txt'
      copying raylib/__init__.pyi -> build/lib.macosx-12-arm64-3.9/raylib
      copying pyray/__init__.pyi -> build/lib.macosx-12-arm64-3.9/pyray
      running build_ext
      generating cffi module 'build/temp.macosx-12-arm64-3.9/raylib._raylib_cffi.c'
      creating build/temp.macosx-12-arm64-3.9
      building 'raylib._raylib_cffi' extension
      creating build/temp.macosx-12-arm64-3.9/build
      creating build/temp.macosx-12-arm64-3.9/build/temp.macosx-12-arm64-3.9
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/most/proj/tanki/.venv/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-12-arm64-3.9/raylib._raylib_cffi.c -o build/temp.macosx-12-arm64-3.9/build/temp.macosx-12-arm64-3.9/raylib._raylib_cffi.o
      build/temp.macosx-12-arm64-3.9/raylib._raylib_cffi.c:570:14: fatal error: 'raylib.h' file not found
          #include "raylib.h"
                   ^~~~~~~~~~
      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: legacy-install-failure

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

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

Also side question: how can I check which wheels the package has?

electronstudio commented 2 years ago

It’s difficult for me to build or debug M1 because I don’t have one and GitHub Actions doesn’t support it.

Perhaps Homebrew has put Raylib.h in the wrong place. I would try to install Raylib manually using cmake rather than use Homebrew. https://electronstudio.github.io/raylib-python-cffi/BUILDING.html

electronstudio commented 2 years ago

The list of wheels is here https://pypi.org/project/raylib/#files

pkulev commented 2 years ago

At which path raylib has to be placed? I can build wheels on demand, if needed.

electronstudio commented 2 years ago

I don't know, I just know that I do my macOS builds using the cmake method rather than the homebrew method and they work.

Thanks for offer of doing builds but I'd prefer to keep it all automated if I can, so hoping GitHub Actions will start supporting M1.

pkulev commented 2 years ago

I got the same error with raylib built from sources (and brew raylib completely uninstalled). Log is actually the same. Also interesting that raylib.h preprocessing seems to work, so maybe header is placed correctly. I'm trying to understand building process.

electronstudio commented 2 years ago

Here’s the output from a successful build on x86 using Github Actions

Run python -m pip install --upgrade pip 10 Requirement already satisfied: pip in /Users/runner/hostedtoolcache/Python/3.10.3/x64/lib/python3.10/site-packages (22.0.4) 11 Collecting cffi 12 Downloading cffi-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl (178 kB) 13 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.9/178.9 KB 14.1 MB/s eta 0:00:00 14 Collecting pycparser 15 Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) 16 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 13.4 MB/s eta 0:00:00 17 Installing collected packages: pycparser, cffi 18 Successfully installed cffi-1.15.0 pycparser-2.21 19 Collecting wheel 20 Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) 21 Installing collected packages: wheel 22 Successfully installed wheel-0.37.1 23 clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument] 24

:139:9: warning: 'RL_VECTOR2_TYPE' macro redefined [-Wmacro-redefined] [25](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:25) #define RL_VECTOR2_TYPE [26](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:26) ^ [27](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:27) :5:9: note: previous definition is here [28](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:28) #define RL_VECTOR2_TYPE 1 [29](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:29) ^ [30](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:30) :140:9: warning: 'RL_VECTOR3_TYPE' macro redefined [-Wmacro-redefined] [31](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:31) #define RL_VECTOR3_TYPE [32](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:32) ^ [33](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:33) :4:9: note: previous definition is here [34](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:34) #define RL_VECTOR3_TYPE 1 [35](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:35) ^ [36](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:36) :141:9: warning: 'RL_VECTOR4_TYPE' macro redefined [-Wmacro-redefined] [37](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:37) #define RL_VECTOR4_TYPE [38](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:38) ^ [39](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:39) :3:9: note: previous definition is here [40](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:40) #define RL_VECTOR4_TYPE 1 [41](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:41) ^ [42](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:42) :142:9: warning: 'RL_QUATERNION_TYPE' macro redefined [-Wmacro-redefined] [43](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:43) #define RL_QUATERNION_TYPE [44](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:44) ^ [45](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:45) :2:9: note: previous definition is here [46](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:46) #define RL_QUATERNION_TYPE 1 [47](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:47) ^ [48](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:48) :143:9: warning: 'RL_MATRIX_TYPE' macro redefined [-Wmacro-redefined] [49](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:49) #define RL_MATRIX_TYPE [50](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:50) ^ [51](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:51) :1:9: note: previous definition is here [52](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:52) #define RL_MATRIX_TYPE 1 [53](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:53) ^ [54](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:54) 5 warnings generated. [55](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:55) clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument] [56](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:56) clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument] [57](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:57) clang: warning: argument unused during compilation: '-dDI' [-Wunused-command-line-argument] [58](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:58) not windows, trying Unix build [59](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:59) Pre-processing /usr/local/include/raylib.h [60](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:60) Pre-processing /usr/local/include/rlgl.h [61](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:61) Pre-processing /usr/local/include/raygui.h [62](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:62) Pre-processing /usr/local/include/physac.h [63](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:63) BUILDING FOR MAC [64](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:64) running bdist_wheel [65](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:65) running build [66](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:66) running build_py [67](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:67) creating build [68](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:68) creating build/lib.macosx-10.15-x86_64-3.10 [69](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:69) creating build/lib.macosx-10.15-x86_64-3.10/raylib [70](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:70) copying raylib/build.py -> build/lib.macosx-10.15-x86_64-3.10/raylib [71](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:71) copying raylib/enums.py -> build/lib.macosx-10.15-x86_64-3.10/raylib [72](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:72) copying raylib/version.py -> build/lib.macosx-10.15-x86_64-3.10/raylib [73](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:73) copying raylib/__init__.py -> build/lib.macosx-10.15-x86_64-3.10/raylib [74](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:74) copying raylib/colors.py -> build/lib.macosx-10.15-x86_64-3.10/raylib [75](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:75) creating build/lib.macosx-10.15-x86_64-3.10/pyray [76](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:76) copying pyray/__init__.py -> build/lib.macosx-10.15-x86_64-3.10/pyray [77](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:77) running egg_info [78](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:78) creating raylib.egg-info [79](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:79) writing raylib.egg-info/PKG-INFO [80](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:80) writing dependency_links to raylib.egg-info/dependency_links.txt [81](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:81) writing requirements to raylib.egg-info/requires.txt [82](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:82) writing top-level names to raylib.egg-info/top_level.txt [83](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:83) writing manifest file 'raylib.egg-info/SOURCES.txt' [84](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:84) reading manifest file 'raylib.egg-info/SOURCES.txt' [85](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:85) reading manifest template 'MANIFEST.in' [86](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:86) warning: no files found matching 'raylib/*.so' [87](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:87) warning: no files found matching 'raylib/*.pyd' [88](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:88) warning: no previously-included files found matching 'raylib/*.a' [89](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:89) warning: no files found matching 'raylib/*.h' [90](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:90) warning: no previously-included files found matching 'raylib/*.c' [91](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:91) warning: no previously-included files found matching 'raylib/*.o' [92](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:92) adding license file 'LICENSE' [93](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:93) writing manifest file 'raylib.egg-info/SOURCES.txt' [94](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:94) copying raylib/__init__.pyi -> build/lib.macosx-10.15-x86_64-3.10/raylib [95](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:95) copying pyray/__init__.pyi -> build/lib.macosx-10.15-x86_64-3.10/pyray [96](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:96) running build_ext [97](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:97) generating cffi module 'build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c' [98](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:98) creating build/temp.macosx-10.15-x86_64-3.10 [99](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:99) building 'raylib._raylib_cffi' extension [100](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:100) creating build/temp.macosx-10.15-x86_64-3.10/build [101](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:101) creating build/temp.macosx-10.15-x86_64-3.10/build/temp.macosx-10.15-x86_64-3.10 [102](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:102) gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/sqlite/include -I/usr/local/opt/sqlite/include -I/Users/runner/hostedtoolcache/Python/3.10.3/x64/include/python3.10 -c build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c -o build/temp.macosx-10.15-x86_64-3.10/build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.o [103](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:103) In file included from build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c:578: [104](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:104) /usr/local/include/physac.h:244:13: warning: 'TRACELOG' macro redefined [-Wmacro-redefined] [105](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:105) #define TRACELOG(...) (void)0; [106](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:106) ^ [107](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:107) /usr/local/include/raygui.h:222:9: note: previous definition is here [108](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:108) #define TRACELOG(level, ...) (void)0 [109](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:109) ^ [110](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:110) In file included from build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c:578: [111](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:111) /usr/local/include/physac.h:816:31: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] [112](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:112) if (bodies[i]->id == id) [113](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:113) ~~~~~~~~~~~~~ ^ ~~ [114](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:114) /usr/local/include/physac.h:1121:31: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] [115](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:115) if (bodies[k]->id == currentId) [116](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:116) ~~~~~~~~~~~~~ ^ ~~~~~~~~~ [117](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:117) /usr/local/include/physac.h:1201:33: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] [118](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:118) if (contacts[k]->id == currentId) [119](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:119) ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~ [120](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:120) /usr/local/include/physac.h:1260:33: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] [121](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:121) if (contacts[i]->id == id) [122](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:122) ~~~~~~~~~~~~~~~ ^ ~~ [123](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:123) build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c:27333:23: warning: incompatible function pointer types passing 'void (*)(int, const char *, void *)' to parameter of type 'TraceLogCallback' (aka 'void (*)(int, const char *, struct __va_list_tag *)') [-Wincompatible-function-pointer-types] [124](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:124) SetTraceLogCallback(x0); [125](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:125) ^~ [126](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:126) /usr/local/include/raylib.h:1029:49: note: passing argument to parameter 'callback' here [127](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:127) RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log [128](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:128) ^ [129](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:129) build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.c:27347:25: warning: incompatible function pointer types passing 'void (*)(int, const char *, void *)' to parameter of type 'TraceLogCallback' (aka 'void (*)(int, const char *, struct __va_list_tag *)') [-Wincompatible-function-pointer-types] [130](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:130) { SetTraceLogCallback(x0); } [131](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:131) ^~ [132](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:132) /usr/local/include/raylib.h:1029:49: note: passing argument to parameter 'callback' here [133](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:133) RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log [134](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:134) ^ [135](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:135) 7 warnings generated. [136](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:136) gcc -bundle -undefined dynamic_lookup -L/usr/local/opt/sqlite/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.15-x86_64-3.10/build/temp.macosx-10.15-x86_64-3.10/raylib._raylib_cffi.o -L/Users/runner/hostedtoolcache/Python/3.10.3/x64/lib -o build/lib.macosx-10.15-x86_64-3.10/raylib/_raylib_cffi.abi3.so /usr/local/lib/libraylib.a -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo [137](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:137) installing to build/bdist.macosx-10.15-x86_64/wheel [138](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:138) running install [139](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:139) running install_lib [140](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:140) creating build/bdist.macosx-10.15-x86_64 [141](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:141) creating build/bdist.macosx-10.15-x86_64/wheel [142](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:142) creating build/bdist.macosx-10.15-x86_64/wheel/pyray [143](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:143) copying build/lib.macosx-10.15-x86_64-3.10/pyray/__init__.pyi -> build/bdist.macosx-10.15-x86_64/wheel/pyray [144](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:144) copying build/lib.macosx-10.15-x86_64-3.10/pyray/__init__.py -> build/bdist.macosx-10.15-x86_64/wheel/pyray [145](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:145) creating build/bdist.macosx-10.15-x86_64/wheel/raylib [146](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:146) copying build/lib.macosx-10.15-x86_64-3.10/raylib/build.py -> build/bdist.macosx-10.15-x86_64/wheel/raylib [147](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:147) copying build/lib.macosx-10.15-x86_64-3.10/raylib/_raylib_cffi.abi3.so -> build/bdist.macosx-10.15-x86_64/wheel/raylib [148](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:148) copying build/lib.macosx-10.15-x86_64-3.10/raylib/enums.py -> build/bdist.macosx-10.15-x86_64/wheel/raylib [149](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:149) copying build/lib.macosx-10.15-x86_64-3.10/raylib/version.py -> build/bdist.macosx-10.15-x86_64/wheel/raylib [150](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:150) copying build/lib.macosx-10.15-x86_64-3.10/raylib/__init__.pyi -> build/bdist.macosx-10.15-x86_64/wheel/raylib [151](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:151) copying build/lib.macosx-10.15-x86_64-3.10/raylib/__init__.py -> build/bdist.macosx-10.15-x86_64/wheel/raylib [152](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:152) copying build/lib.macosx-10.15-x86_64-3.10/raylib/colors.py -> build/bdist.macosx-10.15-x86_64/wheel/raylib [153](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:153) running install_egg_info [154](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:154) Copying raylib.egg-info to build/bdist.macosx-10.15-x86_64/wheel/raylib-4.0.1.0.dev0-py3.10.egg-info [155](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:155) running install_scripts [156](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:156) Warning: MACOSX_DEPLOYMENT_TARGET is set to a lower value (10.14) than the version on which the Python interpreter was compiled (10.15), and will be ignored. [157](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:157) adding license file "LICENSE" (matched pattern "LICEN[CS]E*") [158](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:158) Warning: MACOSX_DEPLOYMENT_TARGET is set to a lower value (10.14) than the version on which the Python interpreter was compiled (10.15), and will be ignored. [159](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:159) creating build/bdist.macosx-10.15-x86_64/wheel/raylib-4.0.1.0.dev0.dist-info/WHEEL [160](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:160) creating 'dist/raylib-4.0.1.0.dev0-cp310-cp310-macosx_10_15_x86_64.whl' and adding 'build/bdist.macosx-10.15-x86_64/wheel' to it [161](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:161) adding 'pyray/__init__.py' [162](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:162) adding 'pyray/__init__.pyi' [163](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:163) adding 'raylib/__init__.py' [164](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:164) adding 'raylib/__init__.pyi' [165](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:165) adding 'raylib/_raylib_cffi.abi3.so' [166](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:166) adding 'raylib/build.py' [167](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:167) adding 'raylib/colors.py' [168](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:168) adding 'raylib/enums.py' [169](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:169) adding 'raylib/version.py' [170](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:170) adding 'raylib-4.0.1.0.dev0.dist-info/LICENSE' [171](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:171) adding 'raylib-4.0.1.0.dev0.dist-info/METADATA' [172](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:172) adding 'raylib-4.0.1.0.dev0.dist-info/WHEEL' [173](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:173) adding 'raylib-4.0.1.0.dev0.dist-info/top_level.txt' [174](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:174) adding 'raylib-4.0.1.0.dev0.dist-info/RECORD' [175](https://github.com/electronstudio/raylib-python-cffi/runs/5831326101?check_suite_focus=true#step:5:175) removing build/bdist.macosx-10.15-x86_64/wheel
electronstudio commented 2 years ago

One difference seems to be you’re using clang where I’m using gcc. Also I would try copying raylib.h to somewhere on the default include path maybe /usr/include

electronstudio commented 2 years ago

The only mac i have for testing is x86 10.14. On this raylib.h is in /usr/local/include and raylib is in /usr/local/lib and it works. It uses clang.

pkulev commented 2 years ago

The only mac i have for testing is x86 10.14. On this raylib.h is in /usr/local/include and raylib is in /usr/local/lib and it works. It uses clang.

Header and library are in the same places as yours.

Ok, I've found the solution, preparing PR.

electronstudio commented 2 years ago

fixed now in master?

pkulev commented 2 years ago

Yes, now it's working, thanks.