I have a follow up question. I have implemented the approach I described, but am still wrestling with the behavior of libCling.so
. It seems that the library is included as a second-order dependency of some other ROOT libraries I am using. When it is loaded, strace shows it looks for header files in /build/root
even though $ROOTSYS
has been previously set.
Here is an example:
stat("/build/root/src/build/include/TException.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TExec.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TExec.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TFolder.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TFolder.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TMemberInspector.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TMemberInspector.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TMessageHandler.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TMessageHandler.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TPluginManager.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TPluginManager.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TPRegexp.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TPRegexp.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TProcessUUID.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TProcessUUID.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQClass.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQClass.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQCommand.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQCommand.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQConnection.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TQConnection.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRedirectOutputGuard.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRedirectOutputGuard.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRemoteObject.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRemoteObject.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRootIOCtor.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TRootIOCtor.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TStringLong.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TStringLong.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TSystemDirectory.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TSystemDirectory.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TSystemFile.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TSystemFile.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TTask.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TTask.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TThreadSlots.h", 0x7fff0aaf7308) = -1 ENOENT (No such file or directory)
stat("/build/root/src/build/include/TThreadSlots.h", 0x7fff0aaf7358) = -1 ENOENT (No such file or directory)
My project does not need a live interpreter, is it possible to disable this behavior? And if not, is it possible to at least force libCling.so
to honor the value of $ROOTSYS
?
Edit: I found this related issue