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

How create static library of phalcon

How to create a static library of Phalcon? ./configure --enable-static doesn't work. Thanks



10.0k

It's necessary for debugging.



98.9k

According to configure --help that's the right command:

./configure --help | grep static
  --enable-static=PKGS  build static libraries default=yes


10.0k
edited Aug '14

I read it. But on output I'm getting phalcon.so In addition, how can I use debug for php extension?



98.9k

I don't think ./configure --enable-static would create a stand-alone executable if that is what you're expecting. It will just resolve available functions that are available in compile time instead of dynamically link them in runtime.

I think you have to install PHP in debug mode, and move phalcon to the ext/ directory then add --enable-phalcon to the compilation flags when compiling PHP.

Something like:

./configure --disable-all --enable-cgi --enable-debug --enable-phalcon

You can see more info here: https://www.phpinternalsbook.com/build_system/building_php.html



10.0k

Ok, phalcon work in debug mode. But i'm not seeing phalcon sources.
What i do: $gdb /usr/bin/php
$(gdb) break /acl/adapter/memory.c:573

I had not found manual how use gdb with php extension. If you know, please tell me.
Thank you.