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

[BUG] Linking error: undefined reference to htif_t::load_payload #2298

Open
1 task done
shreyas-kalikar opened this issue Jun 27, 2024 · 3 comments
Open
1 task done
Labels
notCV32A65X It is not an CV32A65X issue Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@shreyas-kalikar
Copy link

shreyas-kalikar commented Jun 27, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

I'm encountering a linking error while trying to build the CVA6 project with Verilator. Specifically, the linker is unable to find the definition for the htif_t::load_payload function, which is likely part of the Host-Target Interface (HTIF) library.
The full error message is:

/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: ariane_tb.o:(.rodata._ZTV19preload_aware_dtm_t[_ZTV19preload_aware_dtm_t]+0x70): undefined reference to htif_t::load_payload(std::string const&, unsigned long*, unsigned long)'`

Steps Taken:

I have tried the following steps to resolve the issue:

  1. Changed verilator version to latest (Verilator 5.026), same error as using with 5.008.
  2. Cleaned the build environment and attempted a fresh rebuild.
  3. Changed CONFIG_NAME="gcc-13.1.0-baremetal" to CONFIG_NAME="gcc-master-baremetal" to check for changes

However, none of these have been able to get me past this error. The full error message above was present in hello_world.cv64a6_mmu.log.iss. I suspect this is related to the compiler, but it would be great to have some direction.

Please let me know if any further information is required, I would be very grateful, thank you!

@shreyas-kalikar shreyas-kalikar added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Jun 27, 2024
@JeanRochCoulon
Copy link
Contributor

CVA6.py verifies the different tool versions before simulating.
What seems strange to me is the fact that you can change the Verilator version...
If checkers are disabled in your environment, this might explain the problem. I suggest to use the recommended tool version for Spike, Verilator and gcc.

@shreyas-kalikar
Copy link
Author

Sorry I did not explain it better, I went into cva6.py and changed the line that did the version check for verilator from 5.008 to 5.026 (However, this was just to explore an avenue/possibility). Also, by recommended tool version for gcc, would the default 13.1.0 count as recommended gcc version? Thank you!

@JeanRochCoulon
Copy link
Contributor

The htif function come from Spike. I would suggest you to start from scratch to re-install Verilator and Spike from scratch. Let's see if it helps.

@JeanRochCoulon JeanRochCoulon added the notCV32A65X It is not an CV32A65X issue label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notCV32A65X It is not an CV32A65X issue Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

2 participants