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...
./configure --with-iconv=/opt/homebrew/opt/libiconv
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粉4183516922023-07-18 16:15:42
我比较了最新的代码。尝试在宏前面包含头文件。
#include/* +++ */ #define SLJIT_CACHE_FLUSH(from, to) \ sys_icache_invalidate((void*)(from), (size_t)((char*)(to) - (char*)(from)))