Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12621 Discussions

nios2-elf-gcc.exe: error: CreateProcess: No such file or directory

dncmrc
New Contributor I
7,414 Views

Hi,

Windows 10 Pro

2004

19041.450

Quartus Prime Pro 19.4, build 64

All Intel and Nios SW is on a local drive.

I get this error in the NiosII shell:

"nios2-elf-gcc.exe: error: CreateProcess: No such file or directory"

Do you have any hints or path available?

Regards.

 

0 Kudos
1 Solution
dncmrc
New Contributor I
7,246 Views

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/' Makefile

WSLEN 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.

View solution in original post

13 Replies
dncmrc
New Contributor I
7,407 Views

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

...

0 Kudos
dncmrc
New Contributor I
7,394 Views

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.

0 Kudos
dncmrc
New Contributor I
7,387 Views

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!

 

0 Kudos
Eliath_G_Intel
Employee
7,366 Views

Hi Marco!

Thanks for reaching us,

Please follow the next steps:


  1. Install WSL
  2. Open the terminal
  3. run $ nios2_command_shell.sh
  4. run the tests you need to make , at this point it should work properly.


As resume, you need to have WSL correctly installed.

Please try those steps and let me know the results.


Best regards,

-Eliath Guzman


0 Kudos
dncmrc
New Contributor I
7,359 Views

Hi Eliath,

I tried what you suggest and I got the same error.

We have had WSL correctly installed from the very beginning. Please read my messages above. The issue started after the latest Windows 10 updates.

Regards

0 Kudos
Suri
Beginner
7,322 Views

Hello Intel support team,

Is there any solution for this error?

Me too getting the same error after updating the Windows. I tried to reinstall everything. But, getting same error. Please let me know the solution since it is very urgent.

0 Kudos
billmax
New Contributor I
7,310 Views

I have the same or similar problem.

My wsl (v2) is up to date as is my Win10 version (2004).  It appears the problem is paths.

The $PATH in nios command shell contains

/mnt/e/intelFPGA/20.1/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin

That path doesn't exist in my installation: however this one does

/mnt/e/intelFPGA/20.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin

Neither of those paths (or their windows equivalents) is in my windows path environment or subsequently in my wsl $PATH.

Should the 20.1 quartus full install have added a path for nios2eds, and if so which?

0 Kudos
SHard2
Novice
7,303 Views

Hi

I have exactly the same error. Is there any resolution to this?

Regards

Simon

0 Kudos
Suri
Beginner
7,278 Views

As a temporary solution, I just found that it is working with normal windows command prompt instead of WSL. So, I just opened windows command prompt with "cmd" command. Then, set the path (that may vary on your system) as below.

set PATH=C:\intelFPGA_pro\20.1\nios2eds\bin\gnu\H-x86_64-mingw32\bin;%PATH%

And, built my library using "nios2-elf-gcc.exe" commands. Only thing, unix-style shell commands won't work. I just replaced "rm -f" with "del" in my makefile.

----

Hope Intel will provide the proper solution to this very soon!!

0 Kudos
SHard2
Novice
7,267 Views

Good morning, and thanks for the suggestion I will give it a try.

Regards

Simon

0 Kudos
billmax
New Contributor I
7,258 Views

@Eliath_G_Intel,

My workaround is a combination of things.

I manually added a couple of sdk paths to my windows environment Path.  (E:\intelFPGA\20.1\nios2eds\bin;E:\intelFPGA\20.1\nios2eds\bin\gnu\H-x86_64-mingw32\bin)

I rebooted wsl (by restarting LxssManager service) to get the updated $PATH.

I edited the Makefile to change "Microsoft" to "microsoft"

0 Kudos
billmax
New Contributor I
7,250 Views

Additional details to workarounds/corrections

There are problems trying to create a new app or create a new format Makefile for an older app.

I had to manually create a wsl env for SOPC_KIT_NIOS2.  In wsl:

export SOPC_KIT_NIOS2=/mnt/e/intelFPGA/20.1/nios2eds

Then for any create-this-app change "Microsoft" to "microsoft"

Then  edit the resulting created Makefile to change "Microsoft" to "microsoft"

and change

APP_LDFLAGS += -msys-lib=$(call adjust-path-mixed,$(SYS_LIB)) 

to 

APP_LDFLAGS += -msys-lib=hal_bsp

 

additional:

change Makefile to

BUILD_PRE_PROCESS := touch $(ELF).srec

(per this post )

modify nios2-download and nios2-configure-sof scripts to use lower-case 'm'

0 Kudos
dncmrc
New Contributor I
7,247 Views

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/' Makefile

WSLEN 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.

Reply