-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Install of Phalcon 5 Fails Using pecl on Ubuntu 22.04 #16213
Comments
Having the same experience whether using PECL or not. It appears to fail when it goes to compile using make |
I've found a reasonable workaround in the interim. It seems the issue with phalcon 5 isn't phalcon 5, but the compiling of it using make. So I thought... why not just get it precompiled? If you have wget and an unzipping tool installed (I used p7zip-full) you can do the following After extracting the zip, you just have to manually move the phalcon.so file and register it in apache happy coding!! |
@SageDavis, yeah, I use the git repo build method defined the Phalcon 5 installation guide. But I was trying the pecl method since the Phalcon dev team have said they want that to be the default method in the future. I just wasn't able to get the pecl method working. I have over half a dozen Phalcon 5 product/sites up and running using the direct build method provided. |
I'm running into these issues as well but in a dockerfile based on php:8.1-apache. |
"Why is this labeled not a bug?" My question exactly. :) Here are my build commands that I've used to install Phalcon 5 now on about a dozen servers but I'm not running docker: cd /usr/local/lib |
@joszz I was not able to find any working solution using PECL, but I was very much able to get this to work with Ubuntu 22 Phalcon 5 and PHP 8.1. The problem isn't that phalcon doesn't work, it's that the compiler (make) isn't working with the code for whatever reason in the later versions of Ubuntu. What I did was download a pre-compiled .so and manually put it in the php extensions directory.
In this case, if you have a thread safe version of php, change the Once you have it and unzip it, move the .so file to you php8.1 ext folder, then edit the php.ini file and add the extension. Restart apache and check your phpinfo file again. It should show Phalcon |
@SageDavis thx, that'll have to do for now then... |
We've had the same problem and spent quite a few hours trying to compile Phalcon 5.1.x on an Ubuntu 22.04 AWS EC2 image. It spits out many warnings which seemingly can be ignored, but then suddenly stops at the php_zephir_init_globals function. CPU is at 100%, memory runs full and after a few minutes the process is killed without additional info as to what happened. We tried increasing memory, using swap, etc. - nothing helped. We also tried to go through the compiling process and find out more about the issue, but didn't get too much. We then tried to install via apt with ppa:ondrej/php and php-phalcon5 - installation went fine, but the extension couldn't be loaded. Finally, we tried pre-compiled versions liked recommended above, but again - extension couldn't be loaded. It seems to us that this should be due to processor infrastructure. Our image runs on ARM (aarch64). |
@lmuskalla I'm on X86-64, specifically an Intel Pentium N6005. I only had issues trying to compile it myself or through PECL. The Dockerfile in the project just gets this precompiled binary and installs it in the container. |
Same issue and your workaround works fine. The closest to packagecloud :-D |
@lmuskalla I'll try to compile inside AWS infra to check if it is really the problem. Also note, that most of compilation errors are due memory limitations. Try to create SWAP file with 2Gb during compilation or compile docker image somewhere else and push image to registry. |
I'm no expert in this field, but I do not believe the errors I get are due to memory constraints. |
@joszz Could you please provide Dockerfile example where it fails? |
@Jeckerson If I run into this again, I'll be sure to have a Dockerfile reproducing the problem ready. |
Quick update.
I am still unable to build using pecl. |
This is similar to #15973 |
I just tried to rebuild Phalcon using PECL again and it still fails. I received the following error(s) from the PECL command: cc: fatal error: Killed signal terminated program cc1 It is also worth noting that the Phalcon documentation still says to use the command "pecl install phalcon-5.0.0" which fails. I used "pecl install phalcon-5.2.3". This is an ongoing complaint I have with the Phalcon.io documentation. It is not being properly updated to reflect the latest Phalcon release. This basically renders the build documentation useless for new Phalcon uses. How are they supposed to know to replace phalcon-5.0.0 with phalcon-5.2.3? |
@kgrammer With what RAM amount did you tried to install and inside what OS? Also, you just might to skip version and use |
Thanks Jeckerson. Today's PECL build attempt was on a server with 2GB of memory. The initial report failed on a server with 8GB of memory. I can try the PECL build on the 8gb server, but it's my production server and I will have to find an off-hours time for that to happen since the PECL build takes quite some time to complete. That is difficult to do on a server that has international users. My point about the documentation is one I've made several times now. The documentation doesn't say "pecl install phalcon" so a new user, reading the Phalcon 5 install guide, would be unable to make it past that step. As written, the documentation ensures failure for new Phalcon users trying to use the preferred installation method. Niden and I have chatted about this a few times, and I while understand the difficulty of keeping the web site current with the latest release, failing to do adds roadblocks for new users. |
@kgrammer 2Gb is enough. We will update the documentation. Thank you for your note! |
Monitored a build yesterday and at the peak it took around 3GB of RAM (Ubuntu 22.04 VPS). I would suggest that 4GB machine is minimum requirement if installed using PECL. Also would be good to mention it in the documentation, because some small single-purpose or experimental VPS instances could be normal to have far less RAM dedicated and |
@niden and I were working on a PHP 8.3 build issue and I confirmed that PECL does not work on a small server. I was trying to install with PECL on a 1CPU/2GB server and PECL was failing. When I upgraded to a 2CPU/4GB server, PECL installed Phalcon as expected. Niden said he would add memory size notes to the installation docs. When that is done, I would consider this a closable/completed issue. |
I tried to install Phalcon 5.6.1 on an AMD Epyc-Milan processor with 4 cores, 4Gb of RAM with Plesk using Pecl. The server crashed and then it reported this error:
I followed again the solution of @SageITSolutions and within 5 min Phalcon was up and running. Of course, there won't be any version update, will have to be done manually but it takes less time than Pecl. Sorry for this question: Would it be possible to return to Packagecloud? The installation was really simple and fast. |
Sadly no. Adding phalcon back to packagecloud introduces one more thing that we have to deal with in every release, and trust me we spent a lot of time setting those processes up. That was one of the main reasons that we wanted to go with PECL so that we don't have to do all this work. Remi and Onrej also have repositories that offer Phalcon, and although not everyone can use them, they are there. |
Thanks for your reply and the tip: I just upgraded from 5.2.2 to 5.6.1 using Ondrej's repository and it was even faster than with Packagecloud. If I may, I would recommend this installation option in the documentation. It used to be there in 3.4 docs. |
https://docs.phalcon.io/latest/installation/#linux-deb-ondrej-sury Still here buddy |
When attempting to install Phalcon 5 in Ubuntu 22.04 using pecl, the build throws a lot of error and fails.
I start with "pecl channel-update pecl.php.net" which produces:
I then enter "pecl install phalcon" (I've also tried "pecl install phalcon-5.0.0", "pecl install phalcon-5.1.0" and "pecl install phalcon-5.1.1") and pecl starts and produces a lot of warning and then fails to build as outlined in the attached file.
Details
php --ri phalcon
) INCOMPLETE, SO VERSION UNAVAILABLEphp -v
): 8.1.12kbg.txt
The text was updated successfully, but these errors were encountered: