Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ree-1.8.7-2011.03 fails to install on OSX Lion (readline issues) #69

Closed
matthutchinson opened this issue Oct 20, 2011 · 2 comments
Closed

Comments

@matthutchinson
Copy link

I came across this issue with ruby-build, OSX Lion and REE (ree-1.8.7-2011.03)
Basically I couldn't install it properly due to common Readline issues, mentioned here

readline.c: In function ‘username_completion_proc_call’:  
readline.c:734: error: ‘username_completion_function’ undeclared (first use in this function)  
readline.c:734: error: (Each undeclared identifier is reported only once  
readline.c:734: error: for each function it appears in.)  
make[1]: *** [readline.o] Error 1 

I have readline installed OK (via brew) to /usr/local/Cellar/readline/6.2.1and the solution is to supply the REE installer with the --with-readline-dir configure option. So naturally I tried;

CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)" rbenv install ree-1.8.7-2011.03

Unfortunately, looking in the code for ruby-build, it seems that CONFIGURE_OPTS is ignored for REE installs

The build_package_ree_installer method pays no attention to the CONFIGURE_OPTS environment variable.

To compound the problem on OSX Lion, we can't simply use CONFIGURE_OPTS as an argument to the REE ./installer command, since its prefixed with '--with-gcc' set in the use_gcc42_on_lion method.

My suggested fix below introduces a new env variable, REE_CONFIGURE_OPTS, used only in the build_package_ree_installer method. With this patch applied, I could now successfully install REE on OSX Lion with the following command to rbenv;

REE_CONFIGURE_OPTS="-c --enable-shared -c --with-readline-dir=$(brew --prefix readline)" rbenv install ree-1.8.7-2011.03

Any questions or comments, or if you've had the same problem please let me know.

Matt

Patch

- 138:  { ./installer --auto "$PREFIX_PATH" --dont-install-useful-gems $options
+ 138: { ./installer --auto "$PREFIX_PATH" --dont-install-useful-gems $options $REE_CONFIGURE_OPTS 
@matthutchinson
Copy link
Author

While its a different error, this issue is somewhat related to #41

@sstephenson
Copy link
Contributor

Thanks for the patch. I've changed the GCC/LLVM detection code not to modify $CONFIGURE_OPTS, and modified the build_package_ree_installer function to pass along $CONFIGURE_OPTS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants