ThrowTheSwitch / Ceedling

Ruby-based unit testing and build system for C projects
http://throwtheswitch.org
Other
587 stars 247 forks source link

gcc.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory #773

Closed jwalkerbg closed 1 year ago

jwalkerbg commented 1 year ago

I got this error after a [1-2 year] period of not using ceedling.

gcc.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory compilation terminated. ERROR: Shell command failed. > Shell executed command: 'gcc.exe -E -MM -MG -I"C:/Users/user/.gem/ruby/3.1.0/gems/ceedling-0.31.1/vendor/unity/src" -I"test" -I"test/support" -I"../proj.X" -I"../proj.X/build" -I"../proj.X/build/SerialTracer" -I"../proj.X/build/SerialTracer/production" -I"../proj.X/build/SerialTracer/production/simout" -I"../proj.X/build/SerialTracer/production/smswitch" -I"../proj.X/build/SerialTracer/production/src" -I"../proj.X/build/default" -I"../proj.X/build/default/production" -I"../proj.X/build/default/production/smswitch" -I"../proj.X/build/default/production/src" -I"../proj.X/debug" -I"../proj.X/debug/SerialTracer" -I"../proj.X/debug/default" -I"../proj.X/dist" -I"../proj.X/dist/SerialTracer" -I"../proj.X/dist/SerialTracer/production" -I"../proj.X/dist/default" -I"../proj.X/dist/default/production" -I"../proj.X/dist/lint" -I"../proj.X/nbproject" -I"../proj.X/nbproject/private" -I"../proj.X/simout" -I"../proj.X/smswitch" -I"../proj.X/src" -I"../proj.X/src/headers" -I"../proj.X/src/headers" -I"C:/Program Files/Microchip/xc8/v2.41/pic/include" -DTEST -DUNITY_EXCLUDE_SETJMP_H -DUNITY_EXCLUDE_FLOAT -DUNITY_EXCLUDE_FLOAT_PRINT -DUNITY_INCLUDE_HEADER_H -DUNITY_SUPPORT_TEST_CASES -DIDSW_108256 -DPIR_SENSOR_DC -DTEST_EVENT_BUFFER -DTEST_INPUTS -DTEST_STATIC_PIN_MAPPER -DTEST -DTEST_PP -DGNU_COMPILER "build/temp/_test_module.c"' > And exited with status: [1].

rake aborted! ShellExecutionException: ShellExecutionException

My configuration is ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x64-mingw-ucrt], ceedling (0.31.1). gcc is used as default compiler that comes with ruby MSYS2. I fact I use ceedling for creating test runner file only in the prebuild phase. The real compilation happens afterwards with XC8 compiler from Microchip (I am using MPLAB X's simulator to execute tests).

I searched a lot in the Internet, other people faced this problem too however in different situations (not Ruby MSYS2). Till now I did not found a solution and ask here for information what can be done to solve this problem.

Ivan

Letme commented 1 year ago

that very much seems like gcc installation issue - not ceedling. Are you able to compile anything else with GCC?

jwalkerbg commented 1 year ago

Yes, just now tested, trivial main function that prints its parameters. Also, I checked C:\Ruby31-x64\msys64\ucrt64\bin - there is no any file with name beginning with cc1 ...

Interesting that when executing above long command line in a console, it does not prints anything and it does not produce visible result...

jwalkerbg commented 1 year ago

Resolved. The error was in path configuration in the MPLAB X project.