Trouble running ariane_build_tools.sh

106 views
Skip to first unread message

Jabez Mcclelland

unread,
Jul 15, 2020, 5:08:49 PM7/15/20
to OpenPiton Discussion
Hello, everyone,

I've been enjoying this nice project for several days, and I'm hoping someone will be willing to answer a newbie question.

I am trying to compile the Ariane RISC-V processor and load it onto a Genesys2 FPGA board.  My host computer is Ubuntu 18.04.4, and Vivado is version 2020.1.

I've downloaded the source files openpiton-src-19-10-23-r13.tar.gz.  I have followed the readme as far as setup goes, and have sourced piton/ariane_setup.sh.

When I run piton/ariane_build_tools.sh, I get a string of errors like the following:

/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /tmp/cckGsb7A.o: in function `tohost':
(.tohost+0x0): multiple definition of `tohost'; /tmp/ccKNsXuF.o:(.sbss+0x10): first defined here

...(also several referring to `fromhost')

Any suggestion for how to proceed would be appreciated.  I should note that Ubuntu doesn't have the riscv-toolchain package in the repository so I had to compile it from the GitHub repository.  Something could have gone wrong there, though it did seem to complete successfully.

Thanks,

Jabez 

jbalkind

unread,
Jul 16, 2020, 11:23:49 AM7/16/20
to OpenPiton Discussion
Hi there!

Looks like an issue with the most recent riscv-tests - https://github.com/riscv/riscv-tests/issues/286

Can you try again with an updated riscv-tests?

I would also strongly recommend that you work from the openpiton-dev branch of our github repo. Working from the tarballs makes it much harder to update from version to version.

Thanks,
Jon

Jabez Mcclelland

unread,
Jul 16, 2020, 3:29:28 PM7/16/20
to OpenPiton Discussion
Thanks for responding!

OK, I think I found the root cause of my errors - it was pesky permission thing. 
piton/ariane_build_tools.sh was not able to write to /scratch
so it never built the riscv toolbox. I dumbly went off and built my own version, which probably was doomed to fail. I've now modified ariane_setup.sh as follows:

Changed line 8 to

if [ "$0" !=  "/bin/bash" ] && [ "$0" != "-bash" ]

Changed Lines 77 and 78 to

export RISCV=$HOME/scratch/riscv_install
export VERILATOR_ROOT=$HOME/verilator-4.014/

This now allows 
ariane_build_tools.sh to go through the build process without any obvious errors. 

I then got errors from
protosyn -b genesys2 -d system --core=ariane --uart-dmw ddr

:(
Something like
fatal: not a git repository (or any of the parent directories): .git

I think I will start over with the openpiton-dev branch as you suggest. 

Thanks again for the cool project.  I will keep at it.

Jabez

Jonathan Balkind

unread,
Jul 17, 2020, 1:50:59 PM7/17/20
to OpenPiton Discussion

Hi Jabez,

 

Ah I see this makes sense. I didn't think that the process would continue so far with that error! Our documentation could be better in warning about modifying ariane_setup.sh according to users' environment. Sorry for that.

 

Please do ask if you hit further issues once you move to using git. Given issues like this we might move away from tarballs for releases in future.

 

Jon

--
You received this message because you are subscribed to a topic in the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpiton/Dx5_gmEHoBA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpiton+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/8c0b6ccd-e79b-4fd0-87f9-f465cc4e4221o%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages