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

**URL:** <https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839>\
**Category:** Garfield++\
**Created:** [July 27, 2023, 9:49am UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839 "2023-07-27T09:49:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![licat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@licat](https://root-forum.cern.ch/u/licat)\
**Post date:** [July 27, 2023, 9:49am UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839/1 "2023-07-27T09:49:06Z")

</div>

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/AvalancheMC.cc:7:  
/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/AvalancheMC.cc.o] Error 1  
make[1]: \*\*\* [CMakeFiles/Garfield.dir/all] Error 2  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 27, 2023, 10:33am UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839/2 "2023-07-27T10:33:03Z")

</div>

I guess @hschindl can help.

---

<div class="post-metadata">

**Author:** ![licat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@licat](https://root-forum.cern.ch/u/licat)\
**Post date:** [July 27, 2023, 12:46pm UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839/4 "2023-07-27T12:46:29Z")

</div>

thanks for your@ 🥹

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [July 28, 2023, 11:54am UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839/5 "2023-07-28T11:54:09Z")

</div>

Hi,  
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.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 11, 2023, 11:54am UTC](https://root-forum.cern.ch/t/an-error-occurred-during-the-installation-of-garfield-on-mac-m1/55839/6 "2023-08-11T11:54:22Z")

</div>

Closed on August 11, 2023, 11:54am UTC

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