问题
When I tried to build gem5 with command scons build/X86/gem5.opt -j12
, I received an error message saying
lto1: fatal error: bytecode stream in file '/home/beihai/anaconda3/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.a' generated with LTO version 6.0 instead of the expected 8.1
I think it might be the problem of wrong gcc version. But I do not know how to fix it.
My system is Kubuntu 20.04
By running gcc -v
, I got the global gcc version gcc version 9.3.0
By running /home/beihai/anaconda/envs/gem5build/bin/x86_64-conda_cos6-linux-gnu-gcc -v
, I got the anaconda gcc version gcc version 7.3.0 (crosstoll-NG 1.23.0.449-a04d0)
Please tell me how to fix this problem.
来源:https://stackoverflow.com/questions/65602198/could-not-build-gem5-on-a-machine-with-anaconda-lto1-fatal-error-bytecode-st