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

make[1]: *** [out/metadata/tb.compile.stamp] Error 2 #2071

Open
cllll402 opened this issue Aug 12, 2023 · 7 comments
Open

make[1]: *** [out/metadata/tb.compile.stamp] Error 2 #2071

cllll402 opened this issue Aug 12, 2023 · 7 comments
Labels
Type:Question Questions

Comments

@cllll402
Copy link

I am a beginner in ibex, and when I followed the github steps to test something wrong, can you tell me what I missed or did wrong?
The error message is as follows:

autumn@localhost ~/ibex/dv/uvm/core_ibex$ make --keep-going IBEX_CONFIG=opentitan SIMULATOR=vcs ISS=spike ITERATIONS=1 SEED=1 TEST=riscv_arithmetic_basic_test WAVES=0 COV=0
Building RTL testbench
23:54:56 (snpslmd) OUT: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823296]
23:55:19 (snpslmd) IN: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823296]
23:55:19 (snpslmd) OUT: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823319]
23:55:21 (snpslmd) IN: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823319]
make[1]: *** [out/metadata/tb.compile.stamp] Error 2
Generating core configuration file
Building randomized test generator
23:55:24 (snpslmd) OUT: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823324]
23:55:41 (snpslmd) IN: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823324]
23:55:41 (snpslmd) OUT: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823341]
23:55:43 (snpslmd) IN: "VCSCompiler_Net" autumn@localhost.localdomain [snps_checkout_1691823341]
Running randomized test generator to create assembly file /home/autumn/ibex/dv/uvm/core_ibex/out/run/tests/riscv_arithmetic_basic_test.1/test.S
23:55:44 (snpslmd) OUT: "VCSRuntime_Net" autumn@localhost.localdomain [snps_checkout_1691823344]
23:55:51 (snpslmd) IN: "VCSRuntime_Net" autumn@localhost.localdomain [snps_checkout_1691823344]
Compiling riscvdv test assembly to create binary at /home/autumn/ibex/dv/uvm/core_ibex/out/run/tests/riscv_arithmetic_basic_test.1/test.bin
make[1]: Target `all' not remade because of errors.
make: *** [run] Error 2

Here are the details of how I use the tools:

VMware:16Pro
Linux:CentOS7.9
VCS:2020.03-SP2-7
Python:3.10.5
Pip:23.2.1
Gcc/G++:4.8.5
Spike:riscv-isa-sim-ibex-cosim-v0.3
Pre-built toolchain:lowrisc-toolchain-gcc-rv32imcb-20230519-1

Finally, some of my path information in bashrc:
#riscv-gcc
export RISCV=/home/autumn/lowrisc-gcc
export RISCV_TOOLCHAIN=$RISCV
export RISCV_GCC=$RISCV/bin/riscv32-unknown-elf-gcc
export RISCV_OBJCOPY=$RISCV/bin/riscv32-unknown-elf-objcopy
export SPIKE_PATH=$RISCV/bin
export PKG_CONFIG_PATH=$RISCV/lib/pkgconfig
export PATH=$PATH:/root/.local/bin #.txt

@cllll402 cllll402 added the Type:Question Questions label Aug 12, 2023
@rswarbrick
Copy link
Contributor

Hi there! I'm not sure exactly what has gone wrong, but any failure must have happened just before the line that says make[1]: *** [out/metadata/tb.compile.stamp] Error 2. (Note: the other text that appears afterwards would probably not be there if you hadn't passed --keep-going. It's often easier to debug what's going on without that flag)

Anyway, I'm not entirely sure what failed, and we should probably tweak things so that the error messages are clearer. Can you try running again with an extra VERBOSE=1. That should hopefully show more about what is going on:

make IBEX_CONFIG=opentitan SIMULATOR=vcs ISS=spike ITERATIONS=1 SEED=1 TEST=riscv_arithmetic_basic_test WAVES=0 COV=0 VERBOSE=1

@rswarbrick
Copy link
Contributor

Well, the first failure happens when running VCS. See line 11, which ends with "Error 2". You're right that some things look a bit dubious below (maybe you're using an old GCC/G++?), but I'd not bother looking too hard at them yet.

I'd expect that you can reproduce the initial failure by copy-pasting and running the first vcs command. I think you'll find that it spits some error messages out to /home/autumn/ibex/dv/uvm/core_ibex/out/build/tb/compile_tb.log.

@cllll402
Copy link
Author

Thank you, I have solved this problem.
The specific method is to replace ibex-isa-sim-v0.3 with ibex-isa-sim-v0.5, and specify the locations of the five libraries libfdt.a, libriscv.a, libdisasm.a, libsoftfloat.a and libsoftfloat.so. You can solve the problem. Of course, all tools should be updated to newer versions.
The reason for the change of spike is that I found that the 0.3 version of the tool lacks the improvement of mhpmcounter related functions.

@cllll402
Copy link
Author

Next, I tested all the files in test.yaml. Of the 55 projects to be tested, except riscv_bitmanip_full_test, the pass rate of the remaining projects is on schedule toward the official report. https://ibex.reports.lowrisc.org/opentitan/latest/report.html

When I execute the riscv_bitmanip_full_test command alone:
autumn@localhost ~/ibex/dv/uvm/core_ibex$ make --keep-going IBEX_CONFIG=opentitan SIMULATOR=vcs ISS=spike ITERATIONS=1 SEED=1 TEST=riscv_bitmanip_full_test WAVES=0 COV=0
WARNING:ibex_cmd:Rejecting test riscv_bitmanip_full_test, 'rtl_params' specified not compatible with ibex_config
Traceback (most recent call last):
File "/home/autumn/ibex/dv/uvm/core_ibex/./scripts/metadata.py", line 511, in
sys.exit(_main())
File "/home/autumn/ibex/dv/uvm/core_ibex/./scripts/metadata.py", line 379, in _main
raise RuntimeError("md.tests_and_counts is empty, cannot get TEST.SEED strings.")
RuntimeError: md.tests_and_counts is empty, cannot get TEST.SEED strings.
make: *** [run] Error 1

I found about warnings, found similar problems in #999, but referred to in the file, the code seems to have been corrected, so I have no idea, could you tell me how to do this problem should be?

@rswarbrick
Copy link
Contributor

Thanks for the report. I've taken a look, and the riscv_bitmanip_full_test test requires a full bitmanip implementation. We don't have one with the OpenTitan configuration, which is what you've selected here.

I think that the behaviour of the make run that you show above is sensible (although it is a bit hard to decipher! I'm pushing a PR to make it clearer).

Why did you try to run this specific test? Does that appear in some longer list that needs to be filtered?

@cllll402
Copy link
Author

cllll402 commented Sep 2, 2023

Thanks for your reply, I just want to fully test all the files in test.yaml and have no other purpose. If it's not important, then I would consider not testing it.

@rswarbrick
Copy link
Contributor

Ok, cool. I guess the remaining question is whether there's a "run everything I need" command that caused riscv_bitmanip_full_test to run with IBEX_CONFIG=opentitan. If so, there's some filtering we need to fix! What command did you run that caused the test to run in the first place?

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

No branches or pull requests

2 participants