An error occurred during the installation of garfield++ on mac M1

First time installing Garfield++for learning. Previously, gsl and cmake were installed through brew install, xcode14 was installed in the app store, and root6.28.04 was also installed. But I am currently unable to handle the following error.
In file included from /Users/dengyubin/root/root-6.28.04-install/include/TString.h:29,
from /Users/dengyubin/root/root-6.28.04-install/include/TCollection.h:29,
from /Users/dengyubin/root/root-6.28.04-install/include/TSeqCollection.h:25,
from /Users/dengyubin/root/root-6.28.04-install/include/TList.h:25,
from /Users/dengyubin/root/root-6.28.04-install/include/TQObject.h:40,
from /Users/dengyubin/root/root-6.28.04-install/include/TVirtualPad.h:30,
from /Users/dengyubin/root/root-6.28.04-install/include/TPad.h:15,
from /Users/dengyubin/homegarfield/garfield/Include/Garfield/ViewBase.hh:8,
from /Users/dengyubin/homegarfield/garfield/Include/Garfield/ViewDrift.hh:13,
from /Users/dengyubin/homegarfield/garfield/Include/Garfield/AvalancheMC.hh:11,
from /Users/dengyubin/homegarfield/garfield/Source/
/Users/dengyubin/root/root-6.28.04-install/include/ROOT/RStringView.hxx:90:17: error: expected type-specifier
90 | operator std::string_view() const { return std::string_view(fData,fLength); }
| ^~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [CMakeFiles/Garfield.dir/Source/] Error 1
make[1]: *** [CMakeFiles/Garfield.dir/all] Error 2
make: *** [all] Error 2

I guess @hschindl can help.

1 Like

thanks for your@ :face_holding_back_tears:

I suspect there is a mismatch between the compiler/C++ standard you are using to build Garfield++ and the one that was used to build your ROOT installation. Make sure you are using a ROOT installation that is consistent with your compiler.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.