Closed can-taslicukur closed 9 months ago
Ok, I've actually found a solution right after I posted this issue 🤦
All of the errors in the second error are generated from /opt/homebrew/Cellar/abseil/
so I've googled "brew abseil" and this github issue came up which states that "abseil is built against c++17". Which also makes the error message in the first installation error invalid.
So I've replaced CXXFLAGS += -std=c++14
in .R/Makevars
with CXXFLAGS += -std=c++17
Moral of the story: Building from source using Apple Silicon is extremely painful.
I can't reproduce these trouble. I just tried on my M1 box brew install protobuf
and then installing protolite, and it all just works without warnings or errors.
Perhaps you need to brew upgrade
?
Are you installing the most recent version of protolite from CRAN?
it is 2.1
in the renv.lock
of the project I was running renv::restore()
. I will try brew upgrade
thank you so much for the advice!
You probably can fix the problem by installing the latest version of protolite instead (there are no breaking changes).
Yes! Can confirm that the latest version can install without the need to add CXXFLAGS += -std=c++17
to .R/Makevars
. Tested it by commenting this line in .R/Makevars
and running install.packages("protolite")
r$> install.packages("protolite")
# Downloading packages -------------------------------------------------------
- Downloading protolite from RSPM ... OK [file is up to date]
Successfully downloaded 1 package in 2.3 seconds.
The following package(s) will be installed:
- protolite [2.3.0]
These packages will be installed into "~/project/renv/library/R-4.3/aarch64-apple-darwin20".
Do you want to proceed? [Y/n]: y
# Installing packages --------------------------------------------------------
- Installing protolite ... OK [built from source and cached in 13s]
Successfully installed 1 package in 13 seconds.
I have
protobuf
installed via homebrew.When I run
renv::restore()
in a project that requiresprotolite
, I was first getting this error:Where the
ANTICONF ERROR
is actually misleading because the error above actually states that"C++ versions less than C++14 are not supported."
. So, I've googled it and addedCXXFLAGS += -std=c++14
to.R/Makevars
.Now the error is different:
Any suggestions would be greatly appreciated. Thank you so much for this package!