Error installed Phalcon version 3.0 on VPS CentOS 7.2.1 (64bits) PHP 7.0.10 - RAM 1GB

Hi Phalcon team and everyone

I have installed phalcon version 3.0 on CentOS 7.2.1 (64bits) 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/php7/64bits/libtool --mode=compile gcc  -I. -I/root/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/php7/64bits/include -I/root/cphalcon/build/php7/64bits/main -I/root/cphalcon/build/php7/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/php7/64bits/phalcon.zep.c -o phalcon.lo 
libtool: compile:  gcc -I. -I/root/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/php7/64bits/include -I/root/cphalcon/build/php7/64bits/main -I/root/cphalcon/build/php7/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/php7/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 <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [phalcon.lo] Error 

Please give some advice



67.7k

i think compiler runs out of memory ( i am really not sure, Andres has to confirm this ).

there was a trick ... cant reamember really and i cant find the tread, but it was cd etc; ./install or something like that. Try it awith all the subfolders you tring its poosible.

did you check if https://forum.phalconphp.com/discussion/13265/phalcon-on-packagecloudio works ?

Yes, it's out of memory. You need to make sure you don't have anyt weird things running(like apche,mysql,php-fpm or something like this). Or try to build it with --depth==5 and build from ext, it should use less memory. Also you can ad swap file - it's other solution too.

I would seriously re-think about purpose of such "server" where you cannot compile C code like that. My 12 years old desktop computer with single core CPU and 1 GB of RAM can do it. Credit sized (ARM based) computer with only 512MB of RAM can do it.

https://forum.phalconphp.com/discussion/13205/cent

https://forum.phalconphp.com/discussion/13355/pi

I too didn't install with 1GB, in my experience minimal memory is 2GB to install

I installed on 512 mb ram, you just need to switch off mysql, apache, nginx etc stuff which is eating memory and compile using ext directory