Forum Discussion
nios2-elf-gcc.exe: error: CreateProcess: No such file or directory
- 5 years ago
As a solution to the issue nios2-elf-gcc.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory we have found useful what follows.
Before running make.exe on the generated Makefile, add this to your bash script:
export WSLENV=PATH/l:${WSLENV}
sed -i 's/\(adjust-path[-mixed]*\) = .*/\1 = $1/' MakefileWSLEN fixes missing pathnames, while sed basically removes the effect of adjust-path.
This is an issue introduced by a Windows update but I still believe Intel should provide a fix or patch for it. We wasted several days on it.
I installed now 20.2 and it gives the same error but a bit more info:
...
Info: Compiling cpu.c to obj/default/./cpu.o
nios2-elf-gcc.exe -xc -MP -MMD -c -IE:/FPGA/dp_demo/s10_rx_cts/software/btc_dprx_syslib -IE:/FPGA/dp_demo/s10_rx_cts/software/btc_dptx_syslib -IE:/FPGA/dp_demo/s10_rx_cts/software/dp_demo_bsp/HAL/inc -IE:/FPGA/dp_demo/s10_rx_cts/software/dp_demo_bsp -IE:/FPGA/dp_demo/s10_rx_cts/software/dp_demo_bsp/drivers/inc -IE:/FPGA/dp_demo/s10_rx_cts/software/btc_dprx_syslib -IE:/FPGA/dp_demo/s10_rx_cts/software/btc_dptx_syslib -IE:/FPGA/dp_demo/s10_rx_cts/software/btc_dptxll_syslib -pipe -D__hal__ -DALT_NO_C_PLUS_PLUS -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)' -DALT_NO_EXIT -DALT_NO_INSTRUCTION_EMULATION -DALT_USE_SMALL_DRIVERS -DSMALL_C_LIB -DALT_SINGLE_THREADED -O2 -g -Wall -Wformat-security -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o obj/default/./cpu.o cpu.c
nios2-elf-gcc.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
Makefile:740: recipe for target 'obj/default/./cpu.o' failed
make: *** [obj/default/./cpu.o] Error 1
...
Easy way to replicate:
1.- create an empty C source file (e.g. a.c)
2.- execute gcc from the nios shell
nios2-elf-gcc.exe -c a.c
and you'll get the error.
- dncmrc5 years ago
Occasional Contributor
Another bit of info. We had a second PC where our original script was working (i.e. nios2-elf-gcc.exe was not failing). Today we updated this PC to Windows 19041.450 and after that we get the same error message also on this second PC!