-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo" Error in Mac OS Big Sur #324
Comments
Works fine for me on Big Sur. The main thing that stands out is that your compile statement isn't requesting C++11 (or greater). E.g. when I run
Note the
which makes me suspect you may have overridden FWIW you can force C++11 with:
in your script as an alternate way forward. |
That worked! Thank you so much! |
@kevinushey Isn't the plugin redundant as R now enforces C++11 as a minimum standard? Or did you suggest it as a fudge in case a local |
Right, it's a fudge in case the user has overridden the default compiler and removed the flags forcing C++11. |
So, to be clear I had not manually overridden the default. After a fresh install of R and Xcode on a new laptop, there was a
|
See #324 (comment) where @kevinushey explains what gets replaced. You are loosing that selection of C++11. Which is the issue that brought you here. Makes sense? So not pointing fingers at you per se but maybe at whoever setup of the installer? |
Of course @eddelbuettel. I am just curious why would R create a |
"It doesn't." (Speaking at the Debian maintainre for the build of R.) R would never touch Maybe it's XCode, maybe it's a (ahem) feature in the macOS build. I have no idea. |
That might've been done by RStudio actually (if you're using that). Will have to investigate. (That's an old leftover from the days when Apple switched from gcc to clang) |
Just to close the loop, this was quite likely generated by RStudio: so we'll have to fix there. Sorry for the trouble; this fix was appropriate ~5 years ago but no longer now :-/ |
Glad we found it! |
Thanks for following up with this @kevinushey! Will save so many from so much trouble. |
-std=c++11 |
@Tomtao626 R does that automatically for at least two years now, in fact it by now defaults to C++14. The root cause is still the need for recent-enough compiler on the machine. |
Following #268 using Mac OS Big Sur with the m1 processor running R and gfortran under Rosetta, I get the error
"*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
trying to compile the followinghelloworld
file:Been on it for hours now and can't figure out what is it that I'm missing.
Here's the error:
I have
gfortran 10.2.0
through fxcoudert andclang 12.0.0
throughXcode
Here is my environment:
The text was updated successfully, but these errors were encountered: