Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems on M1 Monterey #72

Open
cgrabenstein opened this issue May 13, 2023 · 0 comments
Open

Problems on M1 Monterey #72

cgrabenstein opened this issue May 13, 2023 · 0 comments
Assignees

Comments

@cgrabenstein
Copy link

cgrabenstein commented May 13, 2023

I installed sdl via brew: $ brew install sdl2

Then I tried to install php-sdl via pecl, bit it failed with

/private/tmp/pear/temp/sdl/src/php_sdl.h:42:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
         ^~~~~~~~~~~~
1 error generated.

However, I managed to build and install it manually, but I had to edit the Makefile. I changed the line

INCLUDES = -I/opt/homebrew/Cellar/php/8.2.6/include/php -I/opt/homebrew/Cellar/php/8.2.6/include/php/main -I/opt/homebrew/Cellar/php/8.2.6/include/php/TSRM -I/opt/homebrew/Cellar/php/8.2.6/include/php/Zend -I/opt/homebrew/Cellar/php/8.2.6/include/php/ext -I/opt/homebrew/Cellar/php/8.2.6/include/php/ext/date/lib -I/opt/homebrew/include/SDL2

to

INCLUDES = -I/opt/homebrew/Cellar/php/8.2.6/include/php -I/opt/hCellar/php/8.2.6/include/php/main -I/opt/homebrew/Cellar/php/8.2.6/include/php/TSRM -I/opt/homebrew/Cellar/php/8.2.6/include/php/Zend -I/opt/homebrew/Cellar/php/8.2.6/include/php/ext -I/opt/homebrew/Cellar/php/8.2.6/include/php/ext/date/lib -I/opt/homebrew/include/SDL2 -I/opt/homebrew/include

The only change is the added -I/opt/homebrew/include.

After building, I ran make test and got three failed tests. See php_test_results_20230513_1945.txt for details.

Eventually everything seems to work, but maybe this issue will help others that struggle with the same or similar issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants