Project

General

Profile

Support #1059

Tracker branch build breaks if lcov is switched on

Added by Dobbs, Adam almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Build System
Target version:
-
Start date:
24 July 2012
Due date:
% Done:

100%

Estimated time:
Workflow:
New Issue

Description

When setting the lcov flag to 1 in the tracker devel branch, and otherwise fine build will break with the attached error message. Could someone give me a clue on how to debug? Thanks.


Files

error.txt (5.48 KB) error.txt Dobbs, Adam, 24 July 2012 16:01
#1

Updated by Rogers, Chris almost 12 years ago

Should be in namespace MAUS... in fact all of the tracker code should be in namespace MAUS

#2

Updated by Rogers, Chris almost 12 years ago

It's probably something like lcov seeks to link to all declared functions to do coverage - but there is a function Kalman::A which is not defined somewhere. lcov can't link to that because the declaration doesn't exist. So first time you try to use libMausCpp.so, in this case in optics exe, you get a problem.

#3

Updated by Dobbs, Adam almost 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

All roads lead to Rome. Thanks Chris, that was what I needed to know. Am spending most of my time on trying to resolve the namespace issue anyway. Will now close this.

#4

Updated by Rogers, Chris almost 12 years ago

I found out that KalmanTrack::A is a static const blah declared and defined in the header file. Should be declared in header and defined in .cc file. Why debug can't cope with this I don't know.

Edit to add - when I define the three variables in .cc file, build with debug goes fine... (trying to figure out #1060, hence playing)

#5

Updated by Dobbs, Adam almost 12 years ago

Thanks Chris. I'm a bit lost though. If something is static const, then it can't be changed right? So if I say:

static const double A;

in the header, then I can't then say

A = 2./(7.*0.427);

in the constructor in the .cc? What am I missing?

#6

Updated by Santos, Edward almost 12 years ago

Adam, check if the new revision gives you any trouble. (Removed the initialization from the header file.)

#7

Updated by Rogers, Chris almost 12 years ago

Yeah, declare in the .hh (i.e. static const double A;) define in the .cc (i.e. static const double Kalman::A = 0.;)

Also available in: Atom PDF