在Mac OS Ventura M1上执行`make`时,如果出现`call to undeclared function 'sys_icache_invalidate'`错误,该如何处理?
P粉006977956
P粉006977956 2023-07-17 18:30:07
0
1
495

我正在尝试维护一个使用PHP 5.4.45的旧应用程序。所以我从这里安装了相应PHP版本的源代码。我解压了tar.gz文件夹并执行了...

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

在第一步中,成功地进行了配置。但是,在第二步中,出现了许多警告和错误。在这个错误处,make过程停止了:

/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))

如何处理这个错误并在我的MacOS Ventura M1 MacBook上安装PHP 5.4.45版本的源代码?

P粉006977956
P粉006977956

全部回复(1)
P粉418351692

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

#include  /* +++ */
#define SLJIT_CACHE_FLUSH(from, to) \
     sys_icache_invalidate((void*)(from), (size_t)((char*)(to) - (char*)(from))) 
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!