Compiling with rootcint

I’ve inherited a Makefile which processes code using “rootcint”. This Makefile has worked for years. Now, that I’ve added a package to one of the header files the command in the Makefile doesn’t work. I’ve made some progress but I don’t know what to do with the following error. Any ideas will be appreciated.

Command:

cd src; rootcint -f GMdict.cpp -c -p -I/d0dist/dist/releases/p17.03.02/SigEvtSys \ -I/d0dist/dist/releases/p17.03.02/itc -I/d0dist/dist/releases/p17.03.02/thread_util -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2 -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2 \ -I/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/std/ \ -I/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/ \ /d0dist/dist/releases/p17.03.02/SigEvtSys/SigEvtSys/SEClient.hpp ../gmbrowser/GMBrowser.hpp ../gmbrowser/LinkDef.h

ERROR MESSAGE

/tmp/z1nCLv_cint.cxx:1:13: C: No such file or directory Limitation: Reference member not accessible from the interpreter FILE:/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/std/typeinfo.h LINE:194 Error: class,struct,union or type __PTRDIFF_TYPE__ not defined FILE:/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include//_G_config.h LINE:21 Error: class,struct,union or type __SIZE_TYPE__ not defined FILE:/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include//_G_config.h LINE:26 Error: Redefinition of default argument FILE:/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/iostream.h LINE:128 . . . hundreds of additional error messages . . .

Does anyone know how I keep the temporary file /tmp/z1nCLv_cint.cxx:1:13 from getting automatically deleted? What is file C?

Thanks.

Could you clarify which version of ROOT you are using?
Are you really using gcc2.7 ?
Could you send the shortest possible set of files that we can use to
reproduce your problem?

Rene

The arguments:

-I/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/std/ \ -I/usr/products/gcc/v2_7_2_1_1/OSF1/lib/g++-include/ \
should not be passed to rootcint (it tell it to look at the wrong place for the standard C++ headers). It is also very likely that you should not pass this on to your compiler.

Cheers,
Philippe

Thanks for the feedback. I stupidly added those includes to fix the following problem:

Command

cd src; rootcint -f GMdict.cpp -c -p -I/d0dist/dist/releases/p17.03.02/SigEvtSys \ -I/d0dist/dist/releases/p17.03.02/itc -I/d0dist/dist/releases/p17.03.02/thread_util -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2 -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2 \ /d0dist/dist/releases/p17.03.02/SigEvtSys/SigEvtSys/SEClient.hpp ../gmbrowser/GMBrowser.hpp ../gmbrowser/LinkDef.h

Error:

In file included from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../include/c++/3.4.3/bits/postypes.h:46, from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../include/c++/3.4.3/bits/char_traits.h:47, from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../include/c++/3.4.3/ios:46, from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/streams.h:69, from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/OS.h:2910, from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/ACE.h:18, from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/Synch.h:21, from /d0dist/dist/releases/p17.03.02/thread_util/thread_util/Queue.hpp:52, from /d0dist/dist/releases/p17.03.02/SigEvtSys/SigEvtSys/SEClient.hpp:43, from /tmp/fileg7PCyV_rootcint.h:1, from /tmp/83bk52_cint.cxx:1: /d0usr/products/root/Linux-2-4/v4_00_08g_eh-GCC_3_4_2--opt/cint/include/cwchar:2:20: cwchar.h: No such file or directory

Where should cint be looking for cwchar.h?

The problem with cwchar is a problem in the CINT layer handling the iostream.
To work around the problem create a file named ios and containing:

// ios header file for CINT #include <iosfwd>
Put this header in a directory that will only be seen by rootcint (and not seen by your compiler).

Cheers,
Philippe.

What should I do with the ios file? I put it in one of the header directories but do I need to #include it?

I’m not understanding how this has any relation to the cwchar problem.

Thanks for your help.

[quote]What should I do with the ios file? I put it in one of the header directories[/quote]Put in a new directory (for example named 'for_rootcint_only) and add -I…/for_rootcint_only

No.

[quote]I’m not understanding how this has any relation to the cwchar problem. [/quote]This trick basically ask rootcint to use iosfwd instead ios for your header. This prevents the inclusion of cwchar … which is currently not properly supported.

Cheers,
Philippe.

Phillipe,

I tried to follow your instructions literally. Here’s what I got:

[code]
cd src; rootcint -f GMdict.cpp -c -p -I./for_cint_only -I/d0dist/dist/releases/p17.05.01/SigEvtSys
-I/d0dist/dist/releases/p17.05.01/itc -I/d0dist/dist/releases/p17.05.01/thread_util -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2 -I/d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2
…/gmbrowser/GMBrowser.hpp …/gmbrowser/LinkDef.h
In file included from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/…/…/…/…/include/c++/3.4.3/bits/postypes.h:46,
from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/…/…/…/…/include/c++/3.4.3/bits/char_traits.h:47,
from /d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/…/…/…/…/include/c++/3.4.3/ios:46,
from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/streams.h:69,
from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/OS.h:2910,
from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/ACE.h:18,
from /d0usr/products/ace/Linux-2/v5_1_17a_eh-gcc342/ACE_wrappers/build/Linux2.4-GCC_3_4_2/ace/Synch.h:21,
from /d0dist/dist/releases/p17.05.01/thread_util/thread_util/Queue.hpp:52,
from /d0dist/dist/releases/p17.05.01/SigEvtSys/SigEvtSys/SEClient.hpp:43,
from ./…/gmbrowser/GMBrowser.hpp:80,
from /tmp/fileMJVYOw_rootcint.h:1,
from /tmp/y84NIA_cint.cxx:1:
/d0usr/products/root/Linux-2-4/v4_02_00a_eh-GCC_3_4_3–opt/cint/include/cwchar:2:20: cwchar.h: No such file or directory

[quote]/d0usr/products/gcc/Linux-2-4/v3_4_3_dzero/lib/gcc/i686-pc-linux-gnu/3.4.3/…/…/…/…/include/c++/3.4.3/ios:46, [/quote]Strange. Did you really create a file named for_cint_only/ios ?
If you did, please let me know where (i assume on clued0) I can find your code.

Cheers,
Philippe.