Compilation ERROR, function(s)/method(s) not created

gcc version 4.8.5 20150623

I changed my .R/Makevars file to

CXX14FLAGS=-O3 -march=native -mtune=native -fPIC -std=c++1y
CXX14=g++

and manually added the -std=c++1y flag.
rstan compiled and installed successfully.

I found some additional details here:
https://discourse.mc-stan.org/t/installing-rstan-in-rhel-with-std-c-11-flag/6217

Thanks!