khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Compiling php

Thu Jul 26, 2012 1:54 am

I am trying to compile PHP on my Raspberry Pi. but it failed to compile with a very unhelpful message. I just downloaded the latest stable php code from the official site, ran ./configure it and then ran make with no arguments. It compiled a lot of files before failing on this one.

Code: Select all

/bin/bash /home/khh/build/php-5.4.5/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/khh/build/php-5.4.5/ext/fileinfo/libmagic -Iext/fileinfo/ -I/home/khh/build/php-5.4.5/ext/fileinfo/ -DPHP_ATOM_INC -I/home/khh/build/php-5.4.5/include -I/home/khh/build/php-5.4.5/main -I/home/khh/build/php-5.4.5 -I/home/khh/build/php-5.4.5/ext/date/lib -I/home/khh/build/php-5.4.5/ext/ereg/regex -I/usr/include/libxml2 -I/home/khh/build/php-5.4.5/ext/sqlite3/libsqlite -I/home/khh/build/php-5.4.5/TSRM -I/home/khh/build/php-5.4.5/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /home/khh/build/php-5.4.5/ext/fileinfo/libmagic/apprentice.c -o ext/fileinfo/libmagic/apprentice.lo
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
Do anyone have any idea of how I might continue from here? Have anyone else experienced anything similar? And should I do as they suggest, submit a full bug report to GCC?

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Compiling php

Thu Jul 26, 2012 1:58 am

Out of curiosity, why are you trying to compile it ? Why not just install it ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Re: Compiling php

Thu Jul 26, 2012 3:57 am

SirLagz wrote:Out of curiosity, why are you trying to compile it ? Why not just install it ?
I like compiling it so I can get the latest version. On raspian it's only one bugfix/security fix behind, but still. It's not a big issue, I have the package downloaded now and things are working, I just thought it was odd. I've never seen a build fail like that before.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Compiling php

Thu Jul 26, 2012 1:54 pm

IMLE (in my limited experience ;) ) errors like that are often caused by out-of-memory problems.
You could try enabling a swapfile, and compiling again?

khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Re: Compiling php

Thu Jul 26, 2012 4:40 pm

AndrewS wrote:IMLE (in my limited experience ;) ) errors like that are often caused by out-of-memory problems.
You could try enabling a swapfile, and compiling again?
That worked, thanks.

Return to “Advanced users”