Compiling geoviewer using LCG toolchain


To make the installation of flair easier for my needs, I created a conda package. conda-build takes care of the compilation on the target environment and the package can then be installed. No issue so far.

However, trying to update to the latest version, I get compilation errors:

In file included from
…/data/usrbin.h: At global scope:
…/data/usrbin.h:31:58: error: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]
static constexpr char USRBINErrHeader[] = { “STATISTICS” };
…/data/usrbin.h:31:58: error: field initializer is not constant
make[1]: *** [usrbinlayer.o] Error 1
make[1]: Leaving directory `$SRC_DIR/flair-geoviewer-3.2-4.5/viewer’
make: *** [viewer/libviewer.a] Error 2

I use GCC 9 on CC7 using the LCG release on CVMFS ( /cvmfs/ ). The documentation does not mention a specific version of GCC so I assume this should work.

I’m a bit puzzled as this seems like a genuine C++ error.

Any pointer would be appreciated.

Hi @chernals,

the code is perfectly fine, yet this line uses a newer language feature (in class initialization of static variables) that was slowly adopted by the various compilers.

While previous versions of geoviewer were 100% compatible with old compilers (e.g. GCC 4), this is undergoing some change as by now those compilers should be long retired. I tried with the LCG release on CC7 (LXPLUS7) and cannot reproduce the error.

However, on CC7 the default compiler is GCC 4.8 which will not support this feature as it is too old. Are you sure that your build process is not, mistakenly, falling back to the system’s default compiler? It would most probably have been transparent with former versions of geoviewer.


1 Like