[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] problem with internal builder on windows
|
Hi all,
I've got a toolchain which does not behave properly. The symptoms are
that the internal builder refuses to recognize that anything needs to
build (even when a file has been edited), i.e. it prints the following
on the console:
>
>
> **** Build of configuration Debug for project testproj ****
>
> **** Internal Builder is used for build ****
> Nothing to build for testproj
>
>
The bug appears consistently (for my toolchain) if two conditions are met:
1. The host platform is Windows. The bug does not appear on Linux.
2. The project type is an executable (as opposed to a static library).
When I run the toolchain under the debugger, I observed the following:
* The method CommonBuilder.invokeInternalBuilder creates a
DescriptionBuilder object, on which it invokes the method
getNumCommands(), which returns 0:
> DescriptionBuilder dBuilder = null;
> if (!isParallel)
> dBuilder = new DescriptionBuilder(des, buildIncrementaly, resumeOnErr, cBS);
>
> if(isParallel || dBuilder.getNumCommands() > 0) {
[...]
> } else {
> buf = new StringBuffer();
> buf.append(ManagedMakeMessages.getFormattedString(NOTHING_BUILT, currentProject.getName()));
> buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
> consoleOutStream.write(buf.toString().getBytes());
> consoleOutStream.flush();
> }
>
* The DescriptionBuilder object uses a local class called
BuildStepVisitor which has a visit method which looks like this:
>
> public int visit(IBuildStep action) throws CoreException {
> if(fMonitor.isCanceled())
> return VISIT_STOP;
>
> if(DbgUtil.DEBUG)
> DbgUtil.trace("visiting step " + DbgUtil.stepName(action)); //$NON-NLS-1$
> if(!action.isRemoved()
> && (!fBuildIncrementaly || action.needsRebuild())){
> if(DbgUtil.DEBUG)
> DbgUtil.trace("step " + DbgUtil.stepName(action) + " needs rebuild" ); //$NON-NLS-1$ //$NON-NLS-2$
> StepBuilder builder = getStepBuilder(action);//new StepBuilder(action, fCWD, fResumeOnErrs, fDir);
>
> if(fBuild){
> switch(builder.build(fOut, fErr, new SubProgressMonitor(fMonitor, builder.getNumCommands()))){
> case STATUS_OK:
> break;
> case STATUS_CANCELLED:
> fStatus = STATUS_CANCELLED;
> break;
> case STATUS_ERROR_BUILD:
> case STATUS_ERROR_LAUNCH:
> default:
> fStatus = STATUS_ERROR_BUILD;
> break;
> }
> } else {
> fNumCommands += builder.getNumCommands();
> }
> }
>
> if(fStatus != STATUS_CANCELLED
> && (fResumeOnErrs || fStatus == STATUS_OK))
> return VISIT_CONTINUE;
> return VISIT_STOP;
> }
The builder.getNumCommands() method returns 0, thus indicating that
nothing needs to build. getNumCommands() in turn calls
getCommandBuilders(), but when I tried to examine its return value, I
got the following error:
> org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array.
I'll continue digging, but if anyone has a clue as to what the problem
is, please let me know.
--
/Jesper