[Rivet] Patch to compile on Mavericks

David Hall dhcrawley at gmail.com
Mon Nov 4 10:32:23 GMT 2013


Hi Andy,

Glad to hear you already found this. Something else was that you have hard-coded “-Wl,—no-as-needed” into the LDFLAGS of rivet-config.in when this is not recognised by the Mac linker. This should be removed by the configure step, otherwise other programs won’t be able to link to Rivet. (perhaps you found this one already too?)

Cheers,
David



On 3 Nov 2013, at 11:10, Andy Buckley <andy.buckley at cern.ch> wrote:

> Thanks David. Actually we've already applied this, but haven't made a
> patch yet. Glad you worked it out for yourself ;-) We'll try to get a
> new release out soon.
> 
> Andy
> 
> 
> On 01/11/13 21:29, David Hall wrote:
>> Hello,
>> 
>> I was trying to install Rivet 2.0 on OS X 10.9, and encountered a compilation error (Mac has only clang now, which is more fussy about C++ standards than gcc).
>> 
>> It was complaining about trying to set a const string contained in a map. This was being done in the ProjectionHandler::_clone() method. You can see that it is trying to assign _namedprojs[newproj] = nps->second;
>> Since the value of this map type is NameProjs, I looked at that class and saw that its keys are const. 
>> 
>> If I make the patch at the bottom of this email, things compile fine however. I guess you will need to look and decide if you agree with this change.
>> 
>> Cheers,
>> David
>> 
>> 
>> 
>> diff --git a/include/Rivet/ProjectionHandler.hh b/include/Rivet/ProjectionHandler.hh
>> index 2483a9a..7d42d60 100644
>> --- a/include/Rivet/ProjectionHandler.hh
>> +++ b/include/Rivet/ProjectionHandler.hh
>> @@ -49,7 +49,7 @@ namespace Rivet {
>> 
>>     /// @brief Typedef for the structure used to contain named projections for a
>>     /// particular containing Analysis or Projection.
>> -    typedef map<const string, ProjHandle> NamedProjs;
>> +    typedef map<string, ProjHandle> NamedProjs;
>> 
>>     /// Enum to specify depth of projection search.
>>     enum ProjDepth { SHALLOW, DEEP };
>> 
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> http://www.hepforge.org/lists/listinfo/rivet
>> 
> 
> 
> -- 
> Dr Andy Buckley, Royal Society University Research Fellow
> Particle Physics Expt Group, University of Glasgow / PH Dept, CERN



More information about the Rivet mailing list