From:
Operating system: HP-UX 11.11
PHP version: 5.3.7RC3
Package: *Compile Issues
Bug Type: Bug
Bug description:Unsatisfied symbols __sync_fetch_and_add_4
Description:
------------
Hello,
I've compiled PHP 5.3.7 RC3 on HP-UX 11.11 with gcc 4.1.2 and following
parameters :
./configure --with-config-file-path=/path/to/etc/php
--with-imap=/path/to/imap --with-imap-ssl=/usr
--with-libxml-dir=/path/to/libxml2 --with-gd --with-png-dir=/path/to/libpng
--with-jpeg-dir=/path/to/jpeg --with-ldap --prefix=/path/to/php
--with-ncurses=/path/to/ncurses --with-freetype-dir=/path/to/freetype
I've this error after make :
/usr/ccs/bin/ld: Unsatisfied symbols:
__sync_fetch_and_add_4 (first referenced in ext/standard/php_crypt_r.o)
(code)
collect2: ld returned 1 exit status
*** Error exit code 1
It works fine with PHP 5.3.6 but not with PHP 5.3.7 RC3.
The diff between 5.3.6 and PHP 5.3.7 RC3 for ext/standard/php_crypt_r.c is
:
1c1
< /* $Id: php_crypt_r.c 311390 2011-05-24 13:48:04Z pajoye $ */
---
> /* $Id: php_crypt_r.c 306939 2011-01-01 02:19:59Z felipe $ */
97c97
< #elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1))
---
> #elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2))
200c200
< dwHashLen = 16;
---
> dwHashLen = pwl + sl + pwl;
I've resolved the situation by return back for line 97 from
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1))
__sync_fetch_and_add(&initialized, 1);
to
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2))
__sync_fetch_and_add(&initialized, 1);
--
Edit bug report at https://bugs.php.net/bug.php?id=55231&edit=1
--
Try a snapshot (PHP 5.2):
https://bugs.php.net/fix.php?id=55231&r=trysnapshot52
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55231&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=55231&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55231&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=55231&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55231&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=55231&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=55231&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=55231&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=55231&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=55231&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=55231&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=55231&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55231&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=55231&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55231&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=55231&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=55231&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=55231&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=55231&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=55231&r=mysqlcfg
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55231&r=trysnapshot54