Rstan install - need to compile from source in order to see parser error messages

giving the clang4 install another go, but still seeing problems trying to run a simple valid model through stan_model - linker fails with message:

/usr/local/clang4/bin/…/include/c++/v1/stdlib.h:94:15: fatal error: ‘stdlib.h’ file not found

similar to what was discussed in this thread:

I suspect the Makevars file created by that installer is missing stuff needed by rstan et al, but reading the R docs and that other thread I can’t figure out what those should be.