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

Error install Phalcon 3.0 on PHP 5.6 (CentOS 7)

Hi Phalcon teams. I have installed phalcon version 3.0 on CentOS 7.0 with guide:

git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install

Add into: /etc/php.ini extension=phalcon.so

I got the errors:

checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands /bin/sh /root/cphalcon/build/php5/64bits/libtool --mode=compile gcc -I. -I/root/cphalcon/build/php5/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/php5/64bits/include -I/root/cphalcon/build/php5/64bits/main -I/root/cphalcon/build/php5/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -fvisibility=hidden -c /root/cphalcon/build/php5/64bits/phalcon.zep.c -o phalcon.lo libtool: compile: gcc -I. -I/root/cphalcon/build/php5/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/php5/64bits/include -I/root/cphalcon/build/php5/64bits/main -I/root/cphalcon/build/php5/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -fvisibility=hidden -c /root/cphalcon/build/php5/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o gcc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See https://bugzilla.redhat.com/bugzilla for instructions. make: *** [phalcon.lo] Error 1

Please help me the advice



34.6k
Accepted
answer
edited Aug '16

You don't have enough memory to compile Phalcon, you can compile it this way:

git clone --depth=5 git://github.com/phalcon/cphalcon.git 
cd cphalcon/ext
sudo ./install

Or add swap if you can for compile time and then remove it and/or stop any not needed services for compile time.

Thanks, It's work

edited Aug '16

I wonder, how much RAM do you have? I mean, if you cannot even compile C, what is the future use of that server? I compiled Phalcon w/o any swap on a credit card size computer (Raspberry Pi).

Today the cheapest laptop has 4 GB of RAM (actually that's for years now), whereas I worked on DEC Alpha servers with total 256 MB of RAM who were able to run 500 concurrent users (terminal apps). Back then compiled PHP 5.2 from source and used it as a web/app server. :)

When i was trying to compile phalcon from cphalcon/build on 512 mb droplet digitalocean i couldn't do it :)

edited Aug '16

I just compiled Phalcon v2.0.13 on gen1 Raspberry Pi model B+ with only 512 MB and default 100 MB of swap partition.

Compilation took 37 minutes :) But eventually, everything went fine, I have monitored RAM usage during process, it didn't ever touched swap. PHP version is 5.4.x, that's why I had to use 2.0.x stable branch.

This is 32 bit ARMv6 CPU, so the PHP and Phalcon are 32bits too.

So guys, I would think again why your big bad ass servers are unable to compile while poor little RPi gen 1 can do it :)

Web framework delivered as a C-extension for PHP
phalcon => enabled
Author => Phalcon Team and contributors
Version => 2.0.13
Build Date => Aug 25 2016 14:09:19
Powered by Zephir => Version 0.9.2a-dev

But from ext or build ?

From build, as regular. ./install from build.

I use Vultr VPS Ram 768MB. Folowing guide of Andy. It's working fine now. Thanks

But from ext or build ? git clone --depth=5 git://github.com/phalcon/cphalcon.git cd cphalcon/ext sudo ./install

I use Vultr VPS Ram 768MB. Folowing guide of Andy. It's working fine now. Thanks

You must have other services such as database which takes many RAM.

But serioslly, VPS with 768MB of RAM, it's better to go with shared hosting (not for Phalcon though).

What ? VPS > Any shared hosting men :D

I use Vultr VPS Ram 768MB. Folowing guide of Andy. It's working fine now. Thanks

You must have other services such as database which takes many RAM.

But serioslly, VPS with 768MB of RAM, it's better to go with shared hosting (not for Phalcon though).

No, That is not shared hosting. It's VPS

https://www.vultr.com/?ref=6884036

I installed: CentOS 7 64bit, Apache 2.4.6, MariaDb: 10.0.1, PHP: 5.6

That's all.

What ? VPS > Any shared hosting men :D

I use Vultr VPS Ram 768MB. Folowing guide of Andy. It's working fine now. Thanks

You must have other services such as database which takes many RAM.

But serioslly, VPS with 768MB of RAM, it's better to go with shared hosting (not for Phalcon though).

edited Aug '16

No, That is not shared hosting. It's VPS

https://www.vultr.com/?ref=6884036

I installed: CentOS 7 64bit, Apache 2.4.6, MariaDb: 10.0.1, PHP: 5.6

That's all.

I was just saying that having VPS with < 1GB of RAM today is not sufficient when RAM is cheap. Comparation is with shared hosting where I get very decent performance on a machine with a total of 32GB RAM.

Ok, sorry for missunderstanding. You can use Linode 2G RAM just 10USD/month. I used 1 instance. It's so good. You can controll everything, allways can install newest verion of softwares.

I use VPS 2G for Production Server with confuguration is: NginX 1.11, Mariadb 10.1.x and PHP 7.1, Phalcon 3.0 => THe performance make me so happy. :D

No, That is not shared hosting. It's VPS

https://www.vultr.com/?ref=6884036

I installed: CentOS 7 64bit, Apache 2.4.6, MariaDb: 10.0.1, PHP: 5.6

That's all.

I was just saying that having VPS with < 1GB of RAM today is not sufficient when RAM is cheap. Comparation is with shared hosting where I get very decent performance on a machine with a total of 32GB RAM.



5.0k

I am also currently building a phalcon website, which would you prefer linode 10usd or vultr 10usd? my setup is same as yours NginX Mariadb and PHP 7+, Phalcon 3.0. Are you not having issues with linodes slow network because of the ddos attacks recently?

Ok, sorry for missunderstanding. You can use Linode 2G RAM just 10USD/month. I used 1 instance. It's so good. You can controll everything, allways can install newest verion of softwares.

I use VPS 2G for Production Server with confuguration is: NginX 1.11, Mariadb 10.1.x and PHP 7.1, Phalcon 3.0 => THe performance make me so happy. :D

No, That is not shared hosting. It's VPS

https://www.vultr.com/?ref=6884036

I installed: CentOS 7 64bit, Apache 2.4.6, MariaDb: 10.0.1, PHP: 5.6

That's all.

I was just saying that having VPS with < 1GB of RAM today is not sufficient when RAM is cheap. Comparation is with shared hosting where I get very decent performance on a machine with a total of 32GB RAM.

I would prefer digitalocean.