invalid argument '-std=c++11' not allowed with 'C/ObjC'
Dear authors
I am trying to install Exrootanalysis on Maverick 1.9.3 but it returns the error
>> Compiling tcl/tclObj.c
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
make: *** [tmp/tcl/tclObj.o] Error 1
I have installed Root from MacPorts "root5"
Could you please help me to fix it?
Thank you Patricia
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- Pavel Demin Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
This kind of message indicates that there is a problem with your XCode and ROOT installation.
This problem is discussed on the ROOT forum:
http://
The solution is to
- upgrade to the latest Xcode
- install the latest command line tools
- built the latest ROOT from sources
- point all the environment variables to the correct compiler installation
- point all the environment variables to the correct ROOT installation directory
Recently, I've tested this solution myself.
Here is what I've done to correctly build ROOT and Delphes under Mac OS X 10.9:
- removed old MacPorts - https:/
- installed XCode 5.1 - https:/
- installed XCode command line tools - "xcode-select --install"
- installed XQuartz 2.7.5 - https:/
- installed MacPorts 2.2.1 - http://
- installed ROOT 5.34.18 using the following commands:
{{{
version=5.34.18
export ROOTSYS=
curl -O ftp://root.
tar zxf root_v$
cd root
./configure macosx --enable-gdml --enable-minuit2 --enable-roofit --enable-table --enable-unuran --disable-cocoa
make -j 4
make install
}}}
- installed Delphes using the following commands:
{{{
# setup ROOT environment variables
export ROOTSYS=
export PATH=$ROOTSYS/
export PYTHONPATH=
export DYLD_LIBRARY_
wget http://
tar -zxf Delphes-
cd Delphes-3.1.2
make -j 4
}}}
Revision history for this message
|
#2 |
Thank you Pavel
but now I have problems with Root compilation
clang++ -O2 -m32 -pipe -Wshadow -W -Wall -Woverloaded-
-fno-common -Iinclude -DR__HAVE_CONFIG -D__DARWIN_UNIX03=1 -pthread
-I/opt/
-I/usr/X11/include -Wno-deprecated
graf3d/
/Users/
/Users/
undeclared identifier 'FTGlyph'
FTGlyph::FTGlyph( FT_GlyphSlot glyph, bool useList)
^
/Users/
undeclared identifier 'FTGlyph'
FTGlyph::~FTGlyph()
^
/Users/
class name after '~' to
name a destructor
FTGlyph::~FTGlyph()
^
3 errors generated.
2014-05-24 17:51 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Status: Open => Answered
>
> Pavel Demin proposed the following answer:
> This kind of message indicates that there is a problem with your XCode
> and ROOT installation.
>
> This problem is discussed on the ROOT forum:
>
> http://
>
> The solution is to
> - upgrade to the latest Xcode
> - install the latest command line tools
> - built the latest ROOT from sources
> - point all the environment variables to the correct compiler installation
> - point all the environment variables to the correct ROOT installation
> directory
>
> Recently, I've tested this solution myself.
>
> Here is what I've done to correctly build ROOT and Delphes under Mac OS
> X 10.9:
>
> - removed old MacPorts -
> https:/
>
> - installed XCode 5.1 - https:/
> - installed XCode command line tools - "xcode-select --install"
>
> - installed XQuartz 2.7.5 - https:/
>
> - installed MacPorts 2.2.1 - http://
>
> - installed ROOT 5.34.18 using the following commands:
> {{{
> version=5.34.18
> export ROOTSYS=
>
> curl -O ftp://root.
> tar zxf root_v$
>
> cd root
>
> ./configure macosx --enable-gdml --enable-minuit2 --enable-roofit
> --enable-table --enable-unuran --disable-cocoa
>
> make -j 4
> make install
> }}}
>
> - installed Delphes using the following commands:
> {{{
> # setup ROOT environment variables
> export ROOTSYS=
> export PATH=$ROOTSYS/
> export PYTHONPATH=
> export DYLD_LIBRARY_
>
> wget http://
> tar -zxf Delphes-
>
> cd Delphes-3.1.2
> make -j 4
> }}}
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#3 |
Sorry, I don't know how to help you with this problem. May be you can try to contact ROOT support with this problem.
Were you following the steps that I posted earlier?
Revision history for this message
|
#4 |
yes I were. Thank you. Regards Patricia
2014-05-24 20:21 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin requested more information:
> Sorry, I don't know how to help you with this problem. May be you can
> try to contact ROOT support with this problem.
>
> Were you following the steps that I posted earlier?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#5 |
Patricia, you have already installed the root package? If the answ is yes then try to do the following;
First on the root folder make ..... root$ . bin/thisroot.sh
after of that go to the MG5 folder.....mg5> install ExRootAnalysis
In my case the above worked, but remember first compiling the "root" package.
Best
Revision history for this message
|
#6 |
Hi Daniel, I could not install either Root or ExRootAnalysis yet in my Mac. The same errors persists. The emergency solution was to install a Virtual Machine wih Ubuntu. There works fine.
If you have any news about it please let me know.
Cheers Patricia
Revision history for this message
|
#7 |
Dear authors
still trying to solve Exrootanalysis at Mac OS 10.9 (Maverick)
I have installed the new Root6 through mcports but I still receive the same error msg
>> Compiling tcl/tclObj.c
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
make: *** [tmp/tcl/tclObj.o] Error 1
Moreover, in my .bash_profile I have
export ROOTSYS=
export PATH=$PATH:
export LD_LIBRARY_
export DYLD_LIBRARY_
Would you have any new abour this issue?
Regards Patricia
Revision history for this message
|
#8 |
Hi Patricia,
Just a comment.
The problem is not with ROOT installation but with the C++ installation.
Could you, please try to check what compiler is used when you're building ExRootAnalysis and that the path to this compiler corresponds to the path where the latest Xcode is installed on your system?
Cheers,
Pavel
Revision history for this message
|
#9 |
Hi Pavel than you very much.
According Makefile
ifeq ($(ARCH),macosx64)
UNDEFOPT = dynamic_lookup
endif
SrcSuf = cc
CXXFLAGS += $(ROOTCFLAGS) -DDROP_CGAL -I. -Itcl -Imcfio -Istdhep -ICDFCones
-ICDFCones/CDFcode
LIBS = $(ROOTLIBS) $(SYSLIBS)
GLIBS = $(ROOTGLIBS) $(SYSLIBS)
it seems the compiler is "cc" and
pb-d-128-
lrwxr-xr-x 1 root wheel 5 Feb 18 06:50 /usr/bin/cc@ -> clang
I have Xcode installed but, since I am new at MAC OS X, I am not sure how
to identify if it corresponds to your request. Could you please guide me on
it?
Cheers Patricia
2014-07-08 13:32 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> Hi Patricia,
>
> Just a comment.
>
> The problem is not with ROOT installation but with the C++ installation.
>
> Could you, please try to check what compiler is used when you're
> building ExRootAnalysis and that the path to this compiler corresponds
> to the path where the latest Xcode is installed on your system?
>
> Cheers,
>
> Pavel
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#10 |
I've just looked through Makefile and got another idea.
Could you, please try to replace "gcc" with "$(CC)" at lines 946 and 951 in Makefile?
After the modification, the lines should look like the following:
@$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
Revision history for this message
|
#11 |
Hi Pavel
if you have meant these ones
$(TCL_OBJ): ....
@$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
$(STDHEP_OBJ):...
@$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
it didn`t work
Cheers Patricia
2014-07-08 14:31 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> I've just looked through Makefile and got another idea.
>
> Could you, please try to replace "gcc" with "$(CC)" at lines 946 and 951
> in Makefile?
>
> After the modification, the lines should look like the following:
>
> @$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#12 |
Yes, the lines are correct. Thanks for trying.
Could you try to remove the '@' character in front of the '@$(CC) $(CXXFLAGS)' lines and rerun 'make'? This will show the full command line used for compilation together with the command for compiler.
According to
http://
the command to find Xcode installation path is
/System/
Could you, please send me the output of this command and one full compilation command when running make without the '@' character?
Revision history for this message
|
#13 |
Hi Patricia,
I think that I'm understand now why I can't reproduce this problem.
From what I've found about the C++11 and ROOT on the ROOT's forum:
http://
I'd say that MacPorts builds ROOT with the '--enable-cxx11' flag.
When I build ROOT, I don't use this flag.
When ROOT is built with the '--enable-cxx11' flag, the '-std=c++11' flag appears in the output of the 'root-config --cflags' and thus in the CXXFLAGS variable.
I can propose the following solution/
Could you try to replace the lines 946 and 951 in Makefile that normally look like
@$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
with the following expression
@$(CC) $(patsubst -std=%,
Cheers,
Pavel
Revision history for this message
|
#14 |
Dear Pavel,
thank you very much.
Could you please point me not the line but the whole "block" that I have to
change? My line 946 has $(STDHEP_
and the line
951 has $(STDHEP_
$(TCL_OBJ) $(STDHEP_OBJ)
So it seems that they don`t match your Makefile structure.
Thank you.
Kind regards Patricia
2014-08-21 22:22 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin proposed the following answer:
> Hi Patricia,
>
> I think that I'm understand now why I can't reproduce this problem.
>
> From what I've found about the C++11 and ROOT on the ROOT's forum:
>
> http://
>
> I'd say that MacPorts builds ROOT with the '--enable-cxx11' flag.
>
> When I build ROOT, I don't use this flag.
>
> When ROOT is built with the '--enable-cxx11' flag, the '-std=c++11' flag
> appears in the output of the 'root-config --cflags' and thus in the
> CXXFLAGS variable.
>
> I can propose the following solution/
>
> Could you try to replace the lines 946 and 951 in Makefile that normally
> look like
>
> @$(CC) $(CXXFLAGS) -c $< $(OutPutOpt)$@
>
> with the following expression
>
> @$(CC) $(patsubst -std=%,
>
> Cheers,
>
> Pavel
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#15 |
The lines to be modified look like the following
$(TCL_OBJ):....
@gcc $(CXXFLAGS) -c $< $(OutPutOpt)$@
$(STDHEP_OBJ):...
@gcc $(CXXFLAGS) -c $< $(OutPutOpt)$@
Revision history for this message
|
#16 |
Hi Pavel
thank you but, even after compiling in a new directory to avoid previous
mistakes after making the suggested changes, unfortunately I still receive
the msg
>> Compiling tcl/tclObj.c
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
make: *** [tmp/tcl/tclObj.o] Error 1
It is really strange.
Cheers Patricia
2014-08-22 8:31 GMT+02:00 Pavel Demin <email address hidden>
:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin proposed the following answer:
> The lines to be modified look like the following
>
> $(TCL_OBJ):....
> @gcc $(CXXFLAGS) -c $< $(OutPutOpt)$@
>
> $(STDHEP_OBJ):...
> @gcc $(CXXFLAGS) -c $< $(OutPutOpt)$@
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#17 |
Hi Patrice,
Could you try to remove the '@' character in the beginning of the two modified lines and then rerun make?
After this modification the 2 lines should look like
$(CC) $(patsubst -std=%,
This will allow us to see the 'gcc ...' command that make generates.
Please send me the output of make after this modification.
Regards,
Pavel
Revision history for this message
|
#18 |
ok take a look
Patricias-
Unknown argument "--dicttype"!
Usage: root-config [--prefix[=DIR]] [--exec-
[--cflags] [--auxcflags] [--ldflags] [--new] [--nonew] [--libs] [--glibs]
[--evelibs] [--bindir] [--libdir] [--incdir] [--etcdir] [--noauxcflags]
[--noauxlibs] [--noldflags] [--has-<feature>] [--arch] [--platform]
[--config] [--features] [--ncpu] [--svn-revision] [--python-version] [--cc]
[--cxx] [--f77] [--ld ] [--help]
>> Compiling tcl/tclObj.c
clang -O2 -pipe -Wall -W -Woverloaded-
-m64 -I/opt/
-I/opt/
-Istdhep -ICDFCones -ICDFCones/CDFcode -c tcl/tclObj.c -o tmp/tcl/tclObj.o
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
make: *** [tmp/tcl/tclObj.o] Error 1
2014-08-22 10:51 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> Hi Patrice,
>
> Could you try to remove the '@' character in the beginning of the two
> modified lines and then rerun make?
>
> After this modification the 2 lines should look like
>
> $(CC) $(patsubst -std=%,
>
> This will allow us to see the 'gcc ...' command that make generates.
>
> Please send me the output of make after this modification.
>
> Regards,
>
> Pavel
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#20 |
The '@$(CC) $(patsubst -std=%,
I've just committed this modification to the MGTools repository and asked Olivier to make a new release.
Revision history for this message
|
#21 |
Hi Patricia,
I've just prepared a new version of ExRootAnalysis that addresses all the problems that you discovered. I've also removed all the unneeded code and replaced the LHEF and STDHEP libraries with code from Delphes. This version reads STDHEP files much faster and it should be able to read LHEF v3 files.
It can be downloaded from
http://
Could you give it a try?
Cheers,
Pavel
Revision history for this message
|
#22 |
Of course Pavel. I am very glad to try it :-D
Cheers, Patricia.
2014-09-04 15:59 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> Hi Patricia,
>
> I've just prepared a new version of ExRootAnalysis that addresses all
> the problems that you discovered. I've also removed all the unneeded
> code and replaced the LHEF and STDHEP libraries with code from Delphes.
> This version reads STDHEP files much faster and it should be able to
> read LHEF v3 files.
>
> It can be downloaded from
>
> http://
>
> Could you give it a try?
>
> Cheers,
>
> Pavel
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#23 |
Dear Pavel,
I have tested the MG5 with the released version of ExRoot here in my Mac
Maverick 10.9.4, with Root6.
It is working perfectly with PGS. :-D
Delphes cannot be compiled though, with the following error
In file included from interface/
./Utilities/
conversion from 'basic_
std:
return ( std::getline(file, currentLine) );
28 warnings and 1 error generated.
make: *** [tmp/src/
Cheers Patricia
2014-09-04 16:29 GMT+02:00 Patricia Rebello Teles <
<email address hidden>>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Patricia Rebello Teles proposed the following answer:
> Of course Pavel. I am very glad to try it :-D
>
> Cheers, Patricia.
>
>
> 2014-09-04 15:59 GMT+02:00 Pavel Demin <
> <email address hidden>
> >:
>
> > Your question #249217 on MadGraph5_aMC@NLO changed:
> > https:/
> >
> > Pavel Demin posted a new comment:
> > Hi Patricia,
> >
> > I've just prepared a new version of ExRootAnalysis that addresses all
> > the problems that you discovered. I've also removed all the unneeded
> > code and replaced the LHEF and STDHEP libraries with code from Delphes.
> > This version reads STDHEP files much faster and it should be able to
> > read LHEF v3 files.
> >
> > It can be downloaded from
> >
> > http://
> >
> > Could you give it a try?
> >
> > Cheers,
> >
> > Pavel
> >
> > --
> > You received this question notification because you asked the question.
> >
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
Revision history for this message
|
#24 |
Dear Patricia,
It seems that you are trying to use Delphes v2. This version of Delphes is not supported anymore.
I'd suggest to use Delphes v3 that is currenly the default Delphes version in MadGraph5.
However, the current Delphes v3 version won't work out of the box on your system (Mac OS X 10.9 with ROOT 6). I've just finished to adapt Delphes v3 to ROOT 6 and I expect to make a new Delphes v3 release in a couple of weeks.
You can download a snapshot of the Delphes v3 code repository from
https:/
This snapshot should work fine on your system.
Cheers,
Pavel
Revision history for this message
|
#25 |
Perfect Pavel. It compiles and works. :-D
Nevertheless, although for PGS I can see the plots (that default ones
generated with topdrawer), in the case of Delphes the .top file is not fill
(although the plot_card.dat is present). No error msg.
Any missing detail for plotting the Delphes results like the PGS ones?
Cheers Patricia
2014-09-05 8:23 GMT+02:00 Pavel Demin <email address hidden>
:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> Dear Patricia,
>
> It seems that you are trying to use Delphes v2. This version of Delphes
> is not supported anymore.
>
> I'd suggest to use Delphes v3 that is currenly the default Delphes
> version in MadGraph5.
>
> However, the current Delphes v3 version won't work out of the box on
> your system (Mac OS X 10.9 with ROOT 6). I've just finished to adapt
> Delphes v3 to ROOT 6 and I expect to make a new Delphes v3 release in a
> couple of weeks.
>
> You can download a snapshot of the Delphes v3 code repository from
>
> https:/
>
> This snapshot should work fine on your system.
>
> Cheers,
>
> Pavel
>
> --
> You received this question notification because you asked the question.
>
Revision history for this message
|
#26 |
Dear Patricia,
I'd say that MadGraph5 does not attempt to produce any plots from the Delphes output.
I'm not sure whether it would work and whether it's a good idea but you could try to convert .root file to .lhco file using root2lhco program provided with Delphes. Then you could try to use MadAnalysis (provided with MadGraph5) to produce the same set of plots that you obtain for PGS.
However, we expect the Delphes users to write their own macros/programs to analyze Delphes output as, for example, described in
https:/
Other possibilities also exist to (semi-)
- DelphesAnalsysis
https:/
- MadAnalysis5
https:/
I would be interested to know which one of these methods you prefer.
Regards,
Pavel
Revision history for this message
|
#27 |
Dear Pavel,
it is indeed very interesting and new for me. I have just known the
MadAnalysis5.
I will take a look on them more carefully. The Delphes`s root file is ok,
no worries.
Kind regards Patricia
2014-09-05 17:03 GMT+02:00 Pavel Demin <<email address hidden>
>:
> Your question #249217 on MadGraph5_aMC@NLO changed:
> https:/
>
> Pavel Demin posted a new comment:
> Dear Patricia,
>
> I'd say that MadGraph5 does not attempt to produce any plots from the
> Delphes output.
>
> I'm not sure whether it would work and whether it's a good idea but you
> could try to convert .root file to .lhco file using root2lhco program
> provided with Delphes. Then you could try to use MadAnalysis (provided
> with MadGraph5) to produce the same set of plots that you obtain for
> PGS.
>
> However, we expect the Delphes users to write their own macros/programs
> to analyze Delphes output as, for example, described in
>
> https:/
>
> Other possibilities also exist to (semi-)
> set of plots:
>
> - DelphesAnalsysis
>
> https:/
>
> - MadAnalysis5
>
> https:/
>
> I would be interested to know which one of these methods you prefer.
>
> Regards,
>
> Pavel
>
> --
> You received this question notification because you asked the question.
>
Can you help with this problem?
Provide an answer of your own, or ask Patricia Rebello Teles for more information if necessary.