Ruben Laguna's blog

Apr 2, 2014 - 1 minute read - ruby

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
rvm 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.