[Rivet] minor patch for Rivet for gcc45/c++0x

Hendrik Hoeth hendrik.hoeth at cern.ch
Fri Feb 11 12:58:41 GMT 2011


Thus spake Peter Elmer (Peter.Elmer at cern.ch):

> It is a .hh file. The compilation error came out when we included that 
> header in our own code. Perhaps it is never included and compiled inside
> of Rivet itself?

It's used in several places. Let's look at one of them: src/Core/Event.cc
This includes BeamConstraint.hh which includes ParticleName.hh. The
function you are "fixing" is used in Event.cc:

  const PdgIdPair beamids = make_pdgid_pair(bps.first->pdg_id(), bps.second->pdg_id());

And it compiles:

[...]/src/Core $ touch Event.cc 
[...]/src/Core $ make CXX="g++ -std=c++0x" V=1
/bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -std=c++0x -DHAVE_CONFIG_H -I. -I../../include/Rivet/Config  -I../../include -I../../include -I/usr/include -I/usr/include  -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include  -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include   -pedantic  -ansi  -Wall  -Wno-long-long  -m64 -march=native -O2 -g -pipe -MT libRivetCore_la-Event.lo -MD -MP -MF .deps/libRivetCore_la-Event.Tpo -c -o libRivetCore_la-Event.lo `test -f 'Event.cc' || echo './'`Event.cc
libtool: compile:  g++ -std=c++0x -DHAVE_CONFIG_H -I. -I../../include/Rivet/Config -I../../include -I../../include -I/usr/include -I/usr/include -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include -I/home/hoeth/Dokumente/MCnet/rivet/installation/local/include -pedantic -ansi -Wall -Wno-long-long -m64 -march=native -O2 -g -pipe -MT libRivetCore_la-Event.lo -MD -MP -MF .deps/libRivetCore_la-Event.Tpo -c Event.cc  -fPIC -DPIC -o .libs/libRivetCore_la-Event.o
mv -f .deps/libRivetCore_la-Event.Tpo .deps/libRivetCore_la-Event.Plo
/bin/sh ../../libtool  --tag=CXX   --mode=link g++ -std=c++0x -pedantic  -ansi  -Wall  -Wno-long-long  -m64 -march=native -O2 -g -pipe   -o libRivetCore.la  libRivetCore_la-Event.lo libRivetCore_la-Jet.lo libRivetCore_la-Particle.lo libRivetCore_la-ParticleName.lo libRivetCore_la-ProjectionApplier.lo libRivetCore_la-Projection.lo libRivetCore_la-Analysis.lo libRivetCore_la-AnalysisLoader.lo libRivetCore_la-AnalysisInfo.lo libRivetCore_la-AnalysisHandler.lo libRivetCore_la-Run.lo libRivetCore_la-ProjectionHandler.lo libRivetCore_la-HistoHandler.lo  
libtool: link: rm -fr  .libs/libRivetCore.a .libs/libRivetCore.la
libtool: link: ar cru .libs/libRivetCore.a .libs/libRivetCore_la-Event.o .libs/libRivetCore_la-Jet.o .libs/libRivetCore_la-Particle.o .libs/libRivetCore_la-ParticleName.o .libs/libRivetCore_la-ProjectionApplier.o .libs/libRivetCore_la-Projection.o .libs/libRivetCore_la-Analysis.o .libs/libRivetCore_la-AnalysisLoader.o .libs/libRivetCore_la-AnalysisInfo.o .libs/libRivetCore_la-AnalysisHandler.o .libs/libRivetCore_la-Run.o .libs/libRivetCore_la-ProjectionHandler.o .libs/libRivetCore_la-HistoHandler.o 
libtool: link: ranlib .libs/libRivetCore.a
libtool: link: ( cd ".libs" && rm -f "libRivetCore.la" && ln -s "../libRivetCore.la" "libRivetCore.la" )
[...]/src/Core $ 

If the error only shows up in your code, maybe the error is in your code?

Cheers,

    Hendrik

-- 
It pays to be obvious, especially if you have
a reputation for subtlety.    -- Isaac Asimov


More information about the Rivet mailing list