Reputation: 55
I've been trying to install Phalcon 3.4 on my xampp PHP 7.3 setup (Macbook Pro 16 M1 Pro chip). Following I've tried:
Tried with macports, but it is installing the file in /opt/local/lib/php73/extensions/no-debug-non-zts-20180731/phalcon.so, so I'm trying to copy this file to the xamppfiles/lib/php/extensions folder. But in the php_error_log file saying arm chip not supported by x86_64 file. Error log file:
[30-Oct-2021 15:34:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so' (tried: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so, 0x0009): tried: '/Applications/XAMPP/xamppfiles/lib/phalcon.so' (no such file), '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/phalcon.so' (no such file), '/usr/lib/phalcon.so' (no such file)), /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731//Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731//Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so.so, 0x0009): tried: '/Applica in Unknown on line 0
I've tried to clone the 3.4 github repo and run cd build ./install, but just a lot of errors. Here are the errors:https://pastebin.com/MfJYpzaJ
Homebrew just spitting errors. Error in terminal:
zaenkhilji@Zaens-MacBook-Pro ~ % brew tap phalcon/extension https://github.com/phalcon/homebrew-tap
brew install phalcon
==> Tapping phalcon/extension
Cloning into '/opt/homebrew/Library/Taps/phalcon/homebrew-extension'...
remote: Enumerating objects: 369, done.
remote: Counting objects: 100% (215/215), done.
remote: Compressing objects: 100% (118/118), done.
remote: Total 369 (delta 140), reused 122 (delta 83), pack-reused 154
Receiving objects: 100% (369/369), 65.43 KiB | 1.26 MiB/s, done.
Resolving deltas: 100% (224/224), done.
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012705d6b0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
psr@74: undefined method `cellar' for #<BottleSpecification:0x0000000127135b28>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001261297e8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x0000000126253060>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x0000000126291568>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262ca020>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012724f900>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012728c6c0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/phalcon@73_4.0.0.rb
phalcon@73_4.0.0: undefined method `cellar' for #<BottleSpecification:0x00000001272c47a0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262e7aa8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262fe208>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
psr@73: undefined method `cellar' for #<BottleSpecification:0x00000001263155e8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012632c888>
Error: Cannot tap phalcon/extension: invalid syntax in tap!
Warning: No available formula or cask with the name "phalcon". Did you mean falcon?
==> Searching for similarly named formulae...
This similarly named formula was found:
falcon
To install it, run:
brew install falcon
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
What are the remaining options? Or is there no support for arm-based devices?
Upvotes: 1
Views: 1564
Reputation: 1531
You'll probably need to go the Docker route: https://github.com/MilesChou/docker-phalcon
I've done this on a M1 Pro and it works.
Might be able to use https://www.vagrantup.com/ as well, but I haven't tried that on M1. It's worked well in the past though.
Upvotes: 0
Reputation: 55
As of now Phalcon < 3.* is not supported by the the arm64-based chips. Phalcon > 4.* is supporting arm64-based chips.
My solution to the problem was to deploy a docker ubuntu image and run the project until we don't upgrade to newer version of Phalcon. This is working fine after almost 30h+ in already.
Upvotes: 0
Reputation: 6692
The error message (have 'arm64', need 'x86_64')
indicates that xampp
is a x86_64 app, but php73-phalcon3
installed from macport is of arm64. You could try to download x86 version of php73-phalcon3
. uncompress and copy phalcon.so
to your xampp extension directory.
Upvotes: 0