Bug #75300 [Com]: SLJIT_CACHE_FLUSH: The builtin "__builtin___clear_cache" is not supported
| From: | mail at chetansachdev dot com | Date: | Mon, 13 Sep 2021 13:38:35 +0000 |
| Subject: | Bug #75300 [Com]: SLJIT_CACHE_FLUSH: The builtin "__builtin___clear_cache" is not supported | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236564@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75300&edit=1
ID: 75300
Comment by: mail at chetansachdev dot com
Reported by: kaplan@php.net
Summary: SLJIT_CACHE_FLUSH: The builtin
"__builtin___clear_cache" is not supported
Status: Not a bug
Type: Bug
Package: Compile Failure
Operating System: Linux/POWER8
PHP Version: 7.2.0RC3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Facing similar issue on macOS 11.4, Apple M1 chipset. Is there any workaround for this?
```
phpbrew install 7.0 -- \--with-zlib-dir=
brew --prefix zlib
===> phpbrew will now build 7.0.33
You haven't enabled any variants. The default variant will be enabled:
[bcmath, bz2, calendar, cli, ctype, dom, fileinfo, filter, ipc, json, mbregex, mbstring, mhash,
pcntl, pcre, pdo, pear, phar, posix, readline, sockets, tokenizer, xml, curl, openssl, zip]
Please run 'phpbrew variants' for more information.
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: 4933ea74298a1ba046b0246fe3771415c84dfb878396201b56cb5333abe86f07
===> Distribution file was successfully extracted, skipping...
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Checking patch for replace freetype-config with pkg-config on php older than 7.4
Found existing build.log, renaming it to /Users/cs/.phpbrew/build/php-7.0.33/build.log.1631539727
===> Configuring 7.0.33...
Use tail command to see what's going on:
$ tail -F '/Users/cs/.phpbrew/build/php-7.0.33/build.log'
===> Checking patches...
Checking patch for php5.3.x on 64bit machine when intl is enabled.
Checking patch for openssl dso linking patch
0 changes patched.
Checking patch for php5.6 with openssl 1.1.x patch.
===> Building...
Error: Make failed:
The last 5 lines in the log file:
/Users/cs/.phpbrew/build/php-7.0.33/ext/pcre/pcrelib/sljit/sljitConfigInternal.h:301:2: note:
expanded from macro 'SLJIT_CACHE_FLUSH'
sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
^
3 errors generated.
make: *** [ext/pcre/pcrelib/pcre_jit_compile.lo] Error 1
Please checkout the build log file for more details:
tail /Users/cs/.phpbrew/build/php-7.0.33/build.log
~ 1m 10s
```
Previous Comments:
------------------------------------------------------------------------
[2021-02-01 15:15:52] cmb@php.net
> Seems like a bug in whatever compiler you're using since that
> define is guarded by an #if __has_builtin check.
That. Anyhow, this would not be a PHP, but rather a libpcre2
upstream issue.
------------------------------------------------------------------------
[2017-10-09 18:59:27] pollita@php.net
275 #if __has_builtin(__builtin___clear_cache)
276
277 #define SLJIT_CACHE_FLUSH(from, to) \
278 __builtin___clear_cache((char*)from, (char*)to)
279
280 #endif /* __has_builtin(__builtin___clear_cache) */
Seems like a bug in whatever compiler you're using since that define is guarded by an #if
__has_builtin check.
------------------------------------------------------------------------
[2017-10-01 10:51:26] kaplan@php.net
Description:
------------
While trying to build PHP 7.2.0RC3 on POWER8 (both Ubuntu 14.04 and Centos7) I see this error. On
Linux with x86_64 same source works fine.
Actual result:
--------------
/bin/sh /php-7.2.0RC3/libtool --silent --preserve-dup-deps --mode=compile xlc
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/zlib/ -I/php-7.2.0RC3/ext/zlib/ -DPHP_ATOM_INC
-I/php-7.2.0RC3/include -I/php-7.2.0RC3/main -I/php-7.2.0RC3 -I/php-7.2.0RC3/ext/date/lib
-I/usr/local/include/libxml2 -I/usr/local/openssl-1.0.1u/include -I/usr/local/include
-I/php-7.2.0RC3/TSRM -I/php-7.2.0RC3/Zend -fPIC -I/usr/include -fPIC -g -fvisibility=hidden
-DZEND_SIGNALS -c /php-7.2.0RC3/ext/zlib/zlib_fopen_wrapper.c -o ext/zlib/zlib_fopen_wrapper.lo
In file included from /php-7.2.0RC3/ext/pcre/pcrelib/pcre_jit_compile.c:62:
In file included from /php-7.2.0RC3/ext/pcre/pcrelib/sljit/sljitLir.c:1745:
/php-7.2.0RC3/ext/pcre/pcrelib/sljit/sljitNativePPC_common.c:519:2: error: 1540-2993 The builtin
"__builtin___clear_cache" is not supported.
SLJIT_CACHE_FLUSH(code, code_ptr);
^
/php-7.2.0RC3/ext/pcre/pcrelib/sljit/sljitConfigInternal.h:278:2: note: expanded from macro
'SLJIT_CACHE_FLUSH'
__builtin___clear_cache((char*)from, (char*)to)
^
1 error generated.
Error while processing /php-7.2.0RC3/ext/pcre/pcrelib/pcre_jit_compile.c.
make: *** [ext/pcre/pcrelib/pcre_jit_compile.lo] Error 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75300&edit=1