Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php mapscript build error with php 5.6.25 #5318

Closed
wants to merge 2 commits into from
Closed

php mapscript build error with php 5.6.25 #5318

wants to merge 2 commits into from

Conversation

tbonfort
Copy link
Member

@tbonfort tbonfort commented Sep 2, 2016

5.6.23 builds fine, 5.6.25 fails with:

/usr/obj/ports/mapserver-7.0.1/mapserver-7.0.1/mapscript/php/error.c:71: error: called object 'zend_error' is not a function

pointing at https://github.com/mapserver/mapserver/blob/branch-7-0/mapscript/php/error.c#L71

this seems caused by this upstream change: http://git.php.net/?p=php-src.git;a=commitdiff;h=791a98eb1c66d2340b4e897ab60e4a6700435b5b

When unrolling the IF_GET_STRING macro, something blows.. tried with gcc 4.2.1 and clang 3.8.1, using libestdc++ 4.2.1 in both cases.

@landryb
Copy link
Contributor Author

landryb commented Sep 2, 2016

Adding

 #undef ZVAL_STRING
 #define ZVAL_STRING(z, s, duplicate) do {       \
                 const char *__s=(s);                            \
                 zval *__z = (z);                                        \
                 Z_STRLEN_P(__z) = strlen(__s);          \
                 Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
                 Z_TYPE_P(__z) = IS_STRING;                      \
         } while (0)

to the top of error.c after the #include work arounds the issue - the defined is copied from zend_API.h

@landryb
Copy link
Contributor Author

landryb commented Sep 2, 2016

Im not sure that's a correct fix but this macro maze is beyond every horror i saw so far.

@tbonfort
Copy link
Member

tbonfort commented Sep 2, 2016

@landryb it fixes the broken tests we were having with 5.6.25 on travis CI, thanks!

@tbonfort
Copy link
Member

tbonfort commented Sep 13, 2016

This PR needs to be checked against php <=5.6.24 before merge

@jmckenna jmckenna modified the milestones: 7.0.2 Release, 7.2 Release Sep 15, 2016
AlexanderGabriel pushed a commit to AlexanderGabriel/mapserver that referenced this pull request Nov 8, 2016
AlexanderGabriel pushed a commit to AlexanderGabriel/mapserver that referenced this pull request Nov 8, 2016
@tbonfort tbonfort modified the milestones: 7.0.3 Release, 7.2 Release Dec 5, 2016
tbonfort added a commit that referenced this pull request Dec 5, 2016
@tbonfort
Copy link
Member

tbonfort commented Dec 5, 2016

applied to branch-7-0 in d5cc584

@tbonfort tbonfort closed this Dec 5, 2016
@sdlime
Copy link
Member

sdlime commented Nov 13, 2017

@jmckenna, should this be back ported to the 6.4 branch? --Steve

hakrdinesh pushed a commit to hakrtech/openbsd-ports0-test that referenced this pull request Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants