Edit report at https://bugs.php.net/bug.php?id=63955&edit=1
ID: 63955 Updated by: yohg...@php.net Reported by: slangley at google dot com Summary: Build fails if statically linking mbstring & libpng where png has a custom dir -Status: Open +Status: Feedback Type: Bug Package: mbstring related Operating System: N/A PHP Version: 5.4Git-2013-01-10 (Git) Block user comment: N Private report: N New Comment: It seems you have the same issue. https://bugs.php.net/bug.php?id=62480 Please refer to this bug, it it helps. Don't forget to mention about your OS (i.e. distribution and version) Previous Comments: ------------------------------------------------------------------------ [2013-01-10 05:01:31] slangley at google dot com 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 this bug report at https://bugs.php.net/bug.php?id=63955&edit=1