Compilation error on macOS 11.3.1

Hi! I am trying to install corry on a new machine (Apple M1, macOS 11.3.1, AppleClang 12.0.5.12050022). I have root installed and working (can run the interpreter and successfully compiled other frameworks using root),

MacBook-Pro:~ aleopold$ brew info root
root: stable 6.22.08 (bottled), HEAD
Object oriented framework for large scale data analysis
https://root.cern.ch/
Conflicts with:
glew (because root ships its own copy of glew)
/opt/homebrew/Cellar/root/6.22.08_1 (5,882 files, 648.4MB) *
Poured from bottle on 2021-05-16 at 11:54:52
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/root.rb
License: LGPL-2.1-or-later
==> Dependencies
Build: cmake :heavy_check_mark:, ninja ✘
Required: cfitsio :heavy_check_mark:, davix :heavy_check_mark:, fftw :heavy_check_mark:, gcc :heavy_check_mark:, gl2ps :heavy_check_mark:, graphviz :heavy_check_mark:, gsl :heavy_check_mark:, lz4 :heavy_check_mark:, numpy :heavy_check_mark:, openssl@1.1 :heavy_check_mark:, pcre :heavy_check_mark:, python@3.9 :heavy_check_mark:, tbb :heavy_check_mark:, xrootd :heavy_check_mark:, xz :heavy_check_mark:, zstd :heavy_check_mark:
==> Options
–HEAD
Install HEAD version
==> Caveats
As of ROOT 6.22, you should not need the thisroot scripts; but if you
depend on the custom variables set by them, you can still run them:
For bash users:
. /opt/homebrew/bin/thisroot.sh
For zsh users:
pushd /opt/homebrew >/dev/null; . bin/thisroot.sh; popd >/dev/null
For csh/tcsh users:
source /opt/homebrew/bin/thisroot.csh
For fish users:
. /opt/homebrew/bin/thisroot.fish
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/root
b==> Analytics
install: 1,012 (30 days), 2,990 (90 days), 13,074 (365 days)
install-on-request: 1,000 (30 days), 2,958 (90 days), 12,659 (365 days)
build-error: 0 (30 days)

same for Eigen3

MacBook-Pro:~ aleopold$ brew info eigen
eigen: stable 3.3.9 (bottled), HEAD
C++ template library for linear algebra
https://eigen.tuxfamily.org/
Conflicts with:
freeling (because freeling ships its own copy of eigen)
/opt/homebrew/Cellar/eigen/3.3.9 (493 files, 6.6MB) *
Poured from bottle on 2021-05-16 at 16:16:39
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/eigen.rb
License: MPL-2.0
==> Dependencies
Build: cmake :heavy_check_mark:
==> Options
–HEAD
Install HEAD version
==> Analytics
install: 22,630 (30 days), 74,257 (90 days), 313,101 (365 days)
install-on-request: 2,883 (30 days), 9,364 (90 days), 40,242 (365 days)
build-error: 0 (30 days)

Now when I try to compile corry tag v2.0.1 (after running from a build directory cmake .. with no errors) I get

MacBook-Pro:build aleopold$ make install
[ 0%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/BorderedBandMatrix.cpp.o
[ 1%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/GblData.cpp.o
[ 1%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/GblPoint.cpp.o
[ 3%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/GblTrajectory.cpp.o
[ 3%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/MilleBinary.cpp.o
[ 3%] Building CXX object 3rdparty/GeneralBrokenLines/CMakeFiles/GBL.dir/src/VMatrix.cpp.o
[ 5%] Linking CXX shared library libGBL.dylib
[ 5%] Built target GBL
[ 5%] Building CXX object src/core/CMakeFiles/CorryvreckanUtilities.dir/utils/log.cpp.o
[ 5%] Building CXX object src/core/CMakeFiles/CorryvreckanUtilities.dir/utils/unit.cpp.o
[ 6%] Building CXX object src/core/CMakeFiles/CorryvreckanUtilities.dir/utils/text.cpp.o
[ 6%] Linking CXX shared library libCorryvreckanUtilities.dylib
[ 6%] Built target CorryvreckanUtilities
[ 6%] Generating CorryvreckanObjectsDictionary.cxx, libCorryvreckanObjects_rdict.pcm, libCorryvreckanObjects.rootmap
In file included from input_line_12:732:
In file included from /Users/aleopold/corryvreckan/corryvreckan/src/objects/GblTrack.hpp:14:
In file included from /Users/aleopold/corryvreckan/corryvreckan/3rdparty/GeneralBrokenLines/include/GblPoint.h:46:
In file included from /opt/homebrew/include/eigen3/Eigen/Dense:1:
In file included from /opt/homebrew/include/eigen3/Eigen/Core:235:
/opt/homebrew/Cellar/root/6.22.08_1/etc/root/cling/lib/clang/5.0.0/include/arm_neon.h:28:2: error: “NEON support not enabled”
#error “NEON support not enabled”
^
/opt/homebrew/Cellar/root/6.22.08_1/etc/root/cling/lib/clang/5.0.0/include/arm_neon.h:48:24: error: ‘neon_vector_type’ attribute is not supported for this target
typedef attribute((neon_vector_type(8))) int8_t int8x8_t;
^
/opt/homebrew/Cellar/root/6.22.08_1/etc/root/cling/lib/clang/5.0.0/include/arm_neon.h:49:24: error: ‘neon_vector_type’ attribute is not supported for this target
typedef attribute((neon_vector_type(16))) int8_t int8x16_t;
^
/opt/homebrew/Cellar/root/6.22.08_1/etc/root/cling/lib/clang/5.0.0/include/arm_neon.h:50:24: error: ‘neon_vector_type’ attribute is not supported for this target
typedef attribute((neon_vector_type(4))) int16_t int16x4_t;




/opt/homebrew/Cellar/root/6.22.08_1/etc/root/cling/lib/clang/5.0.0/include/arm_neon.h:65:24: error: ‘neon_vector_type’ attribute is not supported for this target
typedef attribute((neon_vector_type(8))) float16_t float16x8_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error: /opt/homebrew/bin/rootcling: compilation failure (/Users/aleopold/corryvreckan/corryvreckan/build/src/objects/libCorryvreckanObjects62caf6c46a_dictUmbrella.h)
make[2]: *** [src/objects/CorryvreckanObjectsDictionary.cxx] Error 1
make[1]: *** [src/objects/CMakeFiles/CorryvreckanObjects.dir/all] Error 2
make: *** [all] Error 2

I tried to google the error and tested a couple of cmake flags suggested in some threads, but nothing helped. Would be happy if anyone had a hint!

Best,
Alex

Hi Alex,
we had some issues previously with corry on Mac (Compilation on macOS does not work out of the box (#92) · Issues · Corryvreckan / Corryvreckan · GitLab). But those issues look a bit different + they were already fixed before v2.0.1.

One question, though: Did you compile ROOT yourself from source or did you install the pre-compiled binary?

Cheers, Jens

Hi Jens,

I installed root using homebrew. You think installing from source might help here?

Hi Alex,
I would give it a try - only then you can be sure that the same compiler was used for ROOT and corry.

Hi Jens,

excellent call, corry compiled successfully and 10/11 tests passed (test_io_mimosa26tel_desy_5400MeV_plane2.conf (Failed) in case you want to know), thanks a lot!

For anyone who might come across this in the near future and find this helpful, I installed root using:

git clone --branch v6-22-00-patches GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically root_src
mkdir root_build root_install && cd root_build
cmake -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src -Dimt=OFF -Dbuiltin_tbb=OFF -Dminuit2=ON
cmake --build . – install -j8

Hi Alex,
thanks for reporting - that’s great news!

The fact that the one test fails is fine - it requires a EUDAQ2 installation, which you haven’t done - and possibly don’t need - depending on what data you want to look at.

Glad I could help.

Cheers, Jens