riscv-software-src / homebrew-riscv

homebrew (macOS) packages for RISC-V toolchain
https://riscv.org
310 stars 50 forks source link

error trying to exec 'cc1': execvp: No such file or directory #11

Closed Vasu-p closed 6 years ago

Vasu-p commented 7 years ago

The installation completed without any errors. But when I am trying to compile a Hello World program it gives this message:

riscv64-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory

But when I try to do the same from the /usr/local/opt/riscv-gcc/bin directory it works fine.

sbeamer commented 7 years ago

I'm not able to reproduce this error. Searching online for it suggests a number of possible causes. At first glance, perhaps a permission issue is the most problem? Did you install it with sudo?

sbeamer commented 7 years ago

Just to clarify, you shouldn't need to use sudo to install riscv-tools. Homebrew for the last few years hasn't needed sudo.

Since there has been no response in 3 weeks, I'm closing this issue. If your problem persists, please comment again to re-open it.

ghost commented 7 years ago

I'm getting that error while compiling a kernel and still couldn't find a solution :(

sbeamer commented 7 years ago

Can you run the following commands to let me know about how it was installed?

which riscv64-unknown-elf-gcc
ls -l `which riscv64-unknown-elf-gcc`

I'm not able to reproduce this, but re-reading the original issue, I see the original poster has a non-standard Homebrew link directory. In theory it should still work, but gcc can be extremely temperamental about paths.

I'm assuming the install used the bottles. Could you also try re-building gcc (will take some time) with brew reinstall --build-from-source riscv-gcc?

sbeamer commented 7 years ago

@madScript01 @Vasu-p Either of you get a chance to double check on this?

ghost commented 7 years ago

Fixed this, using linaro GCC toolchain and after typing apt-get install aarch64-linux-gnu

sbeamer commented 7 years ago

@madScript01 Glad to hear your issues were resolved. Did you experience the issue originally with homebrew on macOS, or were you always using linux (linaro)?