Skip to content

php 8.1.31 make error #17269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1265578519 opened this issue Dec 25, 2024 · 7 comments
Closed

php 8.1.31 make error #17269

1265578519 opened this issue Dec 25, 2024 · 7 comments

Comments

@1265578519
Copy link

Description

php 8.1.31 make error

/bin/sh /root/php-8.1.31/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -std=gnu99 -Iext/libxml/ -I/root/php-8.1.31/ext/libxml/ -I/root/php-8.1.31/include -I/root/php-8.1.31/main -I/root/php-8.1.31 -I/root/php-8.1.31/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/libpng12 -I/root/php-8.1.31/ext/mbstring/libmbfl -I/root/php-8.1.31/ext/mbstring/libmbfl/mbfl -I/root/php-8.1.31/TSRM -I/root/php-8.1.31/Zend    -fno-common -Wstrict-prototypes -Wlogical-op -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-8.1.31/ext/libxml/libxml.c -o ext/libxml/libxml.lo  -MMD -MF ext/libxml/libxml.dep -MT ext/libxml/libxml.lo
In file included from /root/php-8.1.31/ext/libxml/libxml.c:43:
/root/php-8.1.31/ext/libxml/php_libxml.h: 在函数‘php_libxml_sanitize_parse_ctxt_options’中:
/root/php-8.1.31/ext/libxml/php_libxml.h:170: 错误:#pragma GCC diagnostic 不允许用在函数体中
/root/php-8.1.31/ext/libxml/php_libxml.h:170: 错误:#pragma GCC diagnostic 不允许用在函数体中
/root/php-8.1.31/ext/libxml/php_libxml.h:178: 错误:#pragma GCC diagnostic 不允许用在函数体中
make: *** [ext/libxml/libxml.lo] 错误 1

PHP Version

8.1.31

Operating System

No response

@devnexen
Copy link
Member

devnexen commented Dec 25, 2024

Reminds me this case #14497. What s your compiler version ? ie cc -v.

@1265578519
Copy link
Author

Reminds me this case #14497. What s your compiler version ? ie cc -v.

Building other versions of PHP is normal, the error only occurs on PHP8.1
[root@192 ~]# gcc -v
使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)

@devnexen
Copy link
Member

Building other versions of PHP is normal, the error only occurs on PHP8.1

Which other versions of PHP did you try ?

@1265578519
Copy link
Author

Which other versions of PHP did you try ?

Successfully compiled and working versions
php5.2-5.6
php7.0-7.4
php8.0.30

Versions with make errors same
php8.1.31 php8.2.27

trying to update gcc, report results later

@1265578519
Copy link
Author

update gcc 4.9.4 make errors same

update gcc 5.5.0 make errors changes

/bin/sh /root/php-8.1.31/libtool --silent --preserve-dup-deps --tag CC --mode=install cp ext/opcache/opcache.la /root/php-8.1.31/modules
/bin/sh /root/php-8.1.31/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/standard/ -I/root/php-8.1.31/ext/standard/ -I/root/php-8.1.31/include -I/root/php-8.1.31/main -I/root/php-8.1.31 -I/root/php-8.1.31/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/libpng12 -I/root/php-8.1.31/ext/mbstring/libmbfl -I/root/php-8.1.31/ext/mbstring/libmbfl/mbfl -I/root/php-8.1.31/TSRM -I/root/php-8.1.31/Zend    -fno-common -Wstrict-prototypes -Wlogical-op -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-8.1.31/ext/standard/base64.c -o ext/standard/base64.lo  -MMD -MF ext/standard/base64.dep -MT ext/standard/base64.lo
/tmp/cc4HghGN.s: Assembler messages:
/tmp/cc4HghGN.s:549: Error: no such instruction: `vpermd (%rbx),%ymm1,%ymm1'
/tmp/cc4HghGN.s:577: Error: suffix or operands invalid for `vpshufb'
/tmp/cc4HghGN.s:597: Error: suffix or operands invalid for `vpand'
/tmp/cc4HghGN.s:603: Error: suffix or operands invalid for `vpand'
/tmp/cc4HghGN.s:609: Error: suffix or operands invalid for `vpmulhuw'
/tmp/cc4HghGN.s:615: Error: suffix or operands invalid for `vpmullw'
/tmp/cc4HghGN.s:616: Error: suffix or operands invalid for `vpor'
/tmp/cc4HghGN.s:626: Error: suffix or operands invalid for `vpcmpgtb'
/tmp/cc4HghGN.s:632: Error: suffix or operands invalid for `vpsubusb'
/tmp/cc4HghGN.s:638: Error: suffix or operands invalid for `vpsubb'
/tmp/cc4HghGN.s:639: Error: suffix or operands invalid for `vpshufb'
/tmp/cc4HghGN.s:647: Error: suffix or operands invalid for `vpaddb'
/tmp/cc4HghGN.s:1195: Error: suffix or operands invalid for `vpcmpeqb'
/tmp/cc4HghGN.s:1215: Error: suffix or operands invalid for `vpaddb'
/tmp/cc4HghGN.s:1216: Error: suffix or operands invalid for `vpshufb'
/tmp/cc4HghGN.s:1225: Error: suffix or operands invalid for `vpaddb'
/tmp/cc4HghGN.s:1227: Error: suffix or operands invalid for `vpmaddubsw'
/tmp/cc4HghGN.s:1234: Error: suffix or operands invalid for `vpmaddwd'
/tmp/cc4HghGN.s:1240: Error: suffix or operands invalid for `vpshufb'
/tmp/cc4HghGN.s:1246: Error: no such instruction: `vpermd %ymm0,%ymm7,%ymm0'
/tmp/cc4HghGN.s:1277: Error: suffix or operands invalid for `vpsrld'
/tmp/cc4HghGN.s:1284: Error: suffix or operands invalid for `vpand'
/tmp/cc4HghGN.s:1290: Error: suffix or operands invalid for `vpand'
/tmp/cc4HghGN.s:1296: Error: suffix or operands invalid for `vpshufb'
/tmp/cc4HghGN.s:1301: Error: suffix or operands invalid for `vpshufb'
make: *** [ext/standard/base64.lo] 错误 1

update gcc 9.5.0 make errors

/bin/sh /root/php-8.1.31/libtool --silent --preserve-dup-deps --tag CC --mode=install cp ext/opcache/opcache.la /root/php-8.1.31/modules
/bin/sh /root/php-8.1.31/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/standard/ -I/root/php-8.1.31/ext/standard/ -I/root/php-8.1.31/include -I/root/php-8.1.31/main -I/root/php-8.1.31 -I/root/php-8.1.31/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/include/libpng12 -I/root/php-8.1.31/ext/mbstring/libmbfl -I/root/php-8.1.31/ext/mbstring/libmbfl/mbfl -I/root/php-8.1.31/TSRM -I/root/php-8.1.31/Zend    -fno-common -Wstrict-prototypes -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-8.1.31/ext/standard/base64.c -o ext/standard/base64.lo  -MMD -MF ext/standard/base64.dep -MT ext/standard/base64.lo
/tmp/ccIN3E2O.s: Assembler messages:
/tmp/ccIN3E2O.s:467: Error: no such instruction: `vinserti128 $0x1,-8(%rbx),%ymm3,%ymm1'
/tmp/ccIN3E2O.s:501: Error: no such instruction: `vpermd %ymm1,%ymm0,%ymm1'
/tmp/ccIN3E2O.s:538: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:591: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:597: Error: suffix or operands invalid for `vpmulhuw'
/tmp/ccIN3E2O.s:636: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:642: Error: suffix or operands invalid for `vpmullw'
/tmp/ccIN3E2O.s:648: Error: suffix or operands invalid for `vpor'
/tmp/ccIN3E2O.s:684: Error: suffix or operands invalid for `vpcmpgtb'
/tmp/ccIN3E2O.s:691: Error: suffix or operands invalid for `vpsubusb'
/tmp/ccIN3E2O.s:724: Error: suffix or operands invalid for `vpsubb'
/tmp/ccIN3E2O.s:731: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:753: Error: suffix or operands invalid for `vpaddb'
/tmp/ccIN3E2O.s:763: Error: no such instruction: `vextracti128 $0x1,%ymm0,40(%rax)'
/tmp/ccIN3E2O.s:823: Error: no such instruction: `vinserti128 $0x1,-12(%rbx),%ymm1,%ymm1'
/tmp/ccIN3E2O.s:831: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:864: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:870: Error: suffix or operands invalid for `vpmulhuw'
/tmp/ccIN3E2O.s:909: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:915: Error: suffix or operands invalid for `vpmullw'
/tmp/ccIN3E2O.s:921: Error: suffix or operands invalid for `vpor'
/tmp/ccIN3E2O.s:957: Error: suffix or operands invalid for `vpcmpgtb'
/tmp/ccIN3E2O.s:964: Error: suffix or operands invalid for `vpsubusb'
/tmp/ccIN3E2O.s:997: Error: suffix or operands invalid for `vpsubb'
/tmp/ccIN3E2O.s:1003: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:1025: Error: suffix or operands invalid for `vpaddb'
/tmp/ccIN3E2O.s:1035: Error: no such instruction: `vextracti128 $0x1,%ymm0,-16(%rdx)'
/tmp/ccIN3E2O.s:2054: Error: suffix or operands invalid for `vpcmpeqb'
/tmp/ccIN3E2O.s:2066: Error: suffix or operands invalid for `vpaddb'
/tmp/ccIN3E2O.s:2072: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:2106: Error: suffix or operands invalid for `vpaddb'
/tmp/ccIN3E2O.s:2115: Error: suffix or operands invalid for `vpmaddubsw'
/tmp/ccIN3E2O.s:2133: Error: suffix or operands invalid for `vpmaddwd'
/tmp/ccIN3E2O.s:2152: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:2171: Error: no such instruction: `vpermd %ymm0,%ymm6,%ymm0'
/tmp/ccIN3E2O.s:2183: Error: no such instruction: `vextracti128 $0x1,%ymm0,40(%rax,%rdx)'
/tmp/ccIN3E2O.s:2211: Error: no such instruction: `vinserti128 $0x1,16(%rbx),%ymm0,%ymm10'
/tmp/ccIN3E2O.s:2239: Error: suffix or operands invalid for `vpsrld'
/tmp/ccIN3E2O.s:2247: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:2270: Error: suffix or operands invalid for `vpand'
/tmp/ccIN3E2O.s:2276: Error: suffix or operands invalid for `vpshufb'
/tmp/ccIN3E2O.s:2285: Error: suffix or operands invalid for `vpshufb'
make: *** [ext/standard/base64.lo] 错误 1

@nielsdos
Copy link
Member

The reason you're now getting assembly errors is because your gcc is modern but your binutils is still outdated. Updating binutils as well should resolve that.
Anyway, you're using a very outdated toolchain (12 years old), this won't work to compile modern PHP.

@1265578519
Copy link
Author

Thank you. I can't find any PHP8.1 on search engine.
binutils-2.20.51.0.2-5.48.el6_10.1.x86_64 update 2.38 as --version
image

Successfully run php8.1. it is found that the apcu extension and libmemcached are incompatible. I will try to update the extension version.
This issue can be closed.

PHP Deprecated: Return type of APCuIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0 PHP Deprecated: Return type of APCuIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0 PHP Deprecated: Return type of APCuIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0 PHP Deprecated: Return type of APCuIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0 PHP Deprecated: Return type of APCuIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants