How do you compile phalcon on macOS Catalina

Hi,

just updated to macOS Catalina, as expected it breaks my dev env again, but this time Apple makes it even more complex as I am not able to compile phalcon with build-in php. I'd like to know if any one of you're experiencing this and how do you resolve it. I am not a brew or macport fun and just try to stick to build-in php.

Thanks



12.9k
edited Dec '19

I've figured it out from install script, but instead of running ./install shell, you can install manually, if anyone needs it.

Get SDK path

[email protected] # xcrun --show-sdk-path

it shoud be something like

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

cp /usr/bin/phpize /usr/local/bin/phpize 
cp /usr/bin/php-config  /usr/local/bin/php-config

Replace includedir with SDK path

vi /usr/local/bin/phpize 

includedir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/php"

same thing for php-config

vi /usr/local/bin/php-config 

Replace include_dir with SDK path

include_dir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/php"

Then compile phalcon manually

cd /Users/macbookpro/Downloads/
tar -zxf cphalcon-3.4.5.tar.gz
cd /Users/macbookpro/Downloads/cphalcon-3.4.5/build/php7/64bits/

run following

/usr/local/bin/phpize 
./configure --with-php-config=/usr/local/bin/php-config --enable-phalcon
make
sudo mkdir -p /usr/local/php/extensions
cp /Users/macbookpro/Downloads/cphalcon-3.4.5/build/php7/64bits/modules/phalcon.so /usr/local/php/extensions/phalcon.so

Vi /etc/php.ini, add

[phalcon]
extension=/usr/local/php/extensions/phalcon.so


2.5k

i had so many issues after updating to Catalina

most of it went away after moving my workspace away from the desktop