Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/162.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何在Ruby系统中运行ARM多线程程序_C++_Multithreading_Arm_Gem5 - Fatal编程技术网

C++ 如何在Ruby系统中运行ARM多线程程序

C++ 如何在Ruby系统中运行ARM多线程程序,c++,multithreading,arm,gem5,C++,Multithreading,Arm,Gem5,我完全实现了以下网页的内容: 该程序可以根据网页要求在X86下编译,但是我想得到一个ARM二进制文件,所以我使用以下代码来编译它: aarch64-linux-gnu-g++ -o threads threads.cpp -pthread -std = c ++ 11 -static 我可以编译并获取二进制文件,但在运行过程中出现以下错误: erminate called after throwing an instance of 'std::system_error' what(): E

我完全实现了以下网页的内容: 该程序可以根据网页要求在X86下编译,但是我想得到一个ARM二进制文件,所以我使用以下代码来编译它:

aarch64-linux-gnu-g++ -o threads threads.cpp -pthread -std = c ++ 11 -static
我可以编译并获取二进制文件,但在运行过程中出现以下错误:

erminate called after throwing an instance of 'std::system_error'

what():  Enable multithreading to use std::thread: Operation not permitted

由于gem5的bin文件夹中没有提供编译的ARM二进制文件,这是否意味着gem5不支持运行ARM多线程程序,或者我的编译选项错误?

该程序无法在
qemu-aarch64
和Ubuntu 20.04 amd64 native上运行
-static
(始终检查其他更稳定的平台:-))

众所周知,
-static
和线程存在一些非EM5特定的问题,例如:

如果这里提到的解决方案不起作用,您现在也可以使用动态链接运行,如中所述:我刚刚测试了它,它在该示例中起到了作用


最后请注意,有一个严重的多线程SE Ruby问题,我们不知道如何解决:

这不可能是实际的命令行,对吗?它应该是
-std=c++11
,而不是
-std=c++11