wayneeseguin/rvm — Issue #602: rvm 1.9.2 install doesn't seem to pass configure options to ruby
Author: slyphon
Created: 2011-11-15 01:41:42+00:00
State: open

When trying to build a debug version of ruby-1.9.3-p0 with rvm 1.9.2, it seems that rvm is not parsing the configure options correctly.

I spoke w/ mpapis on this on #rvm, he had me try the following:

rvm --trace reinstall ruby-1.9.3-p0 -n debug -- --enable-shared optflags="-O0" debugflags="-ggdb3" 2>&1 |tee /tmp/rvm-trace.out

which produced this [trace](https://gist.github.com/9d7629aef5fb934da9c1/d696dc2c004e2104e4ddd67bfa17694a5ef106b3). On line 1108 you can see that the options weren't passed to configure.

I then tried the alternate style w/ `-C`:

rvm --trace reinstall ruby-1.9.3-p0 -n debug -C --enable-shared,optflags="-O0",debugflags="-ggdb3" 2>&1 |tee /tmp/rvm-trace.out

which [died](https://gist.github.com/9d7629aef5fb934da9c1/1b38dafb5e6d2fc074bcce4b1a9cb4106b039f6c) (again line 1108) because of bad arguments to configure.

as a last resort, we tried:

rvm --trace reinstall ruby-1.9.3-p0 -n debug -C --enable-shared,--optflags="-O0",--debugflags="-ggdb3" 2>&1 |tee /tmp/rvm-trace.out

which failed in exactly the same way, because `optflags` is a make variable, and not a configure option.

Finally, "as a temporary hack" i was able to get a debug build by adding the following line to my `~/.rvmrc`:

export rvm_configure_flags='--enable-shared optflags="-O0" debugflags="-ggdb3"'

So it seems something is a little screwy with the configure arguments parsing code :)