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

phalcon2 filesize > 200MB on 64-bit

This is a follow up to this post: https://forum.phalcon.io/discussion/2912/phalcon-2-beta-problems-with-phalcon-crypt-lo#C9708

I finally managed to build the phalcon2-extension. phpinfo() tells me the module is installed. So far, so good... But when I try to open a freshly-devtools-crafted project, nginx shows "bad gateway". The error log tells me

014/07/26 08:42:08 [error] 3755#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream

During my investigations I noticed the file size of phalcon.so: 220MB!! I retried several times on different Ubuntu-64bit-installations and php-versions, all with the same result.

Switching back to 1.3.2, and I'm "flying with phalcon" again.

Same process on 32-bit Ubuntu 12.04 gives me a file with 30 MB (looks odd already, since 1.3.2 is less than 4 mb), but at least it seems to work.

(Less important remark: After I "clean"ed, the first call of /.install always stops with an error "no rule defined....". After a ./configure, which is available afterwards, and another install-run the building process finishes without errors. First occurred after my last pull. Just wanted to mention that, too, because maybe it's related somehow).

Anyone got similar experience or managed to install phalcon2.0.0 BETA 1 on [email protected] lately?



98.9k
edited Jul '14

So, what's exactly the problem?



2.1k
edited Jul '14

The problem is that building the extension for v2.0.0 on a 64-bit machine results in a non-working 200mb phalcon.so-file....



98.9k
Accepted
answer

A 200MB file is completely normal because it contains no optimizations and debug symbols. If you want to build a smaller file you can use the install script instead of install-test

git clone https://github.com/phalcon/cphalcon
cd cphalcon
git checkout 2.0.0
cd ext
sudo ./install

If you've Zephir installed:

git clone https://github.com/phalcon/cphalcon
cd cphalcon
git checkout 2.0.0
zephir build

Also, if you find out a bug you can always submit a new issue on Github along with a full script to reproduce the issue.



2.1k

I wasn't concerned about the file size, I just thought it might be a hint that something went wrong because the extension wasn't working.

I re-build using the 2nd approach with zephir, and it works now. Thanks for your help.