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

Issue with Make Compile in setup #34

Closed
Pavitra07 opened this issue Jun 22, 2023 · 8 comments
Closed

Issue with Make Compile in setup #34

Pavitra07 opened this issue Jun 22, 2023 · 8 comments

Comments

@Pavitra07
Copy link

On running make compile, i get the following errors. Kindly help.
Screenshot from 2023-06-22 12-06-28

@Dolu1990
Copy link
Member

Hi,

which version of GCC do you have ?

(me gcc 10.1.0)

@Pavitra07
Copy link
Author

Hello,

I have the following version:

gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

@Dolu1990
Copy link
Member

Ahh it may bit it, string_view seems to be from C++17, gcc 9.4 may be too old ?

@Pavitra07
Copy link
Author

Pavitra07 commented Jun 22, 2023

I have upgraded it to the following:
gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04)
Still showing the same error for make compile.
Should I redo the process?

@Dolu1990
Copy link
Member

hmm pretty sure it is related to different version of GCC / C++ library.
Issue is that string_view seems c++ 17, but verilator is only c++ 14, so kind of a missmatch XD

Looking at verilator/verilator#3081, seems like it may not be compatible with C++20
May worth a try ?

Getting a Very recent verilator version, and updating

verilator -cc ${NAXRISCV_VERILOG} -CFLAGS -std=c++14 -LDFLAGS -pthread ${ADDCFLAGS} ${FLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-UNOPTFLAT -Wno-WIDTH --x-assign unique --exe ${SRCS}
with -std=c++20 instead of -std=c++14 ?

@Pavitra07
Copy link
Author

I did the update in the make file regarding c++20, but still facing the same errors. Is there any way I could get through this?

@Dolu1990
Copy link
Member

Dolu1990 commented Jun 23, 2023

Found it :)

So, there was a elfio update which broke things. (i had a old version of my PC)

You just need to reinstall elfio by :

sudo rm -rf /usr/include/elfio
git clone https://github.com/serge1/ELFIO.git
cd ELFIO
git checkout d251da09a07dff40af0b63b8f6c8ae71d2d1938d # Avoid C++17
sudo cp -R elfio /usr/include

@Pavitra07
Copy link
Author

Thanks a lot for the help! This absolutely worked :)

denishoornaert added a commit to denishoornaert/NaxRiscv that referenced this issue Aug 2, 2023
denishoornaert pushed a commit to denishoornaert/NaxRiscv that referenced this issue Aug 15, 2023
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

2 participants