Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 780864 - media-gfx/exact-image[php] with PHP 8.0 - api/php/api-php-wrap.cc:772:3: error: #error These bindings need PHP7
Summary: media-gfx/exact-image[php] with PHP 8.0 - api/php/api-php-wrap.cc:772:3: erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-07 15:25 UTC by Brian Evans (RETIRED)
Modified: 2022-03-10 18:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
exact-image-build.log.xz (exact-image-build.log.xz,7.99 KB, text/plain)
2021-04-07 15:26 UTC, Brian Evans (RETIRED)
Details
text/plain (exact-image-1.0.2-r2.ebuild,3.87 KB, application/octet-stream)
2021-04-08 14:27 UTC, Brian Evans (RETIRED)
Details
exact-image-1.0.2-r2.ebuild (exact-image-1.0.2-r2.ebuild,3.87 KB, text/plain)
2021-04-08 14:28 UTC, Brian Evans (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Evans (RETIRED) gentoo-dev 2021-04-07 15:25:25 UTC
Since this package does not leverage PHP_TARGETS, it randomly fails based upon what is selected by 'eselect php set cli'. Also, will not allow multiple extension versions at the same time.

x86_64-pc-linux-gnu-g++ -Wall -O2  -fPIC -march=native -funroll-loops -fomit-frame-pointer -funswitch-loops -fpeel-loops -ftracer -funit-at-a-time -frename-registers -ftree-vectoriz
e -Wno-switch -Wno-switch-enum -Wno-sign-compare -O2 -pipe -march=core2 -mtune=sandybridge -fno-diagnostics-color -I . -I/usr/include/agg2 -I/usr/include/freetype2 -I image -I utili
ty -I codecs/ -I bardecode -I utility -I utility -I api -I/usr/lib64/php8.0/include/php -I/usr/lib64/php8.0/include/php/main -I/usr/lib64/php8.0/include/php/TSRM -I/usr/lib64/php8.0
/include/php/Zend -I/usr/lib64/php8.0/include/php/ext -I/usr/lib64/php8.0/include/php/ext/date/lib -fno-strict-aliasing  -shared -fPIC -o 'objdir/api/php/ExactImage.so' objdir/image
/image.a objdir/bardecode/bardecode.a objdir/codecs/codecs.a objdir/api/api.a objdir/api/php/api-php-wrap.cc -Wl,-O1 -Wl,--as-needed   -lagg -lz
objdir/api/php/api-php-wrap.cc:772:3: error: #error These bindings need PHP7 - to generate PHP5 bindings use: SWIG < 4.0.0 and swig -php5
  772 | # error These bindings need PHP7 - to generate PHP5 bindings use: SWIG < 4.0.0 and swig -php5
      |   ^~~~~
objdir/api/php/api-php-wrap.cc: In function ‘int SWIG_ConvertPtr(zval*, void**, swig_type_info*, int)’:
objdir/api/php/api-php-wrap.cc:963:54: error: cannot convert ‘zval*’ {aka ‘_zval_struct*’} to ‘zend_object*’ {aka ‘_zend_object*’} in argument passing
  963 |       HashTable * ht = Z_OBJ_HT_P(z)->get_properties(z);
      |                                                      ^
      |                                                      |
      |                                                      zval* {aka _zval_struct*}
objdir/api/php/api-php-wrap.cc: In function ‘void _wrap_newImage(zend_execute_data*, zval*)’:
objdir/api/php/api-php-wrap.cc:1209:1: warning: label ‘thrown’ defined but not used [-Wunused-label]
 1209 | thrown:
      | ^~~~~~
objdir/api/php/api-php-wrap.cc:1211:1: warning: label ‘fail’ defined but not used [-Wunused-label]
 1211 | fail:
      | ^~~~
Comment 1 Brian Evans (RETIRED) gentoo-dev 2021-04-07 15:26:10 UTC
Created attachment 698250 [details]
exact-image-build.log.xz

Build log
Comment 2 Brian Evans (RETIRED) gentoo-dev 2021-04-08 14:27:32 UTC
Created attachment 698592 [details]
text/plain

Proposed ebuild to limit PHP versions by target
Comment 3 Brian Evans (RETIRED) gentoo-dev 2021-04-08 14:28:13 UTC
Created attachment 698595 [details]
exact-image-1.0.2-r2.ebuild

Proposed ebuild to limit PHP versions by target
Comment 4 Brian Evans (RETIRED) gentoo-dev 2021-10-20 15:16:15 UTC
The real issue seems to be swig upstream which will be fixed in pending 4.1 version
Comment 5 Tupone Alfredo gentoo-dev 2022-03-02 20:53:49 UTC
Can you commit the changes for php errors based on the ebuild I have just pushed?
Comment 6 Larry the Git Cow gentoo-dev 2022-03-10 18:13:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7e870d68e3aba08ee6b366de054c122ae330f67

commit a7e870d68e3aba08ee6b366de054c122ae330f67
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2022-03-10 18:11:34 +0000
Commit:     Brian Evans <grknight@gentoo.org>
CommitDate: 2022-03-10 18:11:34 +0000

    media-gfx/exact-image: Add PHP_TARGETS in revbump
    
    Once swig is expanded to a newer version, PHP 8 targets can be added
    The swig-4.0.2 release only works with PHP 7
    
    Closes: https://bugs.gentoo.org/780864
    Signed-off-by: Brian Evans <grknight@gentoo.org>

 media-gfx/exact-image/exact-image-1.0.2-r4.ebuild | 176 ++++++++++++++++++++++
 1 file changed, 176 insertions(+)