I have a problem with rootcint. I recently upgraded ROOT to version 5.17.04 and now I get a strange error. I installed ROOT with
./configure --prefix=/usr ...
make
make install
It works fine. But when I use rootcint to generate dictionaries for my classes I get the following:
rootcint -f viewerDict.cpp -c viewer.h viewerLinkDef.h
Warning: environment variable ROOTSYS is not set. Standard include files ignored
Error: cannot open file "typeinfo" /usr/include/root/Rtypeinfo.h:33:
Error: cannot open file "stdio.h" /usr/include/root/Rtypes.h:34:
Error: Symbol type_info is not defined in current scope /usr/include/root/TGenericClassInfo.h:33:
Error: Symbol fInfo is not defined in current scope /usr/include/root/TGenericClassInfo.h:33:
Error: cannot open file "iosfwd" /usr/include/root/Riosfwd.h:34:
Error: cannot open file "stdarg.h" /usr/include/root/TObject.h:43:
Syntax error /usr/include/root/TObject.h:148:
Error: cannot open file "stdarg.h" /usr/include/root/TString.h:44:
Error: cannot open file "string" /usr/include/root/TString.h:45:
Syntax error /usr/include/root/TString.h:355:
Syntax error /usr/include/root/TString.h:356:
Syntax error /usr/include/root/TString.h:358:
Syntax error /usr/include/root/TString.h:359:
Syntax error /usr/include/root/TString.h:360:
Error: cannot open file "stdarg.h" /usr/include/root/Varargs.h:16:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing viewerDict.cpp viewerDict.h !!!
Error: rootcint: error loading headers...
I always thought that I don’t have to set ROOTSYS if I choose that installation method. And why does rootcint ignore the standard include files without it? Does this make any sense?
I know that it did work before. And I think even with version 5.17.02. I did not change anything else since then.
I cannot reproduce that. Could it be that you re-configured and didn’t run make distclean afterwards? Many changes due to a new configuration will not be picked up by the build system, leaving you with files that were compiled without prefix.
ps - I have this problem with gcc version 4.4.3 on Ubuntu with root 5.27.04. However, my code compiles and runs fine under Mac OS 10.6.4 gcc version 4.2.1, and root v5.26.00b.
I’m currently installing v5.26.00d on Ubuntu to see if that makes a difference. I’ll let you know if it does.
By the way, this should be a bug. I’d be happy if it would be fixed, because it caused some problems in automatically generated Makefiles for me. Anyone?
Can you (re)provide a running example of this problem. Adding -I/usr/include even to g++ is usually a mistake since either it already has it (because it is one of its default) or should use a different directory (because the header are at an odd place but still g++ will know where) ; either it sounds that the automatic makefile generator might be wrong.