| Summary: | [Scanner Discovery] PATH environment variable oddities (Discovery Sanner, Launching) | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sebastian Bauer <mail> |
| Component: | cdt-build | Assignee: | cdt-build-inbox <cdt-build-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | Andrew Gvozdev <angvoz.dev> |
| Severity: | major | ||
| Priority: | P3 | CC: | ilg |
| Version: | 7.0 | ||
| Target Milestone: | 8.2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Sebastian Bauer
I can give some more details now. It seems that, if the PATH env variable is not set to the Cygwin bin dir prior to the start of Eclipse/CDT, the CygpathTranslator class is not operating correctly. In line 113 of /org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java the condition "if (cygpath.isAvailable)" is false. This is due to the fact, that the "cygpath" command cannot be located when the CygpathTranslator object is constructed (BTW it would be nice to inform the user about this failure). I suggest that if "cygpath" command is searched that the entries of the Environment preferences is taken into account as well (there is also the default cygwin path tried, but I didn't install cygwin in the default path). As said, it also makes sense to generalize the scope of the Environment settings as the launching is affected as well. Obviously, the environment variables are also useful with non-build related stuff. But this is probably something for post-CDT 7.0.0 The problem is probably deeper, I'm facing it on Mac OS X too. According to my tests, when trying to run the compiler for discovery purposes, the PATH defined in Environment is not used properly and the compiler is not found (a warning is displayed in the Error Log). Running the same compiler to compile a C source works properly. I did the tests by changing the compiler name to an ARM cross compiler. When setting the PATH outside Eclipse, everything works just fine, both discovery and compile. Another possibility would be that the compiler is executed, but when processing the output some incompatibility triggers the error and the message is the same as when the program is not found. (need to do some more tests). Liviu I believe this was fixed with changes for bug 357442 for Cygwin. Please, retest with nightly build. |