How to deal with the error `call to undeclared function 'sys_icache_invalidate'` when executing `make` on Mac OS Ventura M1?
P粉006977956
P粉006977956 2023-07-17 18:30:07
0
1
431

I'm trying to maintain an old application using PHP 5.4.45. So I installed the source code of the corresponding PHP version from here. I unzipped the tar.gz folder and executed...

  1. ./configure --with-iconv=/opt/homebrew/opt/libiconv
  2. make

In the first step, the configuration was successfully performed. However, during the second step, many warnings and errors appeared. The make process stopped at this error:

/Users/ferguso/Downloads/php-5.4.45/ext/pcre/pcrelib/sljit/sljitNativeARM_64.c:312:2: error: call to undeclared function 'sys_icache_invalidate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] SLJIT_CACHE_FLUSH(code, code_ptr); /Users/ferguso/Downloads/php-5.4.45/ext/pcre/pcrelib/sljit/sljitConfigInternal.h:301:2: note: expanded from macro 'SLJIT_CACHE_FLUSH' sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))

How do I handle this error and install PHP version 5.4.45 from source on my MacOS Ventura M1 MacBook?

P粉006977956
P粉006977956

reply all (1)
P粉418351692

我比较了最新的代码。尝试在宏前面包含头文件。

#include
           
            /* +++ */ #define SLJIT_CACHE_FLUSH(from, to) \ sys_icache_invalidate((void*)(from), (size_t)((char*)(to) - (char*)(from)))
            
           
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!