php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60513 Unable to compile php-5.3.8 with gcc 3.3.6 [uClibc 0.9.27]
Submitted: 2011-12-13 16:30 UTC Modified: 2011-12-15 14:42 UTC
From: tals1975 at gmail dot com Assigned: cataphract (profile)
Status: Suspended Package: Compile Failure
PHP Version: 5.3.8 OS: Linux 2.4.28 (LFS)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tals1975 at gmail dot com
New email:
PHP Version: OS:

 

 [2011-12-13 16:30 UTC] tals1975 at gmail dot com
Description:
------------
Unable to compile with gcc 3.3.6 [uClibc 0.9.27].

ERROR:
=======
/sources/php-5.3.8/ext/standard/php_crypt_r.c:101: undefined reference to `membar_producer'
/sources/php-5.3.8/ext/standard/php_crypt_r.c:102: undefined reference to `atomic_add_int'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

php-5.3.8 CONFIGURATION: + apache-2.0.50 + sqlite-3.7.9
========================
./configure --with-apxs2=/mnt/C/sys/apache2/bin/apxs --program-prefix= --prefix=/mnt/C/sys --exec-prefix=/mnt/C/sys --bindir=/mnt/C/sys/bin --sbindir=/mnt/C/sys/sbin --sysconfdir=/mnt/C/sys/etc --enable-cgi --enable-debug --with-bz2 --without-curl --without-gettext --without-gmp --with-openssl --without-pspell --with-regex=system --with-zlib --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --disable-safe-mode --enable-sockets --enable-sqlite-utf8 --without-oci8 --with-gd --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/lib --sysconfdir=/mnt/C/sys/etc --with-pear=/mnt/C/sys/lib/php --with-readline --without-mssql --without-mysql --with-libxml-dir=/mnt/C/sys


GCC VERSION:
===========
gcc -v
Using built-in specs.
Configured with: /opt/buildroot/toolchain_build_i386/gcc-3.3.6/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-linux-uclibc --target=i386-linux-uclibc --enable-languages=c,c++,objc --enable-shared --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib : (reconfigured) /opt/buildroot/toolchain_build_i386/gcc-3.3.6/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-linux-uclibc --target=i386-linux-uclibc --enable-languages=c,c++,objc --enable-shared --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib : (reconfigured) /home/user/CR/opt/buildroot/toolchain_build_i386/gcc-3.3.6/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-linux-uclibc --target=i386-linux-uclibc --enable-languages=c,c++,objc --enable-shared --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib
Thread model: posix
gcc version 3.3.6


Patches

php-5.3.8-Uclibc-fix.patch (last revision 2011-12-15 07:44 UTC by tals1975 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-15 07:46 UTC] tals1975 at gmail dot com
The following patch worked for me.
 [2011-12-15 14:42 UTC] cataphract@php.net
-Status: Open +Status: Suspended -Assigned To: +Assigned To: cataphract
 [2011-12-15 14:42 UTC] cataphract@php.net
I built a uclibc toolchain for x64 from a dev snapshot and had no problems compiling and linking PHP.

In any case, there's a bug here in that the ATOMIC_H is defined in the presence of an atomic.h header and if it exists, it's the Solaris version that's assumed. It so happens that the uclibc toolchain includes an atomic.h file in the default include path (so the configure test is not specific enough).

However, I'd wait until 5.4 and the next version of 5.3 are out and rewrite the _crypt_extended_init_r function because it doesn't make much sense right now  and is almost two orders of magnitude slower than it should be on windows.
 [2011-12-15 14:42 UTC] cataphract@php.net
read: crypt is almost two orders of magnitude slower because it runs the initialization code every time.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 15:01:28 2019 UTC