Bug 28710 - swig with php8 support
Summary: swig with php8 support
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2021-04-03 10:28 CEST by Nicolas Lécureuil
Modified: 2021-04-18 19:46 CEST (History)
4 users (show)

See Also:
Source RPM: swig-4.0.2-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Nicolas Lécureuil 2021-04-03 10:28:02 CEST
Upstream added php8 support for swig.


src:
    - swig-4.0.2-1.1.mga8


Advosory:

In mageia 8, swig have been provided with php support disabled because it didn't support.
This update add back php support.
Nicolas Lécureuil 2021-04-03 10:30:57 CEST

Assignee: bugsquad => qa-bugs

David Walser 2021-04-03 16:51:34 CEST

QA Contact: security => (none)
Component: Security => RPM Packages

Comment 1 Aurelien Oudelet 2021-04-15 18:10:23 CEST
Install OK with php8.

Not sure how to use this.

CC: (none) => ouaurelien

Comment 2 Len Lawrence 2021-04-17 00:59:10 CEST
@Aurelien, comment 1:
Have been looking at this, following up an example at http://www.swig.org/Doc4.0/Php.html of using swig to generate a php extension.  I know very little about php and nothing about swig but I think we should be able to run the example.  It involves some compilation which generated an error when I tried it it failed to finf zend.h.  So it needs the php-ZendFramework.  rpmfind indicates that we package it.  The file name given is php-ZendFramework2-Version-2.4.13-3.mga8.noarch.  Could not find it although '32-bit updates' was enabled.  Not in release either.

CC: (none) => tarazed25

Comment 3 Dave Hodgins 2021-04-17 01:53:47 CEST
# urpmf /zend.h|sort -u
php-devel:/usr/include/php/Zend/zend.h
php-devel:/usr/include/php/Zend/zend_hash.h
php-devel:/usr/include/php/Zend/zend_highlight.h

CC: (none) => davidwhodgins

Comment 4 Len Lawrence 2021-04-17 09:56:48 CEST
Thanks Dave - installed php-devel and there it was.
Running the compilation produced a large number of errors which might be related to missing support for php.  Tried again after updating swig:
$ swig -php8 example.i
swig error : Unrecognized option -php8
Use 'swig -help' for available options.

$ swig php -help | less
...
    -php7           - Generate PHP 7 wrappers

$ swig -php7 example.i
$ gcc $(php-config --includes) -fpic -c example_wrap.c example.c
$ ls
example.c  example.o    example_wrap.c  php_example.h
example.i  example.php  example_wrap.o

So, I wonder, where does php8 come into this?
$ rpm -qa | grep php
php-sysvsem-8.0.3-1.1.mga8
php-openssl-8.0.3-1.1.mga8
php-devel-8.0.3-1.1.mga8
php-zlib-8.0.3-1.1.mga8
php-cgi-8.0.3-1.1.mga8
php-sysvshm-8.0.3-1.1.mga8
php-session-8.0.3-1.1.mga8
php-cli-8.0.3-1.1.mga8
php-ini-8.0.3-1.1.mga8

Perhaps the -php7 is interpreted as >= php7?
In which case php8 support has been demonstrated.
Comment 5 Len Lawrence 2021-04-17 10:03:36 CEST
Or perhaps not.  The php extension still needs to be tried out.
Comment 6 Len Lawrence 2021-04-17 11:58:37 CEST
$ gcc -shared example_wrap.o example.o -o example.so
$ ls
example.c  example.o    example.so*     example_wrap.o  todo
example.i  example.php  example_wrap.c  php_example.h

The shared object file has been created but at this point I have absolutely no idea how to proceed.  Copied example.so to ~/dev/php.  /etc/php.ini probably needs to be modified in some way.
Comment 7 Len Lawrence 2021-04-17 21:34:59 CEST
With no possibility of getting any further with this in a finite time it will have to go out as it is.  The support for php8 has been confirmed but without any measure of its effectiveness.  Do we need a package list for this?
Comment 8 Aurelien Oudelet 2021-04-17 21:43:37 CEST
(In reply to Len Lawrence from comment #7)
> With no possibility of getting any further with this in a finite time it
> will have to go out as it is.  The support for php8 has been confirmed but
> without any measure of its effectiveness.  Do we need a package list for
> this?

*** Arch: i586 ***

RPMs from 'core/updates_testing'
========================
swig-4.0.2-1.1.mga8.i586.rpm
swig-doc-4.0.2-1.1.mga8.noarch.rpm

SRPM:
swig-4.0.2-1.1.mga8.src.rpm



*** Arch: x86_64 ***

RPMs from 'core/updates_testing'
========================
swig-4.0.2-1.1.mga8.x86_64.rpm
swig-doc-4.0.2-1.1.mga8.noarch.rpm

SRPM:
swig-4.0.2-1.1.mga8.src.rpm
Comment 9 Len Lawrence 2021-04-17 23:38:40 CEST
Thanks Aurelien.  Installed the doc package.  OK for x64.

Whiteboard: (none) => MGA8-64-OK

Comment 10 Aurelien Oudelet 2021-04-18 19:46:04 CEST
Validating.

Advisory:
========================

Updated swig packages restore php support

In Mageia 8, swig have been provided with php support disabled
because it didn't support php 8.0

This update adds back php support.

references:
https://bugs.mageia.org/show_bug.cgi?id=28710
========================

Updated packages from core/updates_testing
========================
swig-4.0.2-1.1.mga8.{i586,x86_64}.rpm
swig-doc-4.0.2-1.1.mga8.noarch.rpm

from SRPM:
swig-4.0.2-1.1.mga8.src.rpm

CC: (none) => sysadmin-bugs
Keywords: (none) => advisory, validated_update
Source RPM: (none) => swig-4.0.2-1.mga8.src.rpm


Note You need to log in before you can comment on or make changes to this bug.