Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Default build behaviour when Cygwin is in PATH(Issues with build when Cygwin is in PATH and other PATH related issues)
Default build behaviour when Cygwin is in PATH [message #1444820] Tue, 14 October 2014 15:41
Ghaith Hachem is currently offline Ghaith HachemFriend
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.
Previous Topic:static assignment of negative value to unsigned int
Next Topic:Can't configure Indexer to recognize "forced-included" files (/fi parameter)
Goto Forum:
  


Current Time: Fri Oct 11 02:52:39 GMT 2024

Powered by FUDForum. Page generated in 0.02967 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top