Dear all,
I have an issue related to the creation of ROOT shared libraries when submitting a Job in HTcondor on lxplus. Actually I didn’t have this issue until 2 weeks ago but now I do (with the same script), so probably something has changed in the meanwhile. Also, the script run correctly on lxplus locally, the issue appear only when submitting on HTcondor.
The error is the following:
Info in TUnixSystem::ACLiC: creating shared library /afs/cern.ch/work/s/spalazzo/FastCaloGAN/rootToCsv/readFCShit_cxx.so
In file included from <<< cling interactive line includer >>>:1:
/afs/cern.ch/work/s/spalazzo/FastCaloGAN/rootToCsv/readFCShit.cxx:20:10: fatal error: ‘libxml/xmlmemory.h’ file not found #include <libxml/xmlmemory.h>
^~~~~~~~~~~~~~~~~~~~
Error in : Dictionary generation failed!
I have a bash script that submit the readFCShit.cxx macro and what I do in my bash script is the following:
Definitely, I’d say Did you change ROOT version, LCG release, setup script or similar?
Where do you expect to pick the file libxml/xmlmemory.h from? (do you need to include that header explicitly?)
Cheers,
Enrico
EDIT:
ah sorry, I missed the -I/usr/include/libxml2/ , I’ll check if I can reproduce the problem
Alright: are you sure root -b -l -x '$script' -I/usr/include/libxml2/ever worked?
I don’t think root allows passing include directories like that, with a -I option from the command line.
If it used to work, this might be a regression, in which case it would be useful if you listed what ROOT version worked and what ROOT version didn’t.
The typical way to specify extra include directories to the root interpreter is with R__ADD_INCLUDE_PATH(/path/to/libxml2/). Adding the following line at the very beginning of the ROOT macro should help (if /usr/include/libxml2/ exists on the system):
Dear Enrico,
thanks a lot for your quick answer!
I am not sure if that line actually worked, honestly. But, the include that you mentioned is already in my cxx macro (attached now here, line 18) readFCShit.cxx (21.3 KB) . So probably it was working before because of the include in readFCShit.cxx and not because of this line
root -b -l -x ‘$script’ -I/usr/include/libxml2/
About the version of ROOT that I used 2 weeks ago, I didn’t do any setup so I guess there is a default one on HTcondor. Sorry I am not that expert at all on the version of ROOT used on the batch system.
I was trying to attach here also the script that I use to launch jobs on HTcondor (if it could help) but apparently is not allowed to attach .sh files
Please let me know if I didn’t properly reply to your questions.
Thanks!
Cheers,
Serena
Hi,
I don’t quite understand what gets executed in what order.
root -b -l -x readFCShit.cxx should work with that R__ADD_INCLUDE_PATH.
This, however:
root -b -l <<EOF
.L ${PWD}/readFCShit.cxx+
.q
EOF
tells ROOT to invoke an external compiler (with the + at the end of the macro name), and the external compiler might not use the extra include directory /usr/include/libxml2/. Again, I am not sure how this ever worked
There is an option in the rootrc configuration file for ROOT that can be used to add extra include directories:
# Add additional include directives for ACLiC compilations.
#ACLiC.IncludePaths: -I/where/the/includes/are
I don’t know how to do this from the root invocation (maybe @pcanal does).
Alternatively you can directly compile your code rather than compiling it through ROOT, so you can pass the -I/where/the/includes/are option directly to the compiler.
and how it could have ever worked, I removed this include -I/usr/include/libxml2/ and now the code run properly on the batch system! So probably, it was in conflict with the same include inside the .cxx macro.
Thanks a lot for your help and the prompt answers!
Cheers,
Serena