Rootcint in ROOT 6.24/06

rootcling gives error and does not make output dictionary file

/usr/local/root/bin/rootcling -f MGDOToolsDICT.C.tmp -s=libMGDOTools.so -rml=libMGDOTools.so -rmf=libMGDOTools.rootmap.tmp -c -O2 -g -O2 -fPIC -g -O2 -W -Wall -DMGWF_HAS_FFTW3 -std=c++11 -I/usr/local/include/mgdo -I…/Base -I…/Root -I/usr/local/root/include -I…/Base -I…/Root -I/usr/local/root/include -pthread -std=c++11 -m64 MGUTTool.hh MGUTCopy.hh MGUTDiff.hh LinkDef.h
rootcling: for the -f option: may only occur zero or one times!
rootcling: for the -s option: may not occur within a group!
rootcling: for the -s option: may not occur within a group!
rootcling: for the -m option: may not occur within a group!

ROOT Version:
6.24/06
Platform:
GNU/linux 3.10.0-693.21.1.el7.x86_64
Compiler:
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

I might be mistaken, but can you remove the compilation flags like -fPIC, -std=c++11, and -m64 and try again?

For the most part, the only flag your should pass to rootcling/genreflex are the flag affecting the pre-processor ( -D... and -I... ) most of the other flags are either ‘irrevelant’ (no binary code is produce in that step) or pre-determined by the way rootlcing was builds (c++ standard, abi level, etc.)

i don’t understand your reply. the help says these flags are allowed.

[admin@nupacs1-phys-unm-edu Tools]$ rootcling -h
OVERVIEW: rootcling
USAGE: rootcling [options]

SUBCOMMANDS:

bare-cling - Call directly cling and exit.

Type “rootcling --help” to get more help on a specific subcommand

OPTIONS:

Generic Options:

–help - Display available options (–help-hidden for more)
–help-list - Display list of available options (–help-list-hidden for more)
–version - Display the version of this program

rootcling common options:

-D= - Specify defined macros.
-I= - Specify an include path.
-U= - Specify undefined macros.
-W= - Specify compiler diagnostics options.
-c - Deprecated, legacy flag which is ignored.
–cxxmodule - Generate a C++ module.
–excludePath= - Do not store the in the dictionary.
-f - Overwrite s.
–failOnWarnings - Fail if there are warnings.
–inlineInputHeader - Does not generate #include but expands the header content.
–interpreteronly - Generate minimal dictionary for interactivity (without IO information).
-m= - The list of dependent modules of the dictionary.
–moduleMapFile= - Specify a C++ modulemap file.
–multiDict - If this library has multiple separate LinkDef files.
–noGlobalUsingStd - Do not declare {using namespace std} in dictionary global scope.
–noIncludePaths - Do not store include paths but rely on the env variable ROOT_INCLUDE_PATH.
-p - Deprecated, legacy flag which is ignored.
–rmf= - Generate a rootmap file with the specified name.
–rml= - Generate rootmap file.
-s= - The path to the library of the built dictionary.
–selSyntaxOnly - Check the selection syntax only.
–split - Split the dictionary into two parts: one containing the IO (ClassDef)information and another the interactivity support.
–umbrellaHeader - A single header including all headers instead of specifying them on the command line.
Choose verbosity level:
-v - Show errors.
–v0 - Show only fatal errors.
–v1 - Show errors (the same as -v).
–v2 - Show warnings (default).
–v3 - Show notes.
–v4 - Show information.
[admin@nupacs1-phys-unm-edu Tools]$

furthermore, removing the rootcling flags in the command gives
[admin@nupacs1-phys-unm-edu Tools]$ /usr/local/root/bin/rootcling MGDOToolsDICT.C.tmp -c -O2 -g -O2 -fPIC -g -O2 -W -Wall -DMGWF_HAS_FFTW3 -std=c++11 -I/usr/local/include/mgdo -I…/Base -I…/Root -I/usr/local/root/include -I…/Base -I…/Root -I/usr/local/root/include -pthread -std=c++11 -m64 MGUTTool.hh MGUTCopy.hh MGUTDiff.hh LinkDef.h
rootcling: for the -s option: may not occur within a group!
rootcling: for the -s option: may not occur within a group!
rootcling: for the -m option: may not occur within a group!

You must completely remove the following flags (the rest of the original command line is fine):
-c -O2 -g -fPIC -W -Wall -std=c++11 -pthread -m64

this works. so rootcling is not parsing the command properly.

/usr/local/root/bin/rootcling MGDOToolsDICT.C.tmp -c -O2 -g -O2 -fPIC -g -O2 -I/usr/local/include/mgdo -I…/Base -I…/Root -I/usr/local/root/include -I…/Base -I…/Root -I/usr/local/root/include -pthread MGUTTool.hh MGUTCopy.hh MGUTDiff.hh LinkDef.h

and this works, so it is not the rootcling flags but the compiler flags

/usr/local/root/bin/rootcling -f MGDOToolsDICT.C.tmp -s=libMGDOTools.so -rml=libMGDOTools.so -rmf=libMGDOTools.rootmap.tmp -c -O2 -g -O2 -I/usr/local/include/mgdo -I…/Base -I…/Root -I/usr/local/root/include -I…/Base -I…/Root -I/usr/local/root/include MGUTTool.hh MGUTCopy.hh MGUTDiff.hh LinkDef.h

final comment… this seems like a bug in the 6.24 version of root cling.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.