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

Build Script PATH Error #58

Open
0xAl3xH opened this issue Apr 8, 2020 · 0 comments
Open

Build Script PATH Error #58

0xAl3xH opened this issue Apr 8, 2020 · 0 comments

Comments

@0xAl3xH
Copy link

0xAl3xH commented Apr 8, 2020

I noticed that if users already have riscv32 tools built and in their PATH the build script will fail as it likely expects the riscv32 that is build in $ISP_PREFIX/bin. This happened to me in this particular instance:

riscv32-unknown-elf-gcc -g -march=rv32i -mabi=ilp32  -Wa,-Ilegacy -I../../Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions -DportasmHANDLE_INTERRUPT=external_interrupt_handler -g -m
arch=rv32i -mabi=ilp32  -Wa,-Ilegacy -I../../Source/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions -DportasmHANDLE_INTERRUPT=external_interrupt_handler -c -Wall -Wextra -Wshadow -Wpointe
r-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused -I. -I./bsp -I./bsp/xilinx -I./bsp/xilinx/common -I./bsp/xilin
x/axidma -I./bsp/xilinx/axiethernet -I./bsp/xilinx/uartns550 -I./bsp/xilinx/iic -I./bsp/xilinx/spi -I./bsp/xilinx/gpio -I../../Source/include -I../Common/include -I../../Source/portable/GCC/RISC-V -ffunction-se
ctions -fdata-sections -O0 -g3 -march=rv32i -mabi=ilp32 -Dmalloc\(x\)=pvPortMalloc\(x\) -Dfree\(x\)=vPortFree\(x\) -mcmodel=medany -DmainDEMO_TYPE=1 -o bsp/boot.o bsp/boot.S
riscv32-unknown-elf-gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
Makefile:287: recipe for target 'bsp/boot.o' failed
make[4]: *** [bsp/boot.o] Error 1
make[4]: Leaving directory '/media/disk2/hope-src/FreeRTOS/FreeRTOS/Demo/RISC-V_Galois_P1'
Makefile.isp:23: recipe for target 'all' failed
make[3]: *** [all] Error 2

as which riscv32-unknown-elf-gcc evaluates to /usr/bin/riscv32-unknown-elf-gcc, not the one is $ISP_PREFIX

I was able to fix this by putting $ISP_PREFIX/bin first in my PATH variable.

It seems that initially this was the way that the build script was written but e4ad184 in tools changed this. It was not obvious to figure this problem out as the error message was not particularly helpful. A warning should be put in place or the build script should be reverted to the way it initially was to avoid this problem.

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

1 participant