Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

target switching problem

(1/3) > >>

killerbot:
There's a problem that randomly occurs ( I guess a race issue), wondering if anyone else suffered from this.

But let me first explain my setup :

* project that builds a static lib
* 4 targets
   - gcc debug
   - gcc release
   - cross compiler debug
   - cross compiler release
* virtual target "all"  ==> all 4
* include paths are specified on the "project" level

(Very) often when I (re)build "All" the first target (gcc debug) builds fine, and then second (sometimes the third, ..) fails, claiming it can not find a certain include file.
Press build (all) again, and it works.

It seems that during the switch to the next target, the compiler did NOT (YET??) receive the correct include paths [Note : I have never checked the compile log to see how it got actually called, next time I will take a closer look on this].

This is happening already for at least more then 6 months I think.

I use the debugger branch, but it might as well be present on the trunk.

MortenMacFly:

--- Quote from: killerbot on February 22, 2012, 01:26:41 pm ---This is happening already for at least more then 6 months I think.

--- End quote ---
Something similar happens to me which may be related:
Often when opening a project and hitting compile, the compilation stops because global variables used in include folders cannot be resolved although they are defined. It is enough to start compiling again at then point - it will succeed. However - its not a general pattern, it happens just sometimes and it seems not project related. Obviously I didn't find a way to reproduce. In debug build it seems to work juts fine... maybe a timing issue?

killerbot:
in my case, there are no global variables used in include folder

killerbot:
it happened again, things time I did not forget to look at the full build log.
Project with 2 tartgets (debug and release), debug was just successfully build, and then it started on the release target :


--- Code: ---g++   -c /home/ldco/Projects/duck/trunk/libraries/Foo/local/Bar.cpp -o ../Deliv/GnuRelease/local/Bar.o

--- End code ---

First things to notice, there are not compiler options, they are all gone !!!
All the options have been specified on the project level , for example all these are missing :

--- Code: ---g++ -Winit-self -Wredundant-decls -Wundef -Wfloat-equal -Wmissing-declarations -Wmissing-include-dirs -Wswitch-default -Wmain -pedantic -std=c++0x -Wextra -Wall -D__BUILD_MULTI_THREAD__  -g 
  -Wextra -Wall 

--- End code ---
together with like 10 include paths.

MortenMacFly:

--- Quote from: killerbot on March 12, 2012, 08:40:02 am ---First things to notice, there are not compiler options, they are all gone !!!

--- End quote ---
I experienced that, too. However - in my case it looked like only MacrosManager was not "ready", so all my macros were gone. However, after reading yours it might indeed be a wrong pointer to a default project or something like that... Only if we could find a way to reproduce! :( The second time you try it always works...

One more thing: Next time this happens, can you inspect what target is active? Do you use virtual targets in that project? If it happens again, please save he project's layout file to see what target should be active after project/WS load... I have that feeling that this might be related...

Navigation

[0] Message Index

[#] Next page

Go to full version