Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse CDT and Make interaction(when compiling using an external make file, eclipse console is too slow.)
Eclipse CDT and Make interaction [message #757130] Wed, 16 November 2011 15:59 Go to next message
Mario  is currently offline Mario Friend
Messages: 1
Registered: November 2011
Junior Member
Hello guys,

I have created a C project that uses an external make file that I created to compile my code. The make file always works as expected, generating dependencies, object files, and linking appropriately. We use eclipse CDT to edit our code base and to compile using this make file. The results are output to the console provided by eclipse and from there we can simply double click and go to the warning or error in the code using the IDE.

The problem is that our make file whenever some new line is added like below for conditional compilation, then the time it takes eclipse to compile becomes really slow. Each C file is compiled at a very slow rate. Also, if an error is detected while compiling any C file, the IDE will not stop there (even though the option is checked) and will simply continue compiling and even tries to link.

# Disable optimizations if we are debugging.
ifeq ($(MAKECMDGOALS), debug)
OPTIONS := -fpack-struct
endif


The interesting thing is that if I manually run the same make file from the linux console, everything works as expected. The makefile stops when an error is detected and it compiles everything really fast. That is why I think the problem is in the interaction between make and eclipse.

Through trial an error, I discovered that it seems that the error goes away if more lines are added or removed from the make file. For example, If I was to change the code from above to the following and leave the rest of the make file the same, then eclipse compiles everything as it should really fast.

# Disable optimizations if we are debugging.
ifeq ($(MAKECMDGOALS), debug)
OPTIONS := -fno-guess-branch-probability -freorder-blocks -freorder-functions \
-fpack-struct
endif


I wish I could post the code but it is proprietary and I cannot do so.

Note that I use a series of crosscompilers from inside the make file rather than the standard GDB. I don't think this has anything to do with it, but I figure I would mention it.

Any help or ideas as to where the problem could be will be really appreciated.

See versions below:


Eclipse IDE for C/C++ Developers
Version: Helios Service Release 2
Build id: 20110301-1815


make --version
GNU Make 3.80

[Updated on: Wed, 16 November 2011 16:00]

Report message to a moderator

Re: Eclipse CDT and Make interaction [message #758498 is a reply to message #757130] Wed, 23 November 2011 13:14 Go to previous message
ZePequeno . is currently offline ZePequeno .Friend
Messages: 7
Registered: September 2011
Junior Member
I am experiencing the very same problem...

We are building quite a big project, and we use our own custom makefiles for builds. Make is invoked appropriately and compilation advances without any problems except that it is low... and it even messes up make output. What I experience is that apparently redirection of stderr and stdout is not synchronized, so it happens that I see the messages regarding the start of compilation (e.g. "g++ -g ..") of file B, which are followed by error and/or warning messages (e.g "A.cpp: warning ...") related to file A, which came just before A.

I havent managed to tweak my makefile to speed up Console behaviour, running make in the shell is of course very fast.

I thought it could be related to the length of the g++ command line, which is our case is quite long as it lists several include paths. Unfortunately we are still in a development stage where hiding the list of include paths is not an option Sad

regards
Previous Topic:Change source code in debug mode and continue debugging
Next Topic:Eclipse Keeps Forgetting/Losing Miscellaneous->Other Objects
Goto Forum:
  


Current Time: Wed Apr 24 21:55:22 GMT 2024

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

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

Back to the top