I am attempting to install Ruby 1.9.3 using clang. I tried the following and it didn't work:
rvm install 1.9.3-p125 --with-gcc=clang
rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr
The error I get is the readline related error in the make log:
readline.c:1499:9: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
rl_username_completion_function);
^
readline.c:69:42: note: expanded from macro 'rl_username_completion_function'
# define rl_username_completion_function username_completion_function
^
/usr/local/include/readline/readline.h:443:14: note: 'rl_username_completion_function' declared here
extern char *rl_username_completion_function PARAMS((const char *, int));
^
1 error generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2
as well as this clang error for the first attempt: (rvm install 1.9.3-p125 --with-gcc=clang)
clang: error: unsupported option '--with-libyaml'
clang: error: unsupported option '--with-libyaml'
and for the second attempt: (rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr)
clang: error: unsupported option '--with-readline'
clang: error: unsupported option '--with-opt-dir=/Users/andrewjl/.rvm/usr'
clang: error: unsupported option '--with-readline'
clang: error: unsupported option '--with-opt-dir=/Users/andrewjl/.rvm/usr'
Given what I learned here, my guess is that clang is not recognizing my command line arguments to use specific gcc and/or specific readline directory.
My RVM is: rvm 1.14.3 (master)
My Clang is:
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
Here is my GCC:
andrewjl$ /usr/bin/gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
I tried the method here and it didn't work for me. Specifically I installed Xcode 4.1 with command line tools and made sure to get openssl and readline updated. Does anybody know anything else I can try?