[Rivet] ruvet and osx

Sabah Salih sabah.salih at manchester.ac.uk
Wed Jul 25 18:09:47 BST 2018


Dear James,
       Thank you so much.
    Following your advice I did the following:

 edit rivet-bootstrap

and changed

function conf { ./configure --prefix=$INSTALL_PREFIX "$@"; }
to
function conf { ./configure CC=/usr/bin/clang CXX=/usr/bin/clang++ --prefix=$INSTALL_PREFIX "$@"; }

and
./configure  --prefix=$INSTALL_PREFIX
to
./configure CC=/usr/bin/clang CXX=/usr/bin/clang++ --prefix=$INSTALL_PREFIX

When I type
./rivet-bootstrap 

I get this
  File "/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/__init__.py", line 12, in <module>
    from rivet.core import *
ImportError: dlopen(/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/core.so, 10): Library not loaded: /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/local/lib/libRivet.dylib
  Referenced from: /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/core.so
  Reason: image not found
make[1]: *** [analyses.json] Error 1
make[1]: *** Waiting for unfinished jobs....
Using output file name 'analyses.html' and directory 'analyses'
Traceback (most recent call last):
  File "mk-analysis-html", line 25, in <module>
    import rivet
  File "/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/__init__.py", line 12, in <module>
    from rivet.core import *
ImportError: dlopen(/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/core.so, 10): Library not loaded: /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/local/lib/libRivet.dylib
  Referenced from: /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/Rivet-2.6.0/pyext/build/lib.macosx-10.13-intel-2.7/rivet/core.so
  Reason: image not found
make[1]: *** [analyses.html] Error 1
make: *** [all-recursive] Error 1

ls local/lib/libRivet.dylib
ls: local/lib/libRivet.dylib: No such file or directory

Many Thanks, Sabah.


>From Sabah Salih
Particle Physics Group,
The School of Physics and Astronomy,
The University of Manchester,
Schuster Laboratory,
Brunswick Street,
Manchester M13 9PL.
Tel: +44 1612754171 or  x4171
E-mail: sabah.salih at manchester.ac.uk

________________________________________
From: James William Monk [james.william.monk at cern.ch]
Sent: 25 July 2018 13:57
To: Sabah Salih
Cc: James William Monk; Andy Buckley; rivet at projects.hepforge.org
Subject: Re: [Rivet] ruvet and osx

Hi Sabah,

No, there’s no need to cross compile here, we just need to make sure it uses compilers and libs all from the same toolchain and doesn’t mix and match system tools with homebrew tools.  For example, to try to use the system compiler you could try something like configuring Rivet and its dependencies with the extra config option

        ./configure <usual config options> CC=/usr/bin/clang CXX=/usr/bin/clang++

It looks like you prefer to use homebrew’s tools though.  I don’t know where they are located on your system, but the equivalent configure command would be

        ./configure <usual config opts> CC=/path/to/brew/gcc CXX=/path/to/brew/g++

where you fill in the paths to the brew installation versions of gcc and g++.  Of course, any Rivet dependencies (FastJet, GSL, HepMC...) will also need to be configured in the same way first.

If you just want to run Rivet, as opposed to develop for it, I’d also suggest taking a look at the Docker distribution for mac:

        https://rivet.hepforge.org/trac/wiki/Docker

cheers,

James


> On 25 Jul 2018, at 08:37, Sabah Salih <sabah.salih at manchester.ac.uk> wrote:
>
> Dear James,
>         It is so nice to hear from you.
> Thank you so much for your kind reply.
>
> I just done
>
> brew tap osx-cross/arm
> brew tap osx-cross/avr
>
> brew install arm-gcc-bin
>
> brew install avr-gcc
> This look like installing gcc8
>
> Is this what you meant?
>
>   Many Tanks, Sabah.
>
> From Sabah Salih
> Particle Physics Group,
> The School of Physics and Astronomy,
> The University of Manchester,
> Schuster Laboratory,
> Brunswick Street,
> Manchester M13 9PL.
> Tel: +44 1612754171 or  x4171
> E-mail: sabah.salih at manchester.ac.uk
>
> ________________________________________
> From: James William Monk [james.william.monk at cern.ch]
> Sent: 25 July 2018 01:10
> To: Andy Buckley; Sabah Salih
> Cc: rivet at projects.hepforge.org
> Subject: Re: [Rivet] ruvet and osx
>
> Hi,
>
> From a bit of nurdling about on various fora, that error appears to refer to an option that is present for clang, but not gcc.  Clang is the supplied default on mac.  You have installed a separate gcc toolchain via homebrew.  What I can imagine may be happening is that autotools is detecting the system clang and adding options appropriately, but then the g++ command is now calling the gcc from homebrew.  For example, on my own mac I see
>
>        g++ --version
>        Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
>        Apple LLVM version 9.1.0 (clang-902.0.39.2)
>        Target: x86_64-apple-darwin17.7.0
>
> It’s possible you may be able to cure this with some appropriate environment settings like
>
>        export CC=/usr/bin/clang
>        export CXX=/usr/bin/clang++
>
> Which would try to force it to use the system clang compiler consistently.  Alternatively, try to point it to your homebrew compiler location.  You may also like to consider removing homebrew as another solution - I don’t know what else it adds for you, but personally I have never found those kinds of packaging systems helpful on a mac precisely because they bring a second toolchain into play that is not always entirely consistent with the system toolchain.
>
> cheers,
>
> James
>
>
>
>> On 25 Jul 2018, at 00:48, Andy Buckley <andy.buckley at cern.ch> wrote:
>>
>> I'm afraid I don't use Macs, so am not sure what is best. Using an earlier compiler might work; I'm a little surprised that autoreconf did not help. Hopefully someone else on the Rivet team has a bit more Mac experience and can help out.
>>
>> Andy
>>
>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>> Particle Physics Experiment Group, University of Glasgow
>> On Jul 24 2018, at 4:52 pm, Sabah Salih <sabah.salih at manchester.ac.uk> wrote:
>>
>>
>> Dear Andy,
>>          Thank you ever so much. The problem look like it is in YODA.
>> I did
>>
>> cd YODA-1.7.0
>>
>> autoreconf -i
>> make
>>
>> that did not fix it
>>
>> cd ..
>> this is where rivet-bootstrap
>>
>> and rerun
>>
>> ./rivet-bootstrap
>>
>> This did not fix it neither.
>>
>> What is the best way to get rivet to work in a mac please.?
>> It does not have to be gcc8
>>
>> Many thanks, Sabah
>>
>>
>> From Sabah Salih
>> Particle Physics Group,
>> The School of Physics and Astronomy,
>> The University of Manchester,
>> Schuster Laboratory,
>> Brunswick Street,
>> Manchester M13 9PL.
>> Tel: +44 1612754171 or  x4171
>> E-mail: sabah.salih at manchester.ac.uk
>> From: Andy Buckley [andy.buckley at cern.ch]
>> Sent: 19 July 2018 14:41
>> To: Sabah Salih
>> Cc: rivet at projects.hepforge.org
>> Subject: Re: [Rivet] ruvet and osx
>>
>> Hi Sabah,
>> I have no idea about compilation with GCC 8 -- it looks like our "autotools" build system assumes that a compiler flag will work, but GCC 8 has removed it. I suspect that new versions of autotools would fix it, but of course our existing tarball is built with an older version.
>>
>> You could try building the (final) Rivet step by hand, first rebuilding the autotools bits with a call to "autoreconf -i". It may even be possible to re-run the bootstrap script after doing that, and let it finish the build with the updated Makefiles.
>>
>> Andy
>>
>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>> Particle Physics Experiment Group, University of Glasgow
>> On Jul 19 2018, at 9:15 am, Sabah Salih <sabah.salih at manchester.ac.uk> wrote:
>>
>>
>> Dear All,
>>       I am trying to install rivet in a max osx 10.13.6
>> I have
>>
>> gcc --version
>> gcc (Homebrew GCC 8.1.0) 8.1.0
>> Copyright (C) 2018 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> gfortran --version
>> GNU Fortran (Homebrew GCC 8.1.0) 8.1.0
>> Copyright (C) 2018 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> g++ --version
>> g++ (Homebrew GCC 8.1.0) 8.1.0
>> Copyright (C) 2018 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>>
>> I got rivet from the following url
>>
>> wget http://rivet.hepforge.org/hg/bootstrap/raw-file/2.6.0/rivet-bootstrap
>> chmod +x rivet-bootstrap
>>
>> After I run the following
>> ./rivet-bootstrap
>>
>> I get the following in the end
>>
>>
>> g++ -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -DNDEBUG -I/usr/include -I/usr/include -pipe -I/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/include -I/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/include -I/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/pyext/yoda -I/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/pyext/yoda -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/pyext/yoda/util.cpp -o /Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/pyext/build/temp.macosx-10.13-intel-2.7/Users/admin/madgraph/MG5_aMC_v2_6_3/rivet/YODA-1.7.0/pyext/yoda/util.o -O3 -Wno-unused-but-set-variable -Wno-sign-compare
>> g++: error: unrecognized command line option '-Wshorten-64-to-32'
>> error: command 'g++' failed with exit status 1
>> make[2]: *** [all-local] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all-recursive] Error 1
>>
>>
>> What do I have to do to fix it please?
>>
>>
>>  Maany Thanks, Sabah.
>>
>> From Sabah Salih
>> Particle Physics Group,
>> The School of Physics and Astronomy,
>> The University of Manchester,
>> Schuster Laboratory,
>> Brunswick Street,
>> Manchester M13 9PL.
>> Tel: +44 1612754171 or  x4171
>> E-mail: sabah.salih at manchester.ac.uk
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
>
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> https://www.hepforge.org/lists/listinfo/rivet



More information about the Rivet mailing list