[redland-dev] [Redland Language Bindings 0000622]: Fails to buld with PHP 7

Mantis Bug Tracker mantis-bug-sender at librdf.org
Wed Jun 14 01:33:09 EDT 2017


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=622 
====================================================================== 
Reported By:                ppisar
Assigned To:                
====================================================================== 
Project:                    Redland Language Bindings
Issue ID:                   622
Category:                   installation
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Binding Language (java, perl, php, python, ruby, tcl): php 
====================================================================== 
Date Submitted:             2017-06-13 22:33
Last Modified:              2017-06-13 22:33
====================================================================== 
Summary:                    Fails to buld with PHP 7
Description: 
After upgrading PHP to 7.1.6, the build fails with:

gcc -DHAVE_CONFIG_H  -I. -DREDLAND_POST_I -DREDLAND_INIT_I -DREDLAND_DECL_I
-DREDLAND_TYPE
MAP_I -UHAVE_CONFIG_H   -I/usr/include/raptor2 -I/usr/include/rasqal 
-I/usr/include/php -
I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend
-I/usr/include/php/
ext -I/usr/include/php/ext/date/lib -DREDLAND_BINDINGS_VERSION=\"1.0.16.1\"  -O2
-g -pipe 
-Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-stron
g --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-harden
ed-cc1 -m64 -mtune=generic  -I/usr/include/raptor2 -I/usr/include/rasqal   -O2
-g -pipe -W
all -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong 
--param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened
-cc1 -m64 -mtune=generic -fPIC -DPIC redland_wrap.c -c -o redland_wrap.o
redland_wrap.c:730:3: error: #error These bindings need PHP5 - to generate PHP7
bindings use: swig -php7
 # error These bindings need PHP5 - to generate PHP7 bindings use: swig -php7
   ^~~~~

After patching configure.ac to invoke swig with -php7 option, it will fail due
to changes in PHP Zend API.

A possible fix is attached. It builds, tests pass, but because I have zero
knowledge about PHP, it's possible it contains some mistakes. It definitely
breaks compatibility with PHP 5.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2017-06-13 22:33 ppisar         New Issue                                    
2017-06-13 22:33 ppisar         File Added:
redland-bindings-1.0.16.1-Add-PHP-7-support.patch                    
======================================================================



More information about the redland-dev mailing list