Troubles compiling QC

IIRC, AliTPCCommon is not needed anymore for O2, so I find it strange it’s actually being compiled.

David Rohr would know better, but I am unable to tag him… @bvonhall

There is a PR to remove it from the dependencies: https://github.com/alisw/alidist/pull/1613
But it cannot be merged right now, because we need a new AliRoot tag first (and the release validation failed for some unrelated issue: https://alice.its.cern.ch/jira/browse/ALIROOT-8256)
Without this PR, the old AliTPCCommon files are at least installed and headers added to ROOT_INCLUDE_PATH. Might be that cint picks up some old headers, which had a different directory structure.
Could you try to apply the patch from the PR to alidist locally?

@drohr I have tried incorporating the PR, but now O2 complains at the cmake stage:

-- Checking C++14 support for "user-defined-literals": works
CMake Error at Detectors/TPC/reconstruction/CMakeLists.txt:14 (message):
  cmake variable ALITPCCOMMON_DIR is not defined

To me this looks like you are using an old version of O2. Could you confirm you are using the current dev branch?

The defaults-o2.sh does not specify an O2 version, so the default one is picked:

     - O2@O2-1.0.0

Should I use the defaults-o2-dev-fairroot.sh instead?

no, that would be for the dev version of fairroot.
Actually, I have no idea what O2 one should use for QC.
You’d have to ask @bvonhall.
But normally, I always check out O2 as development package in the dev branch.

defaults-o2-dataflow.sh specifies the development version for O2 as well:

overrides:
  O2:
    version: "%(short_hash)s%(defaults_upper)s"
    tag: dev

However, IMHO the point here is that compilation with defaults-o2.sh seems to be broken at the moment… so I will stick to defaults-o2-dataflow.sh for the time being.

defaults-o2 does not specify any version. If you you defaults=o2, then you have to check out the dev branch of O2 as development package.

Otherwise, it will use the 1.0.0 tag, which only work with the o2suite 1.0.0 tag of alidist.

defaults o2-dataflow will disable quite some packages related to simulation. If you do not need to simulate data, that should be fine. Otherwise, I’d stick to o2 defaults and use O2 as development package in the dev branch.

I was not aware of this, thanks for the info.

Since I do not need the simulation part, I will go the o2-dataflow route.

Thanks!

@drohr @eulisse @bvonhall
I have again problems compiling QC on a CERN CentOS7 computer.

This is how I build QC and the related packages:

export ALIBUILD_WORK_DIR="$HOME/alice/sw"
aliBuild init QualityControl@master --defaults o2-dataflow
aliBuild -j 4 build flpproto --defaults o2-dataflow

The cmake configuration for QC fails with the following message:

-- InfoLogger found - using cmake targets in /root/alice/sw/slc7_x86-64/libInfoLogger/v1.3.2-11/lib/cmake/InfoLogger
-- Creating ourselves the O2 targets. That should be only temporary
CMake Error at /root/alice/sw/slc7_x86-64/CMake/v3.13.1-6/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find O2 (missing: O2_FRAMEWORK_LIBRARY)
Call Stack (most recent call first):
  /root/alice/sw/slc7_x86-64/CMake/v3.13.1-6/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindO2.cmake:50 (find_package_handle_standard_args)
  CMakeLists.txt:97 (find_package)

Any idea?

Thanks!

@drohr @eulisse @bvonhall
After some more fiddling, it seems that the O2@dev version that is specified in the o2-dataflow default for QC is not compatible with the current QC code.

I could get past the cmake problems by modifying the FindO2.cmake script, but now compilation fails:

[  8%] Building CXX object Framework/CMakeFiles/QualityControl.dir/src/CcdbDatabase.cxx.o
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx: In member function 'virtual o2::quality_control::core::MonitorObject* o2::quality_control::repository::CcdbDatabase::retrieve(std::__cxx11::string, std::__cxx11::string, long int)':
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx:132:29: error: 'class o2::ccdb::CcdbApi' has no member named 'retrieveFromTFile'
   TObject* object = ccdbApi.retrieveFromTFile(path, metadata, when);
                             ^~~~~~~~~~~~~~~~~
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx: In member function 'void o2::quality_control::repository::CcdbDatabase::storeStreamerInfosToFile(std::__cxx11::string)':
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx:264:3: error: 'TMessage' was not declared in this scope
   TMessage message(kMESS_OBJECT);
   ^~~~~~~~
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx:264:3: note: suggested alternative: 'TStorage'
   TMessage message(kMESS_OBJECT);
   ^~~~~~~~
   TStorage
/root/alice/sw/SOURCES/QualityControl/master/0/Framework/src/CcdbDatabase.cxx:265:3: error: 'message' was not declared in this scope
   message.Reset();
   ^~~~~~~

Which version of O2 should I use to compile the current QC code?

Hi Andrea,

Am I right that the O2 repo was not “inited” ? only QualityControl was ?
If so, please do aliBuild init O2@dev and try again.

The culprit might be that the recipe of O2 is fixed on 1.0 which is from last november.

We build continuously this stack so I am confident we will be able to get something working for you shortly :slight_smile:
Cheers,
Barth

That was it! I can now compile QC properly. Thanks for the hint!