Closed figuresudo closed 2 months ago
Your riscv64 cross compiler on your system is a little old. Please follow this document to install newer toolchain.
I have updated the riscv64-unknown-linux-gnu toolchain to version 13.2.0, and the make riscv64-xs_defconfig command now runs successfully. However, I still encounter errors when executing make:
It appears that attribute_maybe_unused is not defined. Could you please advise on how to resolve this issue?
What is the version of your host gcc compiler and your OS? Please run gcc --version
and paste the result.
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The key problem is that __attribute_maybe_unused__
is used in C, which is a feature from C++17. That's our problem, we will fix it soon.
By the way, Your host OS and gcc may also be too old. We now recommend using Ubuntu 22.04 or later as well as gcc-11 or later.
ok, thanks a lot.
fixed in #506 , you could try again.
It successfully works. Thanks.
I encountered an issue when trying to compile the NEMU source code from the master branch. I executed the following command:
make riscv64-xs_defconfig However, I received the following error messages:
~/NEMU$ make riscv64-xs_defconfig 正克隆到 'resource/softfloat/repo'... remote: Enumerating objects: 451, done. remote: Counting objects: 100% (451/451), done. remote: Compressing objects: 100% (370/370), done. remote: Total 451 (delta 412), reused 95 (delta 80), pack-reused 0 (from 0) 接收对象中: 100% (451/451), 203.65 KiB | 1.07 MiB/s, 完成. 处理 delta 中: 100% (412/412), 完成. 正克隆到 'resource/gcpt_restore'... remote: Enumerating objects: 145, done. remote: Counting objects: 100% (145/145), done. remote: Compressing objects: 100% (66/66), done. remote: Total 145 (delta 84), reused 135 (delta 79), pack-reused 0 (from 0) 接收对象中: 100% (145/145), 39.70 KiB | 677.00 KiB/s, 完成. 处理 delta 中: 100% (84/84), 完成.
vsetvl t2,t2,t1' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v0,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v1,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v2,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v3,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v4,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v5,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v6,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v7,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v8,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v9,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v10,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v11,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v12,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v13,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v14,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v15,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v16,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v17,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v18,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v19,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v20,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v21,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v22,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v23,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v24,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v25,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v26,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v27,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v28,(sp)' src/restore.S:91: 错误: unrecognized opcodevl1re64.v v29,(sp)' src/restore.S:91: 错误: unrecognized opcode
vl1re64.v v30,(sp)' src/restore.S:91: 错误: unrecognized opcode `vl1re64.v v31,(sp)' make[1]: [Makefile:57:/home/NEMU/resource/gcpt_restore/build/obj/src/restore.o] 错误 1 make: [/home/NEMU/scripts/config.mk:45:resource/gcpt_restore/build/gcpt.bin] 错误 2Could you please advise on how to resolve this issue?