Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Resource Custom Build Step corrupts Project(Apply Custom Build Step Overrideing Other Tools causes project to not reopen)
Resource Custom Build Step corrupts Project [message #919299] Fri, 21 September 2012 22:07 Go to next message
John Stile is currently offline John StileFriend
Messages: 20
Registered: July 2009
Junior Member
Using a "Resource Custom Build Step", I use m4 macro language to modify a .cpp file before building the cpp, in eclipse 3.7.2, 3.8, or 4.2 (all I have tested so far).

When "Custom Build Step Applicability", is set to "Disable Custom Build Step", I can close and open the project.

When "Custom Build Step Applicability", is set to "Apply Custom Build Step Overriding Other Tools", the build step executes, but after closing the project it opens to and empty list of items in "Project Explorer"

In my project resource list I have files:
Server.cpp
Server.m4
taks.m4

Server.m4 Properties
  C/C++ Build
    Settings->Build Steps->
      Custom Build Step Applicability: Disable Custom Build Step
      Additional input file name: task.m4
      Output file name:  ../Server.cpp
      Command: m4 < ../Server.m4 > ../Server.cpp
      Description: Invoking: Resource Custom Build Step for Server.m4

I can close and open the project.

When I change
Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools

the project will open to an empty list.

I saved a copy of the project directory before and after the change.
Only the .cproject file changed in the directory.
Only one line in the .cproject file changed.

Before: Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools
<fileInfo id="cdt.managedbuild.config.gnu.lib.release.1507965422.2118444669" name="Server.m4" rcbsApplicability="disable" resourcePath="Server.m4" toolsToInvoke="">
        <tool announcement="Invoking: Resource Custom Build Step for Server.m4" command="m4 &lt; ../Server.m4 &gt; ../Server.cpp" customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463" name="Resource Custom Build Step">
                <inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1084327982" name="Resource Custom Build Step Input Type">
                        <additionalInput kind="additionalinputdependency" paths="task.m4"/>
                </inputType>
                <outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.248576857" name="Resource Custom Build Step Output Type" outputNames="../Server.cpp"/>
        </tool>
</fileInfo>

After: Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools
<fileInfo id="cdt.managedbuild.config.gnu.lib.release.1507965422.2118444669" name="Server.m4" rcbsApplicability="override" resourcePath="Server.m4" toolsToInvoke="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463">
        <tool announcement="Invoking: Resource Custom Build Step for Server.m4" command="m4 &lt; ../Server.m4 &gt; ../Server.cpp" customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463" name="Resource Custom Build Step">
                <inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1084327982" name="Resource Custom Build Step Input Type">
                        <additionalInput kind="additionalinputdependency" paths="task.m4"/>
                </inputType>
                <outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.248576857" name="Resource Custom Build Step Output Type" outputNames="../Server.cpp"/>
        </tool>
</fileInfo>


If I change the .cproject file back, it all works.
Is this supposed to work?

I haven't figured out how to make a Builder work, so this is all I have.
Re: Resource Custom Build Step corrupts Project [message #923213 is a reply to message #919299] Tue, 25 September 2012 18:09 Go to previous messageGo to next message
John Stile is currently offline John StileFriend
Messages: 20
Registered: July 2009
Junior Member
I would love for anyone to share some support (I did not find any paid support offers).

I can at least share my frustration.

With eclipse-3.5.2, enabling the custom build step does not corrupt the project, and the step runs. By enable the custom build step, I mean:
project properties->Settings->Build Steps->Resource Custom Build Step->Custom Build Step Applicability->"Apply Custom Build Step Overriding Other Tools".

Anything newer than eclipse-3.5.2 this problem with custom build steps.

I found one thread with the same corruption:
"custom build steps for QT ui and moc file [message #812260]"
http://www.eclipse.org/forums/index.php/m/815480/?srch=Custom+Build+Step
To sum it up: "It does not work as expected", and they gave up.
Giving up is not an option for me.

Why would eclipse still contain something functionally broken, even in Juno(4.2)?
Or why doesn't the documentation clarify a common misconception?

The IDE should offer a well advertized and documented way to run custom build steps (for external tools) for a specific resource file, and include details in examples that least the most common cases.

Help Please!

I also tried the external tools route, but it has also failed me, but I hesitate to go that route, as it is not clear to me whether custom build steps are the wrong way to go.

[Updated on: Tue, 25 September 2012 18:28]

Report message to a moderator

Re: Resource Custom Build Step corrupts Project [message #923310 is a reply to message #923213] Tue, 25 September 2012 20:20 Go to previous messageGo to next message
John Stile is currently offline John StileFriend
Messages: 20
Registered: July 2009
Junior Member
I am able to create a project-level pre-compile build step, but it runs every build, and not just when the .m4 file changes, which I am not happy about.

Please Help.
Re: Resource Custom Build Step corrupts Project [message #934111 is a reply to message #923310] Fri, 05 October 2012 17:05 Go to previous messageGo to next message
John Stile is currently offline John StileFriend
Messages: 20
Registered: July 2009
Junior Member
Does anyone have anything more to say about this? Per resource file Build steps did work on 3.5.2.
Re: Resource Custom Build Step corrupts Project [message #937558 is a reply to message #919299] Tue, 09 October 2012 04:08 Go to previous messageGo to next message
John Stile is currently offline John StileFriend
Messages: 20
Registered: July 2009
Junior Member
Maybe I'll have more luck with the bug tracking system.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=391383
Re: Resource Custom Build Step corrupts Project [message #987579 is a reply to message #934111] Tue, 27 November 2012 08:52 Go to previous messageGo to next message
Eirik Larsen is currently offline Eirik LarsenFriend
Messages: 1
Registered: November 2012
Junior Member
For what it's worth, I'm having a similar problem with "resource custom build step". I get a NullPointerException after a while and eventually the workspace gets corrupted.

Did you find another reasonable way to execute a custom build step for a particular file?
Re: Resource Custom Build Step corrupts Project [message #987738 is a reply to message #987579] Tue, 27 November 2012 20:29 Go to previous messageGo to next message
Paul Bußmann is currently offline Paul BußmannFriend
Messages: 17
Registered: October 2012
Junior Member
I'm not wondering if they gave up.

Is just analogue to my experience. Found a bug and reported it (https://bugs.eclipse.org/bugs/show_bug.cgi?id=390589). Bug got resolved, but it seems that it was resolved by chance, because no-one was assigned to solve it and no-one seemed to take care about it.

Instead of complaining about errors, I'd like to fix them and provide a patch. But it is currently not possible to get the sources and compile them. See http://www.eclipse.org/forums/index.php/mv/msg/44613/987020/#msg_987020 . And again, no-one cares.

Still wondering if someone gives up?
Re: Resource Custom Build Step corrupts Project [message #1004324 is a reply to message #987738] Wed, 23 January 2013 01:27 Go to previous message
Zane Ji is currently offline Zane JiFriend
Messages: 2
Registered: January 2013
Junior Member
A simple workaround is removing all
<additionalInput kind="additionalinputdependency"/>
from .cproject.
Previous Topic:Unresolved References
Next Topic:[AST] Evaluating expressions?
Goto Forum:
  


Current Time: Thu Mar 28 09:10:16 GMT 2024

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

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

Back to the top