【问题标题】:How to run an ARM multi-threaded program in Ruby system如何在 Ruby 系统中运行 ARM 多线程程序
【发布时间】:2020-08-21 15:29:34
【问题描述】:

我完全实现了以下网页的内容: http://www.gem5.org/documentation/learning_gem5/part3/running/ 程序可以根据网页要求在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多线程程序,还是我的编译选项不对?

【问题讨论】:

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

标签: c++ multithreading arm gem5


【解决方案1】:

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

已知-static 和线程存在一些非gem5 特有的问题,例如:when g++ static link pthread, cause Segmentation fault, why?

如果上面提到的解决方法不起作用,您现在也可以使用动态链接运行,如:How to run a dynamically linked executable syscall emulation mode se.py in gem5? 我刚刚测试过它,它适用于该示例。

最后请注意,存在一个严重的多线程 SE Ruby 问题,我们不确定如何解决:https://gem5.atlassian.net/browse/GEM5-676

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-10-11
    • 1970-01-01
    • 1970-01-01
    • 2020-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多