Bug #65106 [Com]: PHP fails to compile

[email protected] ("noreplythanks at example dot fake dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=65106&edit=1

 ID:                 65106
 Comment by:         noreplythanks at example dot fake dot com
 Reported by:        mark at kreine dot ru
 Summary:            PHP fails to compile
 Status:             No Feedback
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Ubuntu 12.04
 PHP Version:        5.5.0
 Block user comment: N
 Private report:     N

 New Comment:

I had this issue too, on Raspbian (Linux) on a Raspberry Pi.


Previous Comments:
------------------------------------------------------------------------
[2014-01-16 20:12:15] brandon at brandonsavage dot net

I ran into this bug when compiling PHP on a box with only 512 mb of RAM total. It appears the compiler ran out of memory. Recommend adding some kind of "minimum system requirements" for PHP.

------------------------------------------------------------------------
[2013-10-15 11:54:45] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

------------------------------------------------------------------------
[2013-10-02 23:40:46] nhawks at gmail dot com

I just ran into this on a freshly-provisioned VPS. 
------------------------------------------------------------------------
Configure flags:
------------------------------------------------------------------------
'--with-readline=/usr/lib64' '--with-libedit=/usr/lib64' '--with-recode=/usr/lib64' '--includedir=/usr' '--libdir=/usr/lib64' '--with-libdir=lib64' '--with-gnu-ld' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-phar' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-opcache=no' '--with-pic' '--with-curl=/usr' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pspell' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--enable-shmop' '--with-libxml-dir=/usr' '--enable-xml' '--enable-static' '--enable-mbstring' '--enable-mbregex' '--with-mcrypt=/usr' '--with-mhash=/usr' '--with-tidy=/usr' '--with-gd' '--with-xmlrpc' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--enable-dom' '--enable-soap!
 ' '--with-xsl=/usr' '--enable-xmlreader' '--enable-xmlwriter' '--enable-json' '--enable-zip' '--enable-fileinfo' '--enable-intl' '--with-icu-dir=/usr' '--with-enchant=/usr' '--disable-inifile' '--disable-flatfile' '--disable-posix' '--disable-debug' '--disable-rpath' '--without-pear' '--enable-pcntl' '--enable-dba' '--enable-maintainer-zts' '--without-sqlite3' '--without-pdo-sqlite'

(Using maintainer-zts for Event MTM... wasn't a problem on a previous build.)
------------------------------------------------------------------------
I apt-get install'd the following packages to satisfy various dependencies:
------------------------------------------------------------------------
 bison libpcre3 libpcre3-dev libssl-dev zlib1g zlib1g-devel libcurl4-openssl-dev libfreetype6-dev libpng12-dev libxpm-dev libjpeg62-dev libpspell-dev libxml2-dev libmcrypt-dev libmhash-dev libtidy-dev libzip-dev libicu-dev libenchant-dev libbz2-dev libedit-dev librecode-dev  libxslt1-dev libmagic-dev libgmp3-dev gpp g++ 
------------------------------------------------------------------------
Interestingly, PHP's configure script did NOT notify me, but I was missing libmagic at first. Installing libmagic-dev changed nothing (even after ldconfig/reboot). Yes, /usr/lib64 and /lib64 are in /etc/ld.so.conf.d/lib64. (Perhaps it's a different folder I'm missing...?) 

So far, nothing's built by hand except Apache - but it's confirmed working. The exact same thing happens when I try to compile PHP 5.4.20. I had no such issues when I last built PHP 5.5, on CentOS.
------------------------------------------------------------------------
Actual copy-paste of my final retry, before I go looking for libmagic source to compile...
------------------------------------------------------------------------
/bin/sh /home/u/src/php-5.5.4/libtool --silent --preserve-dup-deps --mode=compile cc -I/home/u/src/php-5.5.4/ext/fileinfo/libmagic -Iext/fileinfo/ -I/home/u/src/php-5.5.4/ext/fileinfo/ -DPHP_ATOM_INC -I/home/u/src/php-5.5.4/include -I/home/u/src/php-5.5.4/main -I/home/u/src/php-5.5.4 -I/home/u/src/php-5.5.4/ext/date/lib -I/home/u/src/php-5.5.4/ext/ereg/regex -I/usr/include/libxml2 -I/home/u/src/php-5.5.4/ext/sqlite3/libsqlite -I/home/u/src/php-5.5.4/TSRM -I/home/u/src/php-5.5.4/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /home/u/src/php-5.5.4/ext/fileinfo/libmagic/apprentice.c -o ext/fileinfo/libmagic/apprentice.lo 
cc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
------------------------------------------------------------------------
Version of libmagic on the machine:
------------------------------------------------------------------------
$ aptitude show libmagic-dev
Package: libmagic-dev             
State: installed
Automatically installed: no
Version: 5.04-5+squeeze2
Priority: optional
Section: libdevel
Maintainer: Daniel Baumann <[email protected]>
Uncompressed Size: 279 k
Depends: libmagic1 (= 5.04-5+squeeze2)
Suggests: file
Description: File type determination library using "magic" numbers (development)
 This library can be used to classify files according to magic number tests. It implements the core functionality of the file command. 
 
 This package contains the development files.
Homepage: http://www.darwinsys.com/file/
------------------------------------------------------------------------
-30-

------------------------------------------------------------------------
[2013-06-23 17:07:17] [email protected]

Not much to go on there with just "internal compiler error". Thousands of people 
have compiled 5.5.0 successfully on Ubuntu 12.04 so I think you need to look at 
what specifically is different about this box of yours from everyone elses' 
Ubuntu setups. Low on ram? Bad ram perhaps? Try it on another machine?

------------------------------------------------------------------------
[2013-06-23 16:47:12] mark at kreine dot ru

Just edited operating system, first time erroneously was stated as CentOS 6.4

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=65106


--
Edit this bug report at https://bugs.php.net/bug.php?id=65106&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.