I had the same issue on AWS and has already been fixed. You need to first install the gcc64 and openmp common support library.
sudo yum install gcc64
sudo yum install libgomp
.R Makevars ( R, ):
CC = /usr/bin/gcc64
CXX = /usr/bin/g++
SHLIB_OPENMP_CFLAGS = -fopenmp
, ...