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

 ID:                 52620
 User updated by:    tonywalton at btconnect dot com
 Reported by:        tonywalton at btconnect dot com
 Summary:            PHP fails to link as gethostuuid(2) does not exist
                     on MacOS 10.4.11
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Mac OS X 10.4.11
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

According to this log from the OpenNMS project, this appears to be a
generic 

sqlite3 problem.
http://www.opennms.org/~ranger/irc_logs/public/fink-2010-04-

12.log



gethostuuid(2) was introduced in MacOS 10.6 (Snow Leopard). This appears
to limit 

PHP to 5.2.2 or below on MacOS X below 10.6


Previous Comments:
------------------------------------------------------------------------
[2010-08-16 17:17:53] tonywalton at btconnect dot com

Description:
------------
$ uname -a

Darwin Tony-Waltons-MacBook.local 8.11.1 Darwin Kernel Version 8.11.1:
Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386
i386

$ './configure' '--prefix=/usr' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--with-ldap=/usr' '--with-kerberos=/usr'
'--enable-cli' '--with-zlib-dir=/usr' '--enable-exif' '--enable-ftp'
'--enable-mbstring' '--enable-mbregex' '--enable-sockets'
'--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc'
'--sysconfdir=/private/etc' '--without-pear'
'--with-mysql=/usr/local/mysql' '--with-apxs' '--with-jpeg-dir'
'--with-gd' '--enable-calendar' 

$ make

(lots of make, some non-fatal errors mainly regarding pointer
signedness. Full make output is available if required)





The final link phase fails with



/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:

_gethostuuid

collect2: ld returned 1 exit status

make: *** [libs/libphp5.bundle] Error 1





It seems that the call to gethostuuid() was introduced in PHP 5.3.3  in
ext/sqlite3/libsqlite/sqlite3.3 (at line 26934):



/* get the host ID via gethostuuid(), pHostID must point to
PROXY_HOSTIDLEN 

** bytes of writable memory.

*/

static int proxyGetHostID(unsigned char *pHostID, int *pError){

  struct timespec timeout = {1, 0}; /* 1 sec timeout */

  

  assert(PROXY_HOSTIDLEN == sizeof(uuid_t));

  memset(pHostID, 0, PROXY_HOSTIDLEN);

  if( gethostuuid(pHostID, &timeout) ){

    int err = errno;

    if( pError ){

      *pError = err;

    }

    return SQLITE_IOERR;

  }



MacOSX 10.4.11 has no gethostuuid(2) call; perhaps configure is at fault
and should sense the availability/nonavailability of the system call and
fall back to the PHP 5.3.2 behaviour if necessary (5.3.2 compiles and
links with no problem on this MacOSX release)

Expected result:
----------------
Clean compile/link

Actual result:
--------------
Link phase fails


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



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

Reply via email to