Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Dependencies are not taking effect when using the headerless build(Building a project with 3-4 dependencies works well under eclipse, but doesnt work with headlessbuild)  () 1 Vote
icon4.gif  Dependencies are not taking effect when using the headerless build [message #825548] Wed, 21 March 2012 00:45 Go to next message
Sylvain Boily is currently offline Sylvain BoilyFriend
Messages: 9
Registered: February 2012
Junior Member
Hi all,

I have been using Eclispe CDt for a while now.

My current project has 4-5 libraries (both shared and static) that it requires to build before hand.

Here's a summary of my different project dependencies.

Exec1 depends on (lib3, lib4 and lib5) and lib3 dpeends on lib2 and finally lib2 depends on lib1

when I compile lib 3 under eclipse , lib 1 gets compiled first followed by lib2 and finally lib 3.

Same goes for the exec1 project.

now when I compile using the eclipse command line (headless build) the different dependencies are all compiled but the orders isn't kept.

Exec1 gets compiles last, but all dependenices are randomly compiled, so sometimes lib3 (which requires lib2 and lib 1) gets compiled first....

Should I open a Jira ? Or maybe I did something wrong ?

Sylvain
Re: Dependencies are not taking effect when using the headerless build [message #826780 is a reply to message #825548] Thu, 22 March 2012 13:52 Go to previous messageGo to next message
Sylvain Boily is currently offline Sylvain BoilyFriend
Messages: 9
Registered: February 2012
Junior Member
Was my explaination clear enough ?

I wcould ellaborate more if it wasn't clear.

This is getting a major on our side, since bamboo will report a build failure 50% of the time ...

Please direct me to correct the bugzilla site for the problem to be tracked properly.

Thanks!
Re: Dependencies are not taking effect when using the headerless build [message #827399 is a reply to message #826780] Fri, 23 March 2012 09:25 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
In Preferences->General->Workspace->Build order you can set the build order. I guess the default order is sorted by alphabet. You can try to define the correct build order here.

Bugzilla is https://bugs.eclipse.org/bugs/query.cgi


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Dependencies are not taking effect when using the headerless build [message #827536 is a reply to message #827399] Fri, 23 March 2012 13:17 Go to previous messageGo to next message
Sylvain Boily is currently offline Sylvain BoilyFriend
Messages: 9
Registered: February 2012
Junior Member
Thanks for the reply.

I am guessing that the workspace general build order applies when we perform a build all porject ?

On my build machine, I do a fresh checkout of the svn repository, then I use the following command

~/eclipse/eclipse -nosplash -data ${bamboo.build.working.directory} -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll ${bamboo.build.working.directory} -build media-gw/Release-32bit

All projects checked out are imported and a new workspace is created.

I would expect that the project specific settings found under

c/c++ Genereal -> Paths and Symbols -> References (tab) would be taken into consideration. The fact that we can move the reference up/down seems to say that they will be build in the top to bottom order.

Re: Dependencies are not taking effect when using the headerless build [message #835136 is a reply to message #827536] Mon, 02 April 2012 21:02 Go to previous messageGo to next message
Sylvain Boily is currently offline Sylvain BoilyFriend
Messages: 9
Registered: February 2012
Junior Member
So I did a few test today.

Here's my command line

Quote:
~/eclipse/eclipse -nosplash -data /tmp/workspace/ -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll ~/workspace/cpp/ -cleanBuild media-gw/Debug-32bit > ~/DebugBuild32-5.log


I ran the same command 5 times

Here's are the results of the dependencies build order


Quote:
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project nvc-logger ****
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project nvc-core ****
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project nvc-proto-audio ****
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project nvc-proto-control ****
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project audiomorphosis ****
DebugBuild32-1.log:**** Build of configuration Debug-32bit for project media-gw ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project audiomorphosis ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project nvc-proto-audio ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project nvc-logger ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project nvc-core ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project nvc-proto-control ****
DebugBuild32-2.log:**** Build of configuration Debug-32bit for project media-gw ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project nvc-proto-audio ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project audiomorphosis ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project nvc-core ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project nvc-logger ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project nvc-proto-control ****
DebugBuild32-3.log:**** Build of configuration Debug-32bit for project media-gw ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project nvc-proto-audio ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project audiomorphosis ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project nvc-core ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project nvc-logger ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project nvc-proto-control ****
DebugBuild32-4.log:**** Build of configuration Debug-32bit for project media-gw ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project nvc-core ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project audiomorphosis ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project nvc-proto-audio ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project nvc-proto-control ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project nvc-logger ****
DebugBuild32-5.log:**** Build of configuration Debug-32bit for project media-gw ****



Finally here is the external in the .cproj (please look at the Debug-32Bit configuration only
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
				<externalSettings containerId="audiomorphosis;cdt.managedbuild.config.gnu.exe.debug.1839153845" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
				<externalSettings containerId="nvc-proto-audio;cdt.managedbuild.config.gnu.so.debug.2114634522" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
					<externalSetting>
						<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/nvc-proto-audio/include"/>
						<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/nvc-proto-audio/Debug-32bit"/>
						<entry flags="RESOLVED" kind="libraryFile" name="nvc-proto-audio"/>
					</externalSetting>
				</externalSettings>
				<externalSettings containerId="nvc-proto-control;cdt.managedbuild.config.gnu.so.debug.1457267508" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
					<externalSetting>
						<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/nvc-proto-control/include"/>
						<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/nvc-proto-control/Debug-32bit"/>
						<entry flags="RESOLVED" kind="libraryFile" name="nvc-proto-control"/>
					</externalSetting>
				</externalSettings>
				<externalSettings containerId="nvc-core;cdt.managedbuild.config.gnu.so.debug.1694641694.691825416" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
					<externalSetting>
						<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/nvc-core"/>
						<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/nvc-core/Debug-32bit"/>
						<entry flags="RESOLVED" kind="libraryFile" name="nvc-core"/>
					</externalSetting>
				</externalSettings>
				<externalSettings containerId="nvc-logger;cdt.managedbuild.config.gnu.so.debug.102643235" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
					<externalSetting>
						<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/nvc-logger"/>
						<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/nvc-logger/Debug-32bit"/>
						<entry flags="RESOLVED" kind="libraryFile" name="nvc-logger"/>
					</externalSetting>
				</externalSettings>
			</storageModule>
Re: Dependencies are not taking effect when using the headerless build [message #835552 is a reply to message #835136] Tue, 03 April 2012 11:39 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
It seems that you must add the project references to Project Settings->Project References

See comment #2 from https://bugs.eclipse.org/bugs/show_bug.cgi?id=327902


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Dependencies are not taking effect when using the headerless build [message #835627 is a reply to message #835552] Tue, 03 April 2012 13:27 Go to previous messageGo to next message
Sylvain Boily is currently offline Sylvain BoilyFriend
Messages: 9
Registered: February 2012
Junior Member
The dependencies automatically get added to 'Project Settings->Project References'

when they are set under 'Project Settings->c/c++ General->Paths and Symbols->References'

Everything should be properly set.

I have open a bug ID: 375882 (cannot post links yet...)

My dependencies always get build, but the order is never the same. So all dependencies are threaded as a random pool of dependency to be build.

Re: Dependencies are not taking effect when using the headerless build [message #1028516 is a reply to message #835627] Thu, 28 March 2013 11:06 Go to previous messageGo to next message
Ian McCallum is currently offline Ian McCallumFriend
Messages: 1
Registered: March 2013
Junior Member
Did you ever find a resolution to this problem?
Re: Dependencies are not taking effect when using the headerless build [message #1063970 is a reply to message #1028516] Mon, 17 June 2013 01:41 Go to previous message
L K is currently offline L KFriend
Messages: 1
Registered: June 2013
Junior Member
hi, wonder if any update on this issue, or found any work around?
Having the same problem. thanks
Previous Topic:How-to enable C++11 support?
Next Topic:Live Watch in Debugging?
Goto Forum:
  


Current Time: Fri Apr 19 09:45:32 GMT 2024

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

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

Back to the top