Edit report at http://bugs.php.net/bug.php?id=54371&edit=1

 ID:                 54371
 Updated by:         srina...@php.net
 Reported by:        wyatt at lle dot rochester dot edu
 Summary:            Undefined symbol: __sync_fetch_and_add_4
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   SunOS 5.10 Generic_14290
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

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"


Previous Comments:
------------------------------------------------------------------------
[2011-03-24 19:00:35] s...@php.net

Also see http://bugs.php.net/53310

------------------------------------------------------------------------
[2011-03-24 18:50:59] s...@php.net

Have you tried the free 64bit Oracle Instant Client libraries?

http://www.oracle.com/technetwork/topics/sol64soft-085649.html

------------------------------------------------------------------------
[2011-03-24 16:12:22] 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 16:10:50] 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



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



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54371&edit=1

Reply via email to