Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

ld returned 1 exit status ../isa/Makefile:74: rv32ui-v-simple] Error 1 #362

Open
ardeal opened this issue Dec 21, 2022 · 1 comment
Open

Comments

@ardeal
Copy link

ardeal commented Dec 21, 2022

Hi,

I am working on ubuntu 20.04. I am not building riscv-tools and am experiencing the following issues.

Here are my steps about how to build it:
I downloaded riscv-gnu-toolchain and riscv-tools from:

  1. https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2022.12.17/riscv64-elf-ubuntu-20.04-nightly-2022.12.17-nightly.tar.gz
  2. https://github.com/RISCV-Tools/riscv-tools

then I tar the tool to /opt/riscv folder with the command: tar -xzvf riscv64-elf-ubuntu-20.04-nightly-2022.12.17-nightly.tar.gz -C /opt

In my bashrc file, I added:
export RISCV="/opt/riscv"
export PATH=$PATH:$RISCV/bin
and run source ~/.bashrc

when I run ./build.sh in riscv-tools folder, I encountered the following issue:
to my analysis, there are a few possible reason for this error:
I may miss some dependency libs?
I didn't add the path of the lib to LD_LIBRARY_PATH, but I couldn't find the lib in the folder.

I just noticed that riscv-tools/riscv-tests/isa/Makefile has correctly built some files, but failed to build some other files. Please check the following picture.

/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: dhrystone.riscv has a LOAD segment with RWX permissions
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: spmv.riscv has a LOAD segment with RWX permissions
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: mt-vvadd.riscv has a LOAD segment with RWX permissions
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: mt-matmul.riscv has a LOAD segment with RWX permissions
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: pmp.riscv has a LOAD segment with RWX permissions
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /tmp/cc4YhrCz.o: in function `tohost':
(.tohost+0x0): multiple definition of `tohost'; /tmp/ccqVeXUB.o:(.sbss+0x10): first defined here
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /tmp/cc4YhrCz.o: in function `fromhost':
(.tohost+0x40): multiple definition of `fromhost'; /tmp/ccqVeXUB.o:(.sbss+0x8): first defined here
/opt/riscv/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: rv32ui-v-simple has a LOAD segment with RWX permissions
collect2: error: ld returned 1 exit status
make[1]: *** [/home/au/e203/riscv-tools/riscv-tests/build/../isa/Makefile:74: rv32ui-v-simple] Error 1
make: *** [Makefile:29: isa] Error 2

image

image

@ardeal
Copy link
Author

ardeal commented Dec 22, 2022

I experienced the upper issues when I run build.sh in WSL ubuntu 20.04.
I then installed a new and clean VMware ubuntu 20.04 (then installed all necessary packages/dependencies) , I still experienced the same issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant