2

I have used ClearCase for 20 years and this is the a crazy problem. I have encountered it with another compiler 8 years ago but this time I have no work-around.

FileA includes HeaderX and HeaderY but the precompiler never reads HeaderY which has nothing to do with HeaderX (take HeaderX out of the equation or make relatively arbitrary changes to HeaderX and HeaderY is read)

Randomly, we are seeing the old powerpc-wrs-vxworks gcc-2.96 compiler not include files during precompilation. This only happens in a particular vob and only happens in dynamic views and occurs randomly. We believe that this is specific to this particular VOB and believe that there is something wrong with the VOB. We have experienced the problem with Win7 ClearCase version 7.1.2.1, but also with WinXP. Over the years, we have noticed a similar problem with this VOB with another compiler. When we traced the compiler, we see that it opens and fstat's the include file and then closes without a read. Normally, the compiler will perform a read after the open. The trace shows the fstat returning a valid size. Below is the simplest distillation of the problem but do not be lured into thinking it is something about the contents of the file for an explanation of the behavior - you can make arbitrary changes to the files to elicit the correct behavior. Specifically, you can use identical files moved to a different location in the same view or outside the view and the compiler will behave correctly or use a different view with the same files and it will work. We believe, some interaction with MVFS, specific to this VOB, and the compiler is the problem.

Has anyone seen a state that a malfunctioning VOB could get into that may exhibit this misbehavior randomly in views?

foo.c:

#include "HeaderX.h"          /* fix 1 remove this line
                                 fix 2 rename this include file
                                 fix 3 move this include file to a new dir */
#include "HeaderY.h"          /* fix 4 move this line up
                                 fix 5 rename this include file
                                 fix 6 move this include file to a new dir */

HeaderX.h:

/* a=b;                          fix  7 uncomment this line */
#ifndef X                     /* fix  8 change this to an #ifdef instead of #ifndif */
#define X                     /* fix  9 remove this line    
                                 fix 10 change just this X to Y
                                 fix 11 move define after endif */
#endif

HeaderY.h:

#error hurrah! I was included /* GOAL -- to have this file included 
                                         If it is included the precompiler
                                         will print this message.
                              */

P.S Don't tell me it is a compiler bug.

Reasons to believe it is a ClearCase issue:

  • Only happens in dynamic views
  • Happens on multiple machines, multiple users, multiple views, different operating systems. But it is somewhat random.

Reasons to doubt my reasons:

  • Fixes 7, 8, 9, 10, 11
  • In cases where it fails, using a different version of the compiler will not cause the error.
  • But I think questioning the compiler is a red herring, the same compiler with the same set of files will work fine outside of ClearCase or in a different directory in the same view. The VOB is about 15 years old and I think it is peculiar to the VOB. But it is a huge effort to replace it.
joemooney
  • 1,467
  • 1
  • 13
  • 17

1 Answers1

0

Without replacing the Vob, is it possible to export a subset of that Vob representing the sources of that specific project in a brand new Vob?

A simple clearfsimport would create a fresh history, while the original Vob would still be used for:

  • history consultation for those files exported in the new Vob
  • everything else as usual for all the other files not exported in the new Vob.

I have see a few case of Vob corruption, and that option was the easiest workaround.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Oh I wish it were that simple. Snap-shotting the vob and moving forward is what I have been advocating but mgt does not like the choice...RTC is in the future...not that that really changes anything if CC is still on the back-end. I've sent mvfs debug logs to support. Hoping someone there passes it along to someone who may be able to say "yep - looks like a problem with the vob". Then at least I have some hope of convincing people of the dangers. But for the moment it is compiler pointing a finger at mvfs pointing a finger back at the compiler and changing the compiler is not an option. – joemooney Sep 30 '13 at 20:16
  • @joemooney funnily enough, I have been doing ClearCase for 12 years (as an admin, and a bit before that as a user), and I am in the process of migrating ClearCase projects to... RTC! – VonC Sep 30 '13 at 20:24