Home | News | Documentation | Download

Compilation error 'COMPILERVERSSTR'


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.24.02
_Platform: MAC OS 11.4
_Compiler: Apple clang version 12.0.5 (clang-1205.0.22.9)


Hi,
I am trying to build root from source, however; it crashes with the error:

In file included from /usr/local/cern/root-6.24.02/core/base/inc/TObject.h:19:
/usr/local/cern/root-6.24.02/core/base/inc/TVersionCheck.h:15:10: warning: non-portable path to file ‘“Rversion.h”’; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include “RVersion.h”
^~~~~~~~~~~~
“Rversion.h”
/usr/local/cern/root-6.24.02/core/base/src/TSystem.cxx:198:31: error: use of undeclared identifier ‘COMPILERVERSSTR’
fBuildCompilerVersionStr = COMPILERVERSSTR;

Any ideas?

Thanks,
Wolfgang

Hi Wolfgang,

A common issue is that a version of ROOT is in the environment during the build. You could try a fresh build making sure that root is unavailable in the shell.

If you don’t need to build from sources, it might be easier to use one of the pre-built packages, either from the releases page or via conda, homebrew, or from cvmfs.

Cheers,
Jakob

Hi Jakob,
Thanks for the reply. Unfortunately, removing the older root version from the environment didn’t fix the problem. I will keep on trying.

Best,
Wolfgang

Hi,
I second @jblomer 's suggestion to use one of the pre-compiled packages rather than building from source if possible.

If not, what are the compilation commands you are using exactly, and what is the full output of cmake’s configuration? There appears to be a certain file that is not produced correctly, namely compiledata.h. It should be in the build directory in the ginclude subdirectory. What are its contents after a failed build attempt from a clean (empty) build directory?

Cheers,
Enrico