Bug #63955 [NoF->Csd]: Build fails if statically linking mbstring & libpng where png has a custom dir
Edit report at https://bugs.php.net/bug.php?id=63955&edit=1
ID: 63955
User updated by: slangley at google dot com
Reported by: slangley at google dot com
Summary: Build fails if statically linking mbstring & libpng
where png has a custom dir
-Status: No Feedback
+Status: Closed
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:
I fixed it by fixing the paths to refer to the correct location of config.h.
I'll upstream a PR someday.
Previous Comments:
------------------------------------------------------------------------
[2013-10-15 11:54:35] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2013-06-29 05:08:43] yohgaki@php.net
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)
------------------------------------------------------------------------
[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
Thread (4 messages)