From:             slangley at google dot com
Operating system: N/A
PHP version:      5.4Git-2013-01-10 (Git)
Package:          mbstring related
Bug Type:         Bug
Bug description:Build fails if statically linking mbstring & libpng where png 
has a custom dir

Description:
------------
THere is a build failure if you try and build a statically linked binary
with 
both mbstring & libpng where png has a custom library dir.

This is because the png library has a header file config.h, and mbstring
creates 
a header file config.h. During the build, the include path for libpng is 
included before the include path for the config generated mbstring path, so
that 
when files inside mbstring try to #include "config.h" the first config.h 
discovered in the search patch is the one for png, not the one for
mbstring.

e.g. the include path looks like

-I/home/foo/png_headers/include -I/home/foo/php/ext/mbstring/oniguruma -
I/home/foo/build/x86_64/ext/mbstring/oniguruma

Probably need to rename the config.h generated for mbstring by the
configure 
script to something a little less likely to have conflicts.


Test script:
---------------
./configure --enable-embed=static --enable-mbstring --with-gd
--with-png-dir=/some/custom/path
make all

Expected result:
----------------
Should build and link correctly.

Actual result:
--------------
ext/mbstring/oniguruma/regparse.c: In function
‘onig_scan_unsigned_number’:
ext/mbstring/oniguruma/regparse.c:1567: error: ‘SIZEOF_INT’ undeclared
(first use 
in this function)
ext/mbstring/oniguruma/regparse.c:1567: error: (Each undeclared identifier
is 
reported only once
ext/mbstring/oniguruma/regparse.c:1567: error: for each function it appears
in.)
ext/mbstring/oniguruma/regparse.c: In function
‘scan_unsigned_hexadecimal_number’:
ext/mbstring/oniguruma/regparse.c:1595: error: ‘SIZEOF_INT’ undeclared
(first use 
in this function)
ext/mbstring/oniguruma/regparse.c: In function
‘scan_unsigned_octal_number’:
ext/mbstring/oniguruma/regparse.c:1623: error: ‘SIZEOF_INT’ undeclared
(first use 
in this function)


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63955&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63955&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63955&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63955&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63955&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63955&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63955&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63955&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63955&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63955&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63955&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63955&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63955&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63955&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63955&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63955&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63955&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63955&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63955&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63955&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63955&r=mysqlcfg

Reply via email to