Correct way to replace rootcint in makefile

Dear root genius :wink:

I am trying to migrate makefiles to mac and root6. It complies libraries which are loaded in root.
How to replace the rootcint command? I am not an expert…
I copied all the build/make here bellow to have an idea of what happens.
I put in bold the line to change.
Thank you
Filipe

#!/bin/csh -f

#set ROOTSYS = "/virgo/ext/root/root_v5.14.00/Linux-x86_64-SL5"
if ( $?ROOTSYS == 0 ) then
echo "ROOTSYS is undefined"
exit
endif

#------------------------------------------------------------------------------
if ( $?UNAME == 0 ) then
setenv UNAME uname
endif
if( $UNAME == “Linux” ) then
setenv UNAME uname-uname -m
endif
echo " -------> This is $UNAME <— ROOTSYS is $ROOTSYS "
mkdir …/$UNAME
cd …/$UNAME

rm -f *.o

echo “----------------------------------------Compile Fr code”

_USE_CPP11

set CXXGENFL = “-O -fPIC -fno-exceptions”

gcc $CXXGENFL -I…/src -I…/src/zlib -c …/src/FrIO.c
gcc $CXXGENFL -I…/src -I…/src/zlib -c …/src/FrameL.c
gcc $CXXGENFL -I…/src -I…/src/zlib -c …/src/FrFilter.c
gcc $CXXGENFL -I…/src -I…/src/zlib -c …/src/zlib/*.c

[b]echo "-----------------------------------------------Run CINT"
rootcint -f G_frameL.C -c -I…/src/ -D__cplusplus …/src/FrameL.h …/root/FrRootLinkDef.h

echo "------------------------------------compile CINT output"
g++ -DG__REGEXP -DG__SHAREDLIB -DG__OSFDLL $CXXGENFL -I$ROOTSYS/include -I$ROOTSYS/include/root -I…/src -c G_frameL.C

echo "----------------------------- build ROOT Shared Library"
gcc -fno-common -dynamiclib -undefined dynamic_lookup -o libFrameROOT.dylib *.o

echo "------------------------------------------------cleanup"
rm -f .o
rm -f G_frameL.

Hi,

In first approximation, it should work without change. What error are you seeing?

Cheers,
Philippe.

Hello,
Thank you for your reply:

I have these kind of errors:
In file included from G_frameL.C:14:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TClass.h:25:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TDictionary.h:45:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TNamed.h:26:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TObject.h:31:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/Rtypes.h:37:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/atomic:539:2: error:
is not implemented
#error is not implemented
^
In file included from G_frameL.C:14:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TClass.h:25:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TDictionary.h:45:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TNamed.h:26:
In file included from /Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/TObject.h:31:
/Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/Rtypes.h:217:14: error: no type named ‘atomic’ in namespace 'std’
typedef std::atomic<TClass*> atomic_TClass_ptr;
~~~~~^
/Files/CWB_osx_clang_6/ROOT/root-6.02.05/include/Rtypes.h:217:20: error: expected unqualified-id
typedef std::atomic<TClass*> atomic_TClass_ptr;

Actually, the line:
rootcint -f G_frameL.C -c -I…/src/ -D__cplusplus …/src/FrameL.h …/root/FrRootLinkDef.h
seems to work but then:
g++ -DG__REGEXP -DG__SHAREDLIB -DG__OSFDLL $CXXGENFL -I$ROOTSYS/include -I$ROOTSYS/include/root -I…/src -c G_frameL.C
gives the errors above.

There order is shown in the first post. I thought that as I have root6 I should change rootcint and make a new build to avoid these problems. What can I do?

[quote]g++ -DG__REGEXP -DG__SHAREDLIB -DG__OSFDLL $CXXGENFL -I$ROOTSYS/include -I$ROOTSYS/include/root -I…/src -c G_frameL.C [/quote]C++11 is required for ROOT v6. You need to make sure that the dictionary (and the rest of your code) is build with --std=c++11.

Cheers,
Philippe.

It works
Thank you!

But what about rootcint we keep it like that? no need to change it?

Hi,

The name ‘rootcint’ is deprecated in favor of ‘rootcling’ but can for now be used interchangeably.

Cheers,
Philippe.