Błąd kompilacji starszych wersji PHP <=8.0
Maciej Kędzierski
pld-devel-pl-list at vip.server.pl
Tue Dec 3 16:49:46 CET 2024
Próbuję przebudować pakiety ze starszymi wersjami PHP, np. 7.4, czy 5.6
i kompilacje wyrzucają błędy.
Jeden błąd namierzyłem i jest związany z bibliotekami libxml2>=2.12.
libxml2-2.13.4-1
===================
# rpmbuild --rebuild php74-7.4.33-7.src.rpm
:
:
/bin/sh /root/rpm/BUILD/php-7.4.33/libtool --silent --preserve-dup-deps
--tag=CC --mode=compile x86_64-pld-linux-gcc
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/pcre/
-I/root/rpm/BUILD/php-7.4.33/ext/pcre/ -DP
HP_ATOM_INC -I/root/rpm/BUILD/php-7.4.33/include
-I/root/rpm/BUILD/php-7.4.33/main -I/root/rpm/BUILD/php-7.4.33
-I/usr/include/valgrind -I/root/rpm/BUILD/php-7.4.33/ext/date/lib
-I/usr/include/libxml2 -I/usr
/include/enchant -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/sysprof-6 -I/usr/include/fribidi -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/
webp -I/usr/include/imap
-I/root/rpm/BUILD/php-7.4.33/ext/mbstring/libmbfl
-I/root/rpm/BUILD/php-7.4.33/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell -I/usr/include/tidy -I/usr/include/xmlrpc-epi
-I/root/r
pm/BUILD/php-7.4.33/TSRM -I/root/rpm/BUILD/php-7.4.33/Zend
-DDEBUG_FASTCGI -DHAVE_STRNDUP -I/usr/include/xmlrpc-epi
-I/usr/include -O2 -fwrapv -pipe -Wformat -Werror=format-security
-gdwarf-4 -fno-debug-ty
pes-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2
-fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines
-fPIC -march=x86-64 -mtune=generic -gdwarf-4 -fno-debug-types-section
-fvar-tracking-assignments -g2 -fPIC -DPIC -Wall -Wno-strict-aliasing
-DZEND_SIGNALS -c /root/rpm/BUILD/php-7.4.33/ext/pcre/php_pcre.c -o
ext/pcre/php_pcre.lo
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:In function
'php_libxml_shutdown':
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:826:17:warning:
'xmlRelaxNGCleanupTypes' is deprecated [-Wdeprecated-declarations]
826 | xmlRelaxNGCleanupTypes();
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:41:
/usr/include/libxml2/libxml/relaxng.h:124:21:note: declared here
124 | xmlRelaxNGCleanupTypes (void);
| ^~~~~~~~~~~~~~~~~~~~~~
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:In function
'zif_libxml_use_internal_errors':
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:1032:48:warning:
comparison of distinct pointer types lacks a cast
[-Wcompare-distinct-pointer-types]
1032 | if (current_handler && current_handler
==php_libxml_structured_error_handler) {
| ^~
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:1050:49:error: passing
argument 2 of 'xmlSetStructuredErrorFunc' from incompatible pointer type
[-Wincompatible-pointer-types]
1050 | xmlSetStructuredErrorFunc(NULL,
php_libxml_structured_error_handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(void *, xmlError *) {aka void (*)(void *, struct
_xmlError *)}
In file included from /usr/include/libxml2/libxml/valid.h:16,
from /usr/include/libxml2/libxml/parser.h:20,
from /root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:34:
/usr/include/libxml2/libxml/xmlerror.h:905:57:note: expected
'xmlStructuredErrorFunc' {aka 'void (*)(void *, const struct _xmlError
*)'} but argument is of type 'void (*)(void *, xmlError *)' {aka 'void (*)
(void *, struct _xmlError *)'}
905 | xmlStructuredErrorFunc handler);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:In function
'zif_libxml_get_last_error':
/root/rpm/BUILD/php-7.4.33/ext/libxml/libxml.c:1066:15:warning:
assignment discards 'const' qualifier from pointer target type
[-Wdiscarded-qualifiers]
1066 | error =xmlGetLastError();
| ^
make: *** [Makefile:607: ext/libxml/libxml.lo] Error 1
make: *** Waiting for unfinished jobs....
błąd: Błędny stan wyjścia z /root/tmp/rpm-tmp.m5vjSQ (%build)
RPM build warnings:
php74-7.4.33-7.src.rpm: Nagłówek V4 DSA/SHA1 Signature,
identyfikator klucza e4f1bc2d: NOKEY
użytkownik builder nie istnieje — używanie root
użytkownik builder nie istnieje — używanie root
** ciach **
użytkownik builder nie istnieje — używanie root
użytkownik builder nie istnieje — używanie root
382. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
phpfi
589. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-pecl-domxml
630. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-devel
876. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-mime_magic
Wpisy w %changelog nie są w porządku chronologicznym
RPM build errors:
Błędny stan wyjścia z /root/tmp/rpm-tmp.m5vjSQ (%build)
Po przywróceniu wersji libxml2-2.11.5, kompilacja przechodzi dalej, ale
wyrzuca błąd w innym miejscu.
Tego już nie mogę namierzyć, co za to odpowiada.
libxml2-2.11.5-1
================
/bin/sh /root/rpm/BUILD/php-7.4.33/libtool --silent --preserve-dup-deps
--tag=CC --mode=compile x86_64-pld-linux-gcc
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/standard/
-I/root/rpm/BUILD/php-7.4.33/ext/stand
ard/ -DPHP_ATOM_INC -I/root/rpm/BUILD/php-7.4.33/include
-I/root/rpm/BUILD/php-7.4.33/main -I/root/rpm/BUILD/php-7.4.33
-I/usr/include/valgrind -I/root/rpm/BUILD/php-7.4.33/ext/date/lib
-I/usr/include/libxml
2 -I/usr/include/enchant -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6
-I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/harfbuzz -I/usr/
include/webp -I/usr/include/imap
-I/root/rpm/BUILD/php-7.4.33/ext/mbstring/libmbfl
-I/root/rpm/BUILD/php-7.4.33/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell -I/usr/include/tidy -I/usr/include/xmlrpc-epi -
I/root/rpm/BUILD/php-7.4.33/TSRM -I/root/rpm/BUILD/php-7.4.33/Zend
-DDEBUG_FASTCGI -DHAVE_STRNDUP -I/usr/include/xmlrpc-epi
-I/usr/include -O2 -fwrapv -pipe -Wformat -Werror=format-security
-gdwarf-4 -fno-
debug-types-section -fvar-tracking-assignments -g2
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
--param=ssp-buffer-size=4 -Werror=trampolines -fPIC -march=x86-64
-mtune=generic -gdwarf-4 -fno-debug-types
-section -fvar-tracking-assignments -g2 -fPIC -DPIC -Wall
-Wno-strict-aliasing -DZEND_SIGNALS -c
/root/rpm/BUILD/php-7.4.33/ext/standard/math.c -o ext/standard/math.lo
/root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:In function 'zif_mail':
/root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:329:25:error: passing
argument 1 of 'strncasecmp' from incompatible pointer type
[-Wincompatible-pointer-types]
329 | if (strncasecmp(headers, "to:", sizeof("to:") - 1) == 0
|| strcasestr(headers, "\nto:")) {
| ^~~~~~~
| |
| zval * {aka struct _zval_struct *}
In file included from /usr/include/string.h:462,
from
/root/rpm/BUILD/php-7.4.33/include/../main/php_config.h:2397,
from /root/rpm/BUILD/php-7.4.33/Zend/zend_config.h:1,
from
/root/rpm/BUILD/php-7.4.33/Zend/zend_portability.h:43,
from /root/rpm/BUILD/php-7.4.33/Zend/zend_types.h:25,
from /root/rpm/BUILD/php-7.4.33/Zend/zend.h:27,
from /root/rpm/BUILD/php-7.4.33/main/php.h:33,
from /root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:23:
/usr/include/strings.h:120:37:note: expected 'const char *' but argument
is of type 'zval *' {aka 'struct _zval_struct *'}
120 | extern int strncasecmp (const char *__s1, const char *__s2,
size_t __n)
| ~~~~~~~~~~~~^~~~
/root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:329:79:error: passing
argument 1 of 'strcasestr' from incompatible pointer type
[-Wincompatible-pointer-types]
329 | if (strncasecmp(headers, "to:", sizeof("to:") - 1) == 0
|| strcasestr(headers, "\nto:")) {
| ^~~~~~~
| |
| zval * {aka struct _zval_struct *}
/usr/include/string.h:380:38:note: expected 'const char *' but argument
is of type 'zval *' {aka 'struct _zval_struct *'}
380 | extern char *strcasestr (const char *__haystack, const char
*__needle)
| ~~~~~~~~~~~~^~~~~~~~~~
/root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:333:25:error: passing
argument 1 of 'strncasecmp' from incompatible pointer type
[-Wincompatible-pointer-types]
333 | if (strncasecmp(headers, "subject:", sizeof("subject:")
- 1) == 0 || strcasestr(headers, "\nsubject:")) {
| ^~~~~~~
| |
| zval * {aka struct _zval_struct *}
/usr/include/strings.h:120:37:note: expected 'const char *' but argument
is of type 'zval *' {aka 'struct _zval_struct *'}
120 | extern int strncasecmp (const char *__s1, const char *__s2,
size_t __n)
| ~~~~~~~~~~~~^~~~
/root/rpm/BUILD/php-7.4.33/ext/standard/mail.c:333:89:error: passing
argument 1 of 'strcasestr' from incompatible pointer type
[-Wincompatible-pointer-types]
333 | if (strncasecmp(headers, "subject:", sizeof("subject:")
- 1) == 0 || strcasestr(headers, "\nsubject:")) {
| ^~~~~~~
| |
| zval * {aka struct _zval_struct *}
/usr/include/string.h:380:38:note: expected 'const char *' but argument
is of type 'zval *' {aka 'struct _zval_struct *'}
380 | extern char *strcasestr (const char *__haystack, const char
*__needle)
| ~~~~~~~~~~~~^~~~~~~~~~
make: *** [Makefile:1817: ext/standard/mail.lo] Error 1
make: *** Waiting for unfinished jobs....
błąd: Błędny stan wyjścia z /root/tmp/rpm-tmp.1AJFig (%build)
RPM build warnings:
php74-7.4.33-7.src.rpm: Nagłówek V4 DSA/SHA1 Signature,
identyfikator klucza e4f1bc2d: NOKEY
użytkownik builder nie istnieje — używanie root
użytkownik builder nie istnieje — używanie root
** ciach **
użytkownik builder nie istnieje — używanie root
382. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
phpfi
589. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-pecl-domxml
630. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-devel
876. wiersz: Obsoletes bez wersji są niezalecane: Obsoletes:
php-mime_magic
Wpisy w %changelog nie są w porządku chronologicznym
RPM build errors:
Błędny stan wyjścia z /root/tmp/rpm-tmp.1AJFig (%build)
Z tego co widzę, to ostatnie kompilacje były na wersjach 8.2 i 8.3,
starsze nie były dotykane od lipca.
Jeszcze udało się przebudować php81-8.1.30-1.src.rpm. Wszystkie starsze
8.0 w dół generują podobne błędy przy kompilacji.
Pytanie, czy są gdzieś dostępne jakieś łatki, żeby starsze wersje PHPów
się kompilowały i czy są plany na dalszego ich utrzymywania w dystrybucji?
Pozdrawiam
Maciej
More information about the pld-devel-pl
mailing list