TSAXParser.h not found while building app with ROOT dependency


_ROOT Version: v6-33-01
Platform: Ubuntu 20.04 on Windows (WSL)
Compiler: gcc/g++ I think…?


Hello,
I’m trying to install an application called musrfit, (Setting up musrfit on Different Platforms — musrfit 1.9.5 documentation) and I’m running into a problem while I’m building the file.

Here is the code and error message that pop up:

sudo cmake --build ./ --clean-first
... (Files being built)
[  7%] Generating PRgeHandlerDict.cxx, libPRgeHandler_rdict.pcm, libPRgeHandler.rootmap
[  8%] Linking CXX executable msr2msr
input_line_9:41:10: fatal error: 'TSAXParser.h' file not found
#include "TSAXParser.h"
         ^~~~~~~~~~~~~~
Error: /usr/local/bin/rootcling: compilation failure (/home/discus/Apps/musrfit/build/src/classes/libPUserFcnBasee5215e2124_dictUmbrella.h)
make[2]: *** [src/classes/CMakeFiles/PUserFcnBase.dir/build.make:77: src/classes/PUserFcnBaseDict.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:959: src/classes/CMakeFiles/PUserFcnBase.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

It cannot find TSAXParser.h. This is a library(?) that is mentioned in a lot of the files in ROOT, so I don’t know if this is something I need to install separately or if root has some map or header file (I don’t know the term) that tells it where this file is that musrfit does not have, or if building musr is calling ROOT information and then ROOT is having an error.

Root does run when I call it.

I’m not even sure if this is a problem with root or something else, but the installation documentation for the application musrfit doesn’t seem to suggest there’s any sort

Thank you for any insight and help you can provide,

Hi Samuel,

I am sorry to read this compilation against ROOT is not working out of the box.
Maybe can you be more precise about what command is failing, i.e. rootcling exact invocation?

Best,
D

In your CMakeLists, did you call
target_link_libraries(....... PRIVATE ROOT::XMLParser)