Problem compiling with ACLiC

Hi,

I would like to use the ACLiC to compile my scripts (ROOT 5.12) but there is a Problem somehow. Testing “.x test.C+” in the command line with test.C only:

int main()
{

}

This already doesn’t work, giving back the following:

Info in TUnixSystem::ACLiC: creating shared library /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test_C.so
In file included from /tmp/dJ1t8y_cint.cxx:1:
/tmp/fileIumSbp_rootcint.h:1:19: error: TROOT.h: No such file or directory
/tmp/fileIumSbp_rootcint.h:2:30: error: TMemberInspector.h: No such file or directory
/tmp/fileIumSbp_rootcint.h:3:69: error: /home/daniel/DiplomaThesis/Analysis/AnalysisFramework/inc: No such file or directory
In file included from /tmp/fileIumSbp_rootcint.h:4,
from /tmp/dJ1t8y_cint.cxx:1:
/home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test.C:1:19: error: TROOT.h: No such file or directory
/home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test.C:2:23: error: Riostream.h: No such file or directory
Error: external preprocessing failed. :0:
!!!Removing /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileuX0u7c.cxx /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileuX0u7c.h !!!
Error: rootcint: error loading headers…
Error in : Dictionary generation failed!
Info in : Invoking compiler to check macro’s validity
g++: /home/daniel/DiplomaThesis/Analysis/AnalysisFramework/inc: Eingabedateien des Binders unbenutzt, da keine Bindung geschieht
Info in : The compiler has not found any problem with your macro.
Probably your macro uses something rootcint can’t parse.
Check root.cern.ch/root/Cint.phtml?limitations for Cint’s limitations.
Error: Function test() is not defined in current scope :0:
*** Interpreter error recovered ***

Does somebody know what the problem is? Trying the same thing on an CERN lxplus-machine using the ROOT-binaries on afs (SL4, ROOT 5.14) works fine…

Thank you and best regards,

Daniel

Sorry, I meant doing “.L test.C+” in command line works on lxplus, but running main() also does not work. Obviously I am still doing wrong something more basic…

regards,

Daniel

Ok, sorry for the confusion…trying to do “.L test.C” and running test() with test. C:

#include <Riostream.h>

int test()
{
        float a=123.;
        std::cout << a << std::endl;
        return 0;
}

finally runs on lxplus but not on my local computer, giving the errors also stated above, including the complaints of not finding TROOT.h etc. which is strange…is there something wrong with my local ACLiC?

regards, Daniel

Most likely the environment variable ROOTSYS is not set properly on your local computer. If you do:root [] gDebug = 7; root [] .L test.C+
you should see the exact list of command that ACLiC is attempting to run.

Cheers,
Philippe

Hi Philippe,

thanks for your reply. I tried what you suggested and I can see where rootcint looks for include files for creating the dictionary which is (apart from the path for my own libraries $OWNCLASSES which I am not using for this example) : [color=red]/opt/root/include[/color], which is correct, so he should find [color=red]TROOT.h[/color] for instance. What confuses me is that it is stated in: [color=red]" "[/color]. I do not know if this is important. I cannot see why the include commands should not work… See below the first lines of what I am given back when executing “.L test.C+” with gDebug=7.

Info in TPluginManager::FindHandler: did not find plugin for class TSystem and uri /home/daniel/DiplomaThesis/Analysis/GeoCorrection/.
Info in TPluginManager::FindHandler: did not find plugin for class TSystem and uri /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test_C.so
Info in TUnixSystem::ACLiC: creating shared library /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test_C.so
Info in TUnixSystem::ACLiC: looking for header in: /home/daniel/DiplomaThesis/Analysis/GeoCorrection/.:.:: $OWNCLASSES/inc:"/opt/root/include":
Info in TPluginManager::FindHandler: did not find plugin for class TSystem and uri /opt/root/etc/system.rootmap
Info in : creating the dictionary files
Info in : rootcint --lib-list-prefix=/home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileBWZzOOmap -f /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./file4aaQKV.cxx -c -p -I $OWNCLASSES/inc -I"/opt/root/include" /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test.C /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileCrpFhSlinkdef.h
In file included from /tmp/zTNDBn_cint.cxx:1:
/tmp/fileeoJHlu_rootcint.h:1:19: error: TROOT.h: No such file or directory
/tmp/fileeoJHlu_rootcint.h:2:30: error: TMemberInspector.h: No such file or directory
/tmp/fileeoJHlu_rootcint.h:3:69: error: /home/daniel/DiplomaThesis/Analysis/AnalysisFramework/inc: No such file or directory
In file included from /tmp/fileeoJHlu_rootcint.h:4,

regards, Daniel

Hi,

You should now (since gDebug=7 prevented the deletion of the temporary files) be able to run:rootcint --lib-list-prefix=/home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileBWZzOOmap -f /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./file4aaQKV.cxx -c -p -I $OWNCLASSES/inc -I"/opt/root/include" /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./test.C /home/daniel/DiplomaThesis/Analysis/GeoCorrection/./fileCrpFhSlinkdef.h from the command line. I expect the same result … but you can now play with the command line …

Humm … I noticed tsome odd … in the output $OWNCLASSES is always preceded with a space (in particular this result in -I $OWNCLASSES which means cint sees TWO arguments -I (which tells it to ignore the default paths) and $OWNCLASSES which he is ask to use as a file).

So most likely the problem is how you passed $OWNCLASSES to the system.

Cheers,
Philippe

Hi Philippe,

Thanks very much! It works now. You were indeed right, the include path was not properly set for $OWNCLASSES, there were some spaces that must have confused cint… apparently I did it differently on lxplus, so that it worked there. I wear sackcloth and ashes…:slight_smile:

regards Daniel