Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error: conflicting declaration of C function #3

Open
pluviophilee opened this issue Jul 10, 2024 · 4 comments
Open

Compiling error: conflicting declaration of C function #3

pluviophilee opened this issue Jul 10, 2024 · 4 comments

Comments

@pluviophilee
Copy link

pluviophilee commented Jul 10, 2024

我在按顺序执行以下指令时:
git clone https://github.com/OpenXiangShan/xfuzz.git
cd xfuzz && make init && make build && cd ..

git clone https://github.com/OpenXiangShan/riscv-arch-test.git
cd riscv-arch-test/riscv-test-suite
make build_I -j2
rm build/.elf build/.txt
cd ../..

git clone https://github.com/OpenXiangShan/riscv-isa-sim.git
make -C riscv-isa-sim/difftest CPU=ROCKET_CHIP SANCOV=1 -j16

export SPIKE_HOME=$(pwd)/riscv-isa-sim
export XFUZZ_HOME=$(pwd)/xfuzz
export NOOP_HOME=$(pwd)/rocket-chip
export CORPUS=$(pwd)/riscv-arch-test/riscv-test-suite/build

git clone -b dev-difftest --single-branch https://github.com/OpenXiangShan/rocket-chip.git
cd rocket-chip && make init && make bootrom
make emu XFUZZ=1 REF=$SPIKE_HOME/difftest/build/riscv64-spike-so LLVM_COVER=1 -j16

./build/fuzzer -f --max-runs 100 --corpus-input $CORPUS -- --max-cycles 10000

当执行到make emu XFUZZ=1 REF=$SPIKE_HOME/difftest/build/riscv64-spike-so LLVM_COVER=1 -j16时,编译报错error: conflicting declaration of C function ‘void v_difftest_ArchIntDelayedUpdate(uint8_t, uint64_t, uint8_t, uint8_t, uint8_t)’,请问您之前遇到类似问题吗?编译过程对编译器的版本有要求吗?

@poemonsense
Copy link
Member

We are currently running on Ubuntu 22.04 with the clang compiler.

Which verilator and clang/gcc version are you using?

@pluviophilee
Copy link
Author

verilator v5.020
clang v10.0.0-4ubuntu1
gcc v9.4.0
clang 我尝试了多个版本,包括clang 8和12,依然不行。

我的系统版本是Ubuntu20.04,因为我参考https://github.com/OpenXiangShan/difftest/blob/master/.github/workflows/main.yml#L267这个链接,里面说测试fuzz功能的环境是ubuntu20.04。

@poemonsense
Copy link
Member

这个就比较奇怪了。我们的环境是github提供的干净ubuntu,所有的命令都在这个main.yml里面写着了。试一下make clean之后重新跑?

@poemonsense poemonsense changed the title 编译报错error: conflicting declaration of C function Compiling error: conflicting declaration of C function Jul 25, 2024
@sjl821
Copy link

sjl821 commented Jul 29, 2024

我也遇到了同样的错误,请问现在您解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants