Default build behaviour when Cygwin is in PATH [message #1444820] |
Tue, 14 October 2014 15:41 |
Ghaith Hachem Messages: 3 Registered: October 2014 |
Junior Member |
|
|
Hi all,
In my project I have an external builder given in the project properties with its full path.
If I have cygwin in my PATH, i noticed that CDT always tries to launch my builder using cygwin. Is this the default behaviour?
While tracing this behaviour in the CDT code I also noticed some other possible issues with the PATH environment and the builder location in general:
First issue is In org.eclipse.cdt.core.CommandLauncher the path is retrieved from the system using this code:
String envPathValue = (String) getEnvironment().get(PATH_ENV);
getEnvironment here is an instance of Properties which is a HashTable thus case sensitive, on my windows installation at least "Path" is not all uppercase as defined in PATH_ENV and thus is never found. Now this is usually solved a few lines below when PathUtil.findProgramLocation is called, however if a user has modified the PATH environment temporarely his changes are lost as findProgramLocation calls the original PATH if it finds none.
Second issue I noticed is in findProgramLocation itself, where my builder was given as a full path the method tried to append each of the Path directories to my full path without finding anything and then it returns null, shouldn't it have returned my path?
Returning null leads me to my third issue the Spawner:
fProcess = ProcessFactory.getFactory().exec(fCommandArgs, env, dir);
this ends up starting a Spawner that goes into nativecode and eventually executes "starter.exe" This is also always calling cygwin if it finds it, shouldn't that have been handled in fCommandArgs[0] = Cygwin.cygwinToWindowsPath(location.toString(), envPathValue); a few lines above?
I didn't file these as bugs yet because i'm not sure which one is default behaviour. The Path part is probably a bug, but the other two issues might be a handling to skip starting cygwin, in which case one of them is failing.
|
|
|
Powered by
FUDForum. Page generated in 0.02967 seconds