Skip to content

Compiling padme fw on MacOS

Andre Frankenthal edited this page May 22, 2019 · 2 revisions

Updated instructions (May 22nd, 2019):

Now compiling for MacOS should be more straightforward, since the makefiles are integrated directly into develop (see https://github.com/PADME-Experiment/padme-fw/pull/158). To start, just git clone the PADME repository as usual:

$ git clone git@github.com:PADME-Experiment/padme-fw.git

Then check that you have ROOT installed and configured via:

$ root-config --version

I also list my version of clang, the Apple compiler that I used to build padme-fw. This should also work with gcc though, without any (major) issues.

$ clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Then you can set up and compile the padme-fw packages for Mac. This is my usual sequence of compilation:

$ cd padme-fw
$ source Configure/padme_init_mac.sh
$ cd PadmeRoot
$ make -f Makefile_mac
$ cd ../PadmeReco
$ make -f GNUmakefile_mac
$ cd ../PadmeAnalysis
$ make -f GNUmakefile_mac

After all of this you should be able to run ./PadmeAnalysis and ./PadmeReco successfully:

$ ./PadmeAnalysis
$ cd ../PadmeReco
$ ./PadmeReco

In order to clean the build in each sub-package, instead of make just run:

$ cd PadmeRoot
$ make -f Makefile_mac cleanall
$ cd ../PadmeReco
$ make -f GNUmakefile_mac cleanall
$ cd ../PadmeAnalysis
$ make -f GNUmakefile_mac cleanall

Old instructions (for legacy purposes):

To compile the padme-fw on a MacOS (I unfortunately still use 10.12, or Sierra, so keep this in mind), git clone the PADME repository as usual, and then switch branches to developMac:

$ git clone git@github.com:PADME-Experiment/padme-fw.git
$ git checkout developMac

The branch developMac has been “patched” to allow the different subsystems to compile on Mac. So far I have adapted PadmeRoot, PadmeReco, and PadmeAnalysis, though PadmeMC can follow soon if there’s interest.

The main requirement is to have ROOT 6 installed on your Mac. I have version 6.10/08. To ensure that you have ROOT properly installed and configured, on your terminal before you set up padme-fw run:

$ root-config —version

This should give you the version of ROOT installed on the machine, if it’s properly configured. Make sure it’s reasonably close to the one I have, since different versions of ROOT can bring unpleasant surprises!

I also list my version of clang, the Apple compiler that I used to build padme-fw. This should also work with gcc though, without any (major) issues.

$ clang —version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

After that you can set up padme-fw. I usually build PadmeRoot first, then PadmeReco, then PadmeAnalysis. Hopefully this sequence of commands will succeed without any errors for you (it works for me):

$ cd [----]/padme-fw
$ source Configure/padme_init.sh
$ cd PadmeRoot
$ make
$ cd ../PadmeReco
$ make
$ cd ../PadmeAnalysis
$ make

PS: [----] is where you put your padme-fw repository (for me it’s ~/PADME/padme-fw)

After all of this you should be able to run ./PadmeAnalysis and ./PadmeReco successfully:

$ ./PadmeAnalysis
$ cd ../PadmeReco
$ ./PadmeReco

In order to clean the build in each sub-package, instead of make just run:

$ make cleanall
Clone this wiki locally