Closed pkulev closed 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
The list of wheels is here https://pypi.org/project/raylib/#files
At which path raylib has to be placed? I can build wheels on demand, if needed.
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.
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.
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
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
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.
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.
fixed now in master?
Yes, now it's working, thanks.
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:
Compiler
Python
Envronment
Clean python3.9 environment.
Problem
Also side question: how can I check which wheels the package has?