Ruben Laguna’s blog

Rvm Install 1.9.3 Fails With ‘Configure: Error: ANSI C-conforming Const and Volatile Are Mandatory’

So you tried rvm install 1.9.3 and that fails with a cryptic ANSI C-conforming const and volatile are mandatory… Well, here is how I solved it:

First make sure that you have an up to date rvm and try again just to be sure

rvm get head
rvm cleanup all
rvm install 1.9.3

If that still fails, like it did for me, then double check that you are did inadvertedly set CFLAGS, LDFLAGS or LDLIBS in your shell

echo $CFLAGS
unset CFLAGS
echo $LDLIBS
unset LDLIBS
rmv install 1.9.3

In my case I had some default CFLAGS that were somehow breaking the build. Once I remove the CFLAGS everything built ok.