php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54371 Undefined symbol: __sync_fetch_and_add_4
Submitted: 2011-03-24 16:10 UTC Modified: 2011-03-24 21:18 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: wyatt at lle dot rochester dot edu Assigned:
Status: Wont fix Package: Compile Failure
PHP Version: 5.3.6 OS: SunOS 5.10 Generic_14290
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wyatt at lle dot rochester dot edu
New email:
PHP Version: OS:

 

 [2011-03-24 16:10 UTC] wyatt at lle dot rochester dot edu
Description:
------------
__sync_fetch_and_add_4 shouldn't be called on SPARC.

The system is 64 bit with v9 processors but our Oracle libraries are 32 bit so I'm 
using mcpu=v8.

Test script:
---------------
This is the configure script:

unset LD_LIBRARY_PATH

export CC="gcc"
export CFLAGS="-mcpu=v8 -Wa,-xarch=v8plusa"
export LD_LIBRARY_PATH=/usr/lib:/usr/sfw/lib:/usr/local/lib:/usr/ccs/lib
export LD_LIBRARY_FLAGS="-L/usr/lib -R/usr/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/local/lib -R/usr/local/lib -L/usr/ccs/lib -R/usr/ccs/lib"


./configure \
--prefix=/usr/local/php-5.3.6 \
--enable-shared \
--with-apxs2=/usr/local/httpd-2.2.17/bin/apxs \
--with-libxml-dir=/usr/include/libxml2 \
--with-iconv-dir=/usr/local/libiconv-1.12/lib \
--with-zlib \
--enable-exif \
--enable-mbstring \
--enable-calendar \
--enable-bcmath \
--enable-ftp \
--enable-zip \
--with-bz2=/usr/local/lib \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-gettext=shared,/opt/sfw \
--enable-sockets \
--with-oci8=/usr/local/php-5.3.1/ORACLE_LIB32 \
--with-gd \
--with-ldap


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-24 16:12 UTC] wyatt at lle dot rochester dot edu
This is the reported error:

Undefined                       first referenced
 symbol                             in file
__sync_fetch_and_add_4              ext/standard/.libs/php_crypt_r.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
gmake: *** [sapi/cli/php] Error 1
 [2011-03-24 18:50 UTC] sixd@php.net
Have you tried the free 64bit Oracle Instant Client libraries?
http://www.oracle.com/technetwork/topics/sol64soft-085649.html
 [2011-03-24 19:00 UTC] sixd@php.net
Also see http://bugs.php.net/53310
 [2011-03-24 19:19 UTC] srinatar@php.net
If you want to compile with 32-bit, you should be using -m32. unless, u know 
exactly what you are doing, please refrain from using -xarch/-mcpu flags. let the 
compiler figure it for you.

export CFLAGS="-m32"
 [2011-03-24 20:59 UTC] wyatt at lle dot rochester dot edu
SIXD: 
I could try the Instant Client libraries but that would require a lot of work 
recompiling other supporting software that is in use.  It's also not related to 
the problem at hand.

Bug report 53310 looks like it might be related to this issue but I am using gcc 
4.2.2.  I should add that I was able to compile versions 5.3.1, 5.3.3, 5.3.4, 
and 5.3.5 with no problems using the same script (other than changing the 
prefix).

SRINATAR:
I thought I had tried -m32 by itself but clearly not because I tried again and 
it compiled successfully.  Perhaps this would be a good thing to add to the 
README's.  Thank you!
 [2011-03-24 21:18 UTC] sixd@php.net
-Status: Open +Status: Wont fix
 [2011-03-24 21:18 UTC] sixd@php.net
Thanks for the feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC