Not sure how to enable CET

When I was trying to install a r package in Fedora 27, I got the error message

"cc1: error: '-fcf-protection=full' requires Intel CET support. Use -mcet or both of -mibt and -mshstk options to enable CET"

I guess this is related to the GCC, but I am not sure how to enable CET.

Maybe try prepending CFLAGS=-mcet to the R build command?

Do you mean that I need to build R from source? Is there an easier way of doing it?

Based on your post, I was assuming that you were installing an R package, and that package’s installation process was building some code.

Could you be more specific about how to build a R package with enabling CET?

  1. Which R package are you trying to build?
  2. Are you building it with R CMD INSTALL from the command line, or in the R console with install.packages?
  3. You’ll need to pass -mcet to the compiler, whichever way you do the install. See the --configure-args parameter in https://www.rdocumentation.org/packages/utils/versions/3.5.1/topics/install.packages

You can also define it system-wide or user-wide if using -mcet won’t break other packages. See https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Customizing-package-compilation

Thanks for the reply. How can I add the -mcet to the code:
install.packages("dplyr")?

I tried install.packages("dplyr", configure.args = c("-mcet")) but still got the error.

I’m pretty sure this isn’t a Fedora issue. So I’d recommend posting on the dplyr issues site on GitHub - https://github.com/tidyverse/dplyr/issues. dplyr is a widely-used R package and it should compile everywhere without throwing an error in GCC.

I did ask the question there, and they told me that I need to enable CET for GCC. Installing GCC: Configuration - GNU Project

I am guessing may be Fedora uses a GCC too new for dplyr.

I have the most recent GCC on my Arch Linux workstation and it installs dplyr with no problems. Let me try it on a Fedora container and see if I can troubleshoot it. Is dplyr the only package that’s throwing that error?

I got the error message for other dependent packages of dplyr as well. I am not sure if any fedora users get dplyr working on Fedora 28. I can install dplyr on my Fedora 27 but cannot install it on my wife’s Fedora 28 machine.

OK - I’ll try on F28. Do both machines have an Intel CPU, or is one AMD? If they’re different, which one is failing?

Both machines use Intel CPU.

I’ve got good news. I ran dnf install R in two containers, fedora:28 and fedora:29. In R, install.packages("dplyr") fails in the Fedora 28 container on my machine (AMD CPU) with the same error you’re getting. But in the Fedora 29 container, it works!

So if you can upgrade to Fedora 29, you should have a working R again. I don’t know if it’s worth opening a bug in Bugzilla since it’s working on 27 and 29 but failing on 28. But if for some reason you can’t upgrade to 29, I’d say go ahead and file the bug.

1 Like

Thanks so much! I will update my wife’s Fedora 28 to 29.