Bug with Replace native environment with specified one [message #1095064] |
Mon, 26 August 2013 11:16  |
Eclipse User |
|
|
|
Hello,
I'm using Windows 7, eclipse Kepler Release Build id: 20130614-0229,
org.eclipse.cdt.sdk.feature.group 8.2.0.20130611.
Because I have many gcc compilers on my machine and in the windows PATH variable, I want to use the C/C++ Build -> Environment -> Replace native environment with specified one to specify the PATH variable during compilation time with only the needed compilers paths.
However when I enable this option, the compilation hangs with following error:
arm-none-eabi-g++ -DDEBUG=1 -DGNUARM_COMPILER -I"D:\XXXXXX" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="xxxxx.o.lst" -fno-exceptions -fno-rtti -c -fmessage-length=0 -fomit-frame-pointer -MMD -MP -MF"xxxx.d" -MT"xxx.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o "xxxx.o" "xxxxx.cpp"
'Finished building: xxxxx/xxxxx.cpp'
' '
'Building file: D:yyyyyyy.cpp'
cs-make: *** Accès refusé.
. Stop.
cs-make: *** Waiting for unfinished jobs....
Also the "Build project" window is stuck in "Invoking Command: cs-make clean".
The only way to stop this is to open task manager and kill eclipse.
I found a way to fix it : run eclipse as administrator. Then it compiles with no problem. But hey! ain't that an awful fix?
Do you have any idea of what's happening? it is so painful to run eclipse as administrator.
Thanks,
Falkor
|
|
|
Re: Bug with Replace native environment with specified one [message #1095665 is a reply to message #1095064] |
Tue, 27 August 2013 07:07  |
Eclipse User |
|
|
|
Ok I have found some more details about the problem.
When you select "Replace native environment with specified one",
cs-make will create a batch file (for example "make3124-1.bat").
For each file compilation, the same file is created and after that deleted. I think the environment variables are set again for each c++ file to compile.
What happens on my windows 7 pc is a conflict with the Windows Search indexer service.
make3124-1.bat is created by cs-make
file is compiled
make3124-1.bat is deleted by cs-make
windows search is still accessing make3124-1.bat, so it's not deleted
make3124-1.bat is created by cs-make FAILS, infinite loop
I solved the problem by deactivating the Windows Search service.
Very ugly.
Another post about this issue here :
://stackoverflow.com/questions/3764072/c-win32-how-to-wait-for-a-pending-delete-to-complete
|
|
|
Powered by
FUDForum. Page generated in 0.04034 seconds