[Rivet] Rivet on MAC

Andy Buckley andy.buckley at ed.ac.uk
Mon Feb 6 10:21:24 GMT 2012


Hi Juergen,

We've been trying to look into this but suspect that it's a result of a 
compiler change in OS X 10.7 to the LLVM/clang suite. My attempts to use 
clang on Linux were rather abortive in the past, since it borked on the 
C++ std libraries, and none of us have an OS X Lion system to test on. 
Sorry, we'll try to get it sorted... any more info that you happen to 
have would be very useful: we try to support Macs, but can't do so as 
robustly as for Linux, especially since they keep changing things!

Andy


On 15/01/12 21:40, Juergen Reuter wrote:
> Hi David,
> I think you already have some tickets concerning Rivet under MAC OS X,
> but nevertheless I summarize
> my problems here:
> *****
> 1) even when configured with --without-yaml_cpp, as soon as the yaml_cpp
> lib and headers are installed,
> I get this error in AnalysisInfo. Uninstalling yaml_cpp (v0.2.6) solves
> the problem.
> CXX libRivetCore_la-AnalysisInfo.lo
> AnalysisInfo.cc: In static member function ‘static Rivet::AnalysisInfo*
> Rivet::AnalysisInfo::make(const string&)’:
> AnalysisInfo.cc:67:28: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:67:41: error: ‘CT_SCALAR’ is not a member of ‘YAML’
> AnalysisInfo.cc:68:28: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:68:41: error: ‘CT_SCALAR’ is not a member of ‘YAML’
> AnalysisInfo.cc:77:25: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:77:38: error: ‘CT_SCALAR’ is not a member of ‘YAML’
> AnalysisInfo.cc:78:25: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:78:38: error: ‘CT_SCALAR’ is not a member of ‘YAML’
> AnalysisInfo.cc:94:21: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:94:34: error: ‘CT_SCALAR’ is not a member of ‘YAML’
> AnalysisInfo.cc:99:28: error: ‘const class YAML::Node’ has no member
> named ‘GetType’
> AnalysisInfo.cc:99:41: error: ‘CT_SEQUENCE’ is not a member of ‘YAML’
> ../../include/Rivet/Math/MathHeader.hh: At global scope:
> ../../include/Rivet/Math/MathHeader.hh:42:16: warning: ‘Rivet::MAXINT’
> defined but not used [-Wunused-variable]
> *****
> 2) When compiling the OPAL2004 Analysis I get the following error:
> CXX OPAL_2004_S6132243.lo
> OPAL_2004_S6132243.cc: In member function ‘virtual void
> Rivet::OPAL_2004_S6132243::analyze(const Rivet::Event&)’:
> OPAL_2004_S6132243.cc:167:25: error: ‘isnan’ was not declared in this scope
> OPAL_2004_S6132243.cc:167:25: note: suggested alternatives:
> /usr/local/lib/gcc/x86_64-apple-darwin11.2.0/4.6.2/../../../../include/c++/4.6.2/cmath:768:5:
> note: ‘std::isnan’
> /opt/local/include/boost/math/special_functions/fpclassify.hpp:515:25:
> note: ‘boost::math::isnan’
> ../../include/Rivet/Math/MathHeader.hh: At global scope:
> ../../include/Rivet/Math/MathHeader.hh:42:16: warning: ‘Rivet::MAXINT’
> defined but not used [-Wunused-variable]
>
> There is still a TODO in your code ;) but commenting out the isnan catch
> solves the problem.
> This is funny because the file cmath which contains the isnan is
> identical to the one on a Linux machine (same gcc) where
> I do not have a problem.
> *****
> 3) Next thing is that Rivet tries to compile itself in the (almost)
> final step with clang(++) under MAC which utterly
> (cf. extra file attached). This seems to be hard-coded. If I set a sym
> link forcing clang to be gcc and clang++ to be
> g++ it works.
> *****
> 4) There is also a problem in doc:
> LD_LIBRARY_PATH=../src/.libs:/usr/local/lib:/usr/local/lib: \
> DYLD_LIBRARY_PATH=../src/.libs:/usr/local/lib:/usr/local/lib: \
> RIVET_INFO_PATH=../data/anainfo \
> /opt/local/bin/python mk-analysis-latex
> Traceback (most recent call last):
> File "mk-analysis-latex", line 43, in <module>
> import rivet
> File
> "/usr/local/packages/Rivet-1.7.0/pyext/build/lib.macosx-10.7-x86_64-2.7/rivet/__init__.py",
> line 16, in <module>
> from rivetwrap import *
> File
> "/usr/local/packages/Rivet-1.7.0/pyext/build/lib.macosx-10.7-x86_64-2.7/rivet/rivetwrap.py",
> line 26, in <module>
> _rivetwrap = swig_import_helper()
> File
> "/usr/local/packages/Rivet-1.7.0/pyext/build/lib.macosx-10.7-x86_64-2.7/rivet/rivetwrap.py",
> line 22, in swig_import_helper
> _mod = imp.load_module('_rivetwrap', fp, pathname, description)
> ImportError:
> dlopen(/usr/local/packages/Rivet-1.7.0/pyext/build/lib.macosx-10.7-x86_64-2.7/rivet/_rivetwrap.so,
> 10): Library not loaded: /usr/local/lib/libyaml-cpp.0.dylib
> Referenced from:
> /usr/local/packages/Rivet-1.7.0/src/.libs/libRivet.10.dylib
> Reason: image not found
>
> Due to some reason, Rivet/dlopen believes to depend on some libraries in
> /usr/local which do not exist!? This only happens for
> libyaml_cpp. Problem here is that the package to be installed on MAC OS
> X Lion only contains the static build, but Rivet demands
> for the dynamic build. I solved the problem by manually copying
> src/Tools/yaml-cpp/.libs/libyaml-cpp.0.dylib to $(prefix)/lib.
>
> Then Rivet compiled (!).
> But running it immediatly gave a Python runtime error, I'm using Python
> 2.7. :(((
> I attached the crash report.
> So I guess, it runs on Scientific Linux, but on my laptop is not usable.
> Cheers,
> JRR
>


-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the Rivet mailing list