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

Update version of Spike #818

Closed
allisonrandal opened this issue Mar 5, 2021 · 5 comments
Closed

Update version of Spike #818

allisonrandal opened this issue Mar 5, 2021 · 5 comments

Comments

@allisonrandal
Copy link

Impact: software

Description

Chipyard currently checks out the Spike repo at riscv-software-src/riscv-isa-sim@acd953a from March 2020, however this version of Spike fails to compile on recent versions of Ubuntu/Debian because of missing import lines, which were fixed in May 2020:

riscv-software-src/riscv-isa-sim@b385568#diff-490b36666b1c906a8b80b8c0166084b2f4d99b555ee9614434d580b14a9f74c4

I've worked around the problem locally by adding the line:

#include <stdexcept>

to the files fesvr/dtm.cc and riscv/devices.h in toolchains/riscv-tools/riscv-isa-sim. This patch allows Spike to compile successfully.

What is a motivating example for changing the behavior?

Spike should compile without manually patching the source.

@alonamid
Copy link
Contributor

alonamid commented Mar 7, 2021

We've recently built the version of Spike that submoduled in chipyard on the latest Debian stable and did not observe any problems. Could you give us some more details about the version of Debian you are running on, and what errors you were getting?

@allisonrandal
Copy link
Author

The current Debian stable version is "buster", first released in July 2019. It ships GCC version 8.3. I am running Ubuntu 20.10, which ships GCC version 10.2. The same fix for a different file in Spike was specifically attributed to GCC 10.2 on Ubuntu 20.10:

riscv-software-src/riscv-isa-sim#603

The error is repeated variants of this, on different lines of the two files:

../fesvr/dtm.cc:488:16: error: ‘runtime_error’ is not a member of ‘std’

It is caused by calling std::runtime_error, without first including stdexcept, which is not a problem on earlier versions of GCC.

It's worth noting that in the very latest version of Spike, the file riscv/devices.h has removed all calls to std::runtime_error, while fesvr/dtm.cc added the include line for stdexcept.

@allisonrandal
Copy link
Author

It is, BTW, totally fine to for Chipyard to decide to only support Debian stable and Ubuntu 20.04 LTS releases, and not the more recent Ubuntu 20.10 (which is a supported release, but not a long-term support release). If that is your decision, you need to be clear about it in the install guide.

And, you will need to address this issue at some point, since current Debian testing (bullseye) also ships GCC 10.2. But, presumably you'll update versions on a lot of dependencies when you upgrade to the next Debian stable, so delaying the update of Spike until that point might make a lot of sense.

@alonamid
Copy link
Contributor

We have bumped spike in release 1.5.0

@allisonrandal
Copy link
Author

Great, thanks!

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