| Summary: | autotools project build project function does not work | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Liping Ke <liping.ke> |
| Component: | cdt-autotools | Assignee: | Jeff Johnston <jjohnstn> |
| Status: | RESOLVED FIXED | QA Contact: | Jeff Johnston <jjohnstn> |
| Severity: | minor | ||
| Priority: | P3 | CC: | akurtakov, cdtdoug |
| Version: | 8.1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Liping Ke
(In reply to comment #0) > Build Identifier: 3.0.9.201106060936 > > We have a yocto project plugin which extends auto tools project. We have an > extension point called > org.eclipse.core.resources.natures->runtime > ->org.eclipse.linutools.cdt.autotools.core.genmakebuilderV2(builder), > work plugin works fine. > But when I new c project->GNU Autotools-> Hello World ANSI C Autotools Project, > and then click build project, I found the build function defined in autotools > plugin will not be called. > Obviously our extension will make autotools build does not work. > > I'm not clear about what you are doing. Please provide more details about how you have extended the Autotools project. Are you extending some of the classes in Autotools or just extending the Autotools nature? If you provide some snippets here (schema and plugin.xml snippets) it might be more obvious what is going on. Are you overriding the Autotools builder id with your own builder? The Autotools project goes through the builders and does a reorder so that the Autotools builder appears before the CDT common builder. This allows configuration before processing the Makefile. It uses the id to identify the various builders. Thanks a lot for your help!
Below is our extension description which is involved, I observed that genmakebuilderV2 cause the problem that blocks the autotools project build. But I can't remove this extension, the reason is that we override some debugger configurations ( I also paste the related code). If I remove this extension, the override will not take effect. (We need to change default Debugger page->Main->GDB Debugger location and ->GDB command file location).
Thanks a lot for your help!
criping
<extension
id="YoctoSDKNature"
name="%extension.name.0"
point="org.eclipse.core.resources.natures">
<requires-nature
id="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
</requires-nature>
<runtime>
<run
class="org.yocto.sdk.ide.YoctoSDKProjectNature">
</run>
</runtime>
<builder
id="org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2">
</builder>
</extension
code piece for chaning debugger page settings.
ILaunchConfigurationWorkingCopy w_copy = configType.newInstance(project, project.getName()+"_gdb_"+sTargetTriplet);
String sDebugInitFile = project.getLocation().toString() + "/.gdbinit";
FileWriter out = new FileWriter(new File(sDebugInitFile));
out.write("set sysroot " + sSysroot);
out.flush();
out.close();
w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.GDB_INIT", sDebugInitFile);
w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.GDB_INIT", sDebugInitFile);
w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.AUTO_SOLIB", false);
w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.AUTO_SOLIB", false);
w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.DEBUG_NAME", strDebugger);
w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.DEBUG_NAME", strDebugger);
String projectName = project.getName();
w_copy.setAttribute("org.eclipse.cdt.launch.PROJECT_ATTR", projectName);
if(!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID))
{
String project_src = "src/"+projectName;
w_copy.setAttribute("org.eclipse.cdt.launch.PROGRAM_NAME", project_src);
}
w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.protocol", "mi");
w_copy.doSave();
Please confirm if this problem has been rectified or not. From what I understood in talking to Anna D. at the CDT summit, the yocto autotools extension is working now. (In reply to comment #2) > Thanks a lot for your help! > Below is our extension description which is involved, I observed that > genmakebuilderV2 cause the problem that blocks the autotools project build. But > I can't remove this extension, the reason is that we override some debugger > configurations ( I also paste the related code). If I remove this extension, > the override will not take effect. (We need to change default Debugger > page->Main->GDB Debugger location and ->GDB command file location). > > Thanks a lot for your help! > > criping > > <extension > id="YoctoSDKNature" > name="%extension.name.0" > point="org.eclipse.core.resources.natures"> > <requires-nature > id="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2"> > </requires-nature> > <runtime> > <run > class="org.yocto.sdk.ide.YoctoSDKProjectNature"> > </run> > </runtime> > <builder > id="org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2"> > </builder> > </extension > > code piece for chaning debugger page settings. > > ILaunchConfigurationWorkingCopy w_copy = configType.newInstance(project, > project.getName()+"_gdb_"+sTargetTriplet); > String sDebugInitFile = project.getLocation().toString() + > "/.gdbinit"; > FileWriter out = new FileWriter(new File(sDebugInitFile)); > out.write("set sysroot " + sSysroot); > out.flush(); > out.close(); > w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.GDB_INIT", > sDebugInitFile); > w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.GDB_INIT", > sDebugInitFile); > w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.AUTO_SOLIB", > false); > w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.AUTO_SOLIB", false); > w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.DEBUG_NAME", > strDebugger); > w_copy.setAttribute("org.eclipse.cdt.dsf.gdb.DEBUG_NAME", > strDebugger); > String projectName = project.getName(); > w_copy.setAttribute("org.eclipse.cdt.launch.PROJECT_ATTR", > projectName); > > if(!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID)) > { > String project_src = "src/"+projectName; > w_copy.setAttribute("org.eclipse.cdt.launch.PROGRAM_NAME", > project_src); > } > w_copy.setAttribute("org.eclipse.cdt.debug.mi.core.protocol", > "mi"); > w_copy.doSave(); No reply from the reporter in more than 6 months. Closing. Please reopen if the problem still exists. |