From:             sietse at wizdom dot nu
Operating system: All
PHP version:      5.2.1
PHP Bug Type:     XMLRPC-EPI related
Bug description:  PHP 5.2.1 - MySQL 5.2.3 - Internal Function Conflict in 
base64.h

Description:
------------
Hi, I was compiling php 5.2.1 against mysql 5.2.3 with embedded mysqli
support.

I came across a conflict when linking libphp5.so.

Seems that both MySQL's NDB (include/base64.h) and PHP's XMLRPC
(ext/xmlrpc/libxmlrpc/base64.h) both define internal base64_encode() and
base64_decode() functions.

I think gcc4.x will be able to fix this, as you have the ability to set
visibility of internal functions. But good practice is always to name your
internal functions as explicitely and descriptively as possible.

I have opened the same bug @ MySQL. They should name there internal
functions more explicitely too.

To quickly patch, add:
#define base64_encode base64_encode_bla
#define base64_decode base64_decode_bla

to either MySQL's include/base64.h OR PHP's ext/xmlrpc/libxmlrpc/base64.h

Reproduce code:
---------------
Compile php5.2.1 with mysqli-embedded support against Mysql 5.2.3 with ndb
plugin.

Expected result:
----------------
succesful compile and linking

Actual result:
--------------
linker error message, conflicting symbols.

-- 
Edit bug report at http://bugs.php.net/?id=40703&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40703&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40703&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40703&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40703&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40703&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40703&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40703&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40703&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40703&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40703&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40703&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40703&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40703&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40703&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40703&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40703&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40703&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40703&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40703&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40703&r=mysqlcfg

Reply via email to