首页 新闻 会员 周边

CentOS上编译CoreCLR:Native context type is not known on this platform

0
悬赏园豆:30 [已解决问题] 解决于 2015-02-19 23:48

在CentOS上编译CoreCLR出现下面的错误提示:

/data/git/coreclr/src/pal/src/include/pal/context.h:40:2: 
error: Native context type is not known on this platform!

查看context.h的源代码:

#if HAVE_UCONTEXT_T
#include <ucontext.h>

typedef ucontext_t native_context_t;
#else   // HAVE_UCONTEXT_T
#error Native context type is not known on this platform!
#endif  // HAVE_UCONTEXT_T

请问如何解决这个问题?

问题补充:

在cmake的输出日志中发现下面的错误,可能与这个问题有关:

-- Check size of ucontext_t
-- Check size of ucontext_t - failed
dudu的主页 dudu | 高人七级 | 园豆:30994
提问于:2015-02-18 10:52
< >
分享
最佳答案
0

在 src/pal/tools/clang-compiler-override.txt 文件中删除 SET (CMAKE_C_FLAGS_INIT "-Wall -std=c11")  。

在 src/pal/tests/CMakeLists.txt 文件中添加 SET (CMAKE_C_FLAGS "-Wall -std=c11") 。

详见:在Linux CentOS上编译CoreCLR

dudu | 高人七级 |园豆:30994 | 2015-02-19 23:46
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册