Topic: PHP 5.5.15 - warning wddx

Bonjour,

Je suis actuellement en train de compiler & packager PHP en version 5.5.15 avec le specfile suivant (Redhat 6.5 - epel-6-x86_64):
https://github.com/remicollet/remirepo/ … php55.spec

Tout se passe bien, les packages sont bien générés et fonctionnels. J'ai toutefois une remontée de warning a chaque appel à la commande php, ou au start d'une instance php-fpm, une fois le package php55-xml installé :

[11-Aug-2014 18:38:47 Europe/Paris] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php-5.5/lib64/php/modules/wddx.so' - /usr/local/php-5.5/lib64/php/modules/wddx.so: undefined symbol: php_XML_Parse in Unknown on line 0

La librairie existe bien, et comme on pouvait s'y attendre au vu du warning PHPInfo m'indique que la librairie n'est pas chargée.

L'analyse des traces de compilation remonte les warning suivant lors de la compil :

/builddir/build/BUILD/php-5.5.15/ext/wddx/wddx.c: In function 'php_wddx_serialize_object':
/builddir/build/BUILD/php-5.5.15/ext/wddx/wddx.c:531: warning: passing argument 2 of 'zend_hash_get_current_key_ex' from incompatible pointer type
/builddir/build/BUILD/php-5.5.15/Zend/zend_hash.h:179: note: expected 'char ' but argument is of type 'const char '
/builddir/build/BUILD/php-5.5.15/ext/wddx/wddx.c:535: warning: passing argument 3 of 'php_wddx_serialize_var' discards qualifiers from pointer target type
/builddir/build/BUILD/php-5.5.15/ext/wddx/php_wddx_api.h:63: note: expected 'char *' but argument is of type 'const char *'

Ci dessous, le détail du "configure" :

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr/local/php-5.5 --exec-prefix=/usr/local/php-5.5 --bindir=/usr/local/php-5.5/bin --sbindir=/usr/local/php-5.5/sbin --sysconfdir=/etc --datadir=/usr/local/php-5.5/share --includedir=/usr/local/php-5.5/include --libdir=/usr/local/php-5.5/lib64 --libexecdir=/usr/local/php-5.5/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc/lbn/php --with-config-file-scan-dir=/etc/php/5.5/conf.d --disable-debug --with-pic --disable-rpath --without-pear --with-exec-dir=/usr/local/php-5.5/bin --with-freetype-dir=/usr/local/php-5.5 --with-png-dir=/usr/local/php-5.5 --with-xpm-dir=/usr/local/php-5.5 --enable-gd-native-ttf --with-t1lib=/usr/local/php-5.5 --without-gdbm --with-jpeg-dir=/usr/local/php-5.5 --with-openssl --with-zlib --with-layout=GNU --with-kerberos --with-libxml-dir=/usr/local/php-5.5 --with-system-tzdata --with-mhash --enable-dtrace --libdir=/usr/local/php-5.5/lib64/php --enable-pcntl --enable-opcache --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-gd=shared --with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared --enable-dba=shared --with-db4=/usr --with-gdbm=/usr --with-tcadb=/usr --enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared --with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-mysql-sock=/var/run/daemon/mysql/mysql.sock --with-interbase=shared,/usr/local/php-5.5/lib64/firebird --with-pdo-firebird=shared,/usr/local/php-5.5/lib64/firebird --enable-dom=shared --with-pgsql=shared --enable-simplexml=shared --enable-xml=shared     --enable-wddx=shared     --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --with-curl=shared,/usr --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr --with-pdo-dblib=shared,/usr --with-sqlite3=shared,/usr --without-readline --with-libedit --with-pspell=shared --enable-phar=shared --with-mcrypt=shared,/usr --with-tidy=shared,/usr --with-mssql=shared,/usr --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared --enable-shmop=shared --enable-posix=shared --with-unixODBC=shared,/usr --enable-fileinfo=shared --enable-intl=shared --with-icu-dir=/usr --with-enchant=shared,/usr --with-recode=shared,/usr

Après différentes lecture, j'ai vu qu'il y avait des dépendances avec "expat" et que des gens ajoutent les flags "--with-expat-dir, --with-expat", mais sans succès.

Avez vous rencontré ce warning et réussi à faire fonctionner le module wddx ??

Re: PHP 5.5.15 - warning wddx

Le spec indiqué me permet de générer les RPM binaires, compilés avec RHEL-6.5 sans aucun problème.
Donc je pense à une modification erronée ou un environnement de construction incorrect.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 5.5.15 - warning wddx

ok !
Je regarde et vous tiens au courant.

Re: PHP 5.5.15 - warning wddx

Et si l'objectif et de renommer les paquets et d'autoriser une installation en parallèle, le plus simple et de regarder aux softwares collections, disponible pour RHEL-6.5.

Voir: http://blog.famillecollet.com/tag/SCL

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

5 (edited by franckylourson 2014-08-18 18:13:54)

Re: PHP 5.5.15 - warning wddx

Salut Rémi !

J'ai fini par corriger le warning.
Le problème venait du fait que dans les fichier "*.ini" du package "php-xml*5.5.15" le nom du fichier ini pour wddx était nommé "wddx.ini" et non pas "xml_wddx.ini" (cf. ton package).
Les extensions étant chargées par ordre alphabétique le fichier "wddx.ini" était prise en compte avant "xml.ini" d'ou le fait que des symboles n'était pas reconnus.

Cela venait d'une erreur de modification du fichier SPEC, ou j'ai remplacer "${ini}" par "${mod}.ini"...

      #cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${ini} <<EOF
      cat > $RPM_BUILD_ROOT%{_sysconfdir}/php/5.5/conf.d/${mod}.ini <<EOF
; Enable ${mod} extension module
extension=${mod}.so

Merci !

Franck.

ps : Oups, je ne trouve pas comment passer le sujet en résolu hmm