I have a project that uses cmake to compile. The CMakeLists.txt file for the project includes multiple root_generate_dictionary calls which generate a file called module.modulemap during the configuration step.
When the project is called from the build directory, it generates a lot of error messages like this:
Error in <UnknownClass::RegisterPrebuiltModulePath>: Could not load modulemap in /opt/GRSISort-build/module.modulemap
(repeated multiple times)
Error in <TInterpreter::RegisterPrebuiltModulePath>: Could not load modulemap in /opt/GRSISort-build/module.modulemap
(also repeated multiple times)
When I remove the module.modulemap file everything works fine, and even if I remove it before building the project, the project compiles without problems. What is this file for, and can I have it either not created, or have it removed automatically after the setup is done?
The modulemap is an information source the interpreter uses to locate C++ modules used to build the Abstract Syntax Tree components necessary to interactive usage and, in some cases, for data model classes, perform IO.
What ROOT version is this? What kind of project are you working with?
This is with ROOT 6.32.08. I just tested ROOT 6.26.02, and there the file is created but does not cause any problems. I will test other root versions we have installed and update this post later.
The project was made to process and analyze data from gamma spectrometers at Triumf.
UPDATE: 6.26.14, 6.28.02, and 6.30.06 also work. I went back to 6.32.08 and now this one works too? I don’t understand why it’s suddenly working, I tried going through the exact same steps as before, but I can’t reproduce the errors anymore. And since I don’t have the original modulemap that was causing the issue I can’t even check if anything has changed about the file itself. So I guess this is solved.
Thanks for sharing the conclusions with the Community!
Maybe some remnant which was left around. Don’t hesitate to come back to the forum if you have more questions!