We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

v1.2.1 compilation

Hi,

New to phalcon. I'm using windows for most of my work but starting today I'll be using mac. I haven't tried building something in mac. I followed the instructions in the documentation but I failed. I know there are things I missed. I really need help/directions.

Here are the things installed in my machine:

  1. Bitnami's MAMP stack(PHP 5.4.17)
  2. XCode 4.6.2

Here is the output from the terminal:

$ sudo ./install Error: Couldn't execute your compiler (gcc) ./install: line 31: gcc: command not found ./install: line 31: [: -ge: unary operator expected ./install: line 40: gcc: command not found grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

I was able to compile the source but the extension cannot be loaded. Here's part of the error log.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so, 9): Symbol not found: _output_globals\n Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so\n Expected in: flat namespace\n in /usr/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so in Unknown on line 0

Please help. Thank you

whew! took so much of my time. still couldn't figure it out. heading back to code igniter



98.9k

I don't know if XAMPP comes with the tools to compile an extension, it seems you're using the ones that come with the OS instead of the ones provided by XAMPP (if any).

I would say that you used PHP 5.3 headers to compile Phalcon but are trying to load the compiled extension into PHP 5.4 or 5.5