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

1.9.3-p0 build failed on OS X Lion 10.7.2 #82

Closed
cjbottaro opened this issue Oct 30, 2011 · 8 comments
Closed

1.9.3-p0 build failed on OS X Lion 10.7.2 #82

cjbottaro opened this issue Oct 30, 2011 · 8 comments

Comments

@cjbottaro
Copy link

$ rbenv install 1.9.3-p0
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/cjbottaro/.rbenv/versions/1.9.3-p0
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz...
Installing ruby-1.9.3-p0...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/98/83mjk36d4ts49lpbjvbz48f80000gn/T/ruby-build.20111030161956.28281
Results logged to /var/folders/98/83mjk36d4ts49lpbjvbz48f80000gn/T/ruby-build.20111030161956.28281.log

Last 10 log lines:
ossl_x509store.c: In function ‘ossl_x509stctx_set_flags’:
ossl_x509store.c:520: warning: ‘X509_STORE_CTX_set_flags’ is deprecated (declared at /usr/include/openssl/x509_vfy.h:464)
ossl_x509store.c: In function ‘ossl_x509stctx_set_purpose’:
ossl_x509store.c:532: warning: ‘X509_STORE_CTX_set_purpose’ is deprecated (declared at /usr/include/openssl/x509_vfy.h:460)
ossl_x509store.c: In function ‘ossl_x509stctx_set_trust’:
ossl_x509store.c:544: warning: ‘X509_STORE_CTX_set_trust’ is deprecated (declared at /usr/include/openssl/x509_vfy.h:461)
ossl_x509store.c: In function ‘ossl_x509stctx_set_time’:
ossl_x509store.c:561: warning: ‘X509_STORE_CTX_set_time’ is deprecated (declared at /usr/include/openssl/x509_vfy.h:466)
linking shared-object openssl.bundle
make: *** [build-ext] Error 2

I did a brew installation of both rbenv and ruby-build about 15 mins ago, so I should be all up to date.

@jeremy
Copy link
Member

jeremy commented Oct 30, 2011

Hi @cjbottaro -- check /var/folders/98/83mjk36d4ts49lpbjvbz48f80000gn/T/ruby-build.20111030161956.28281.log to see the full build log and track down the error that occurred.

The last ten lines look like warnings only.

@kastiglione
Copy link

To build on 10.7.2, I had to set CONFIGURE_OPTS="--with-gcc=clang", as described in the 1.9.3 NEWS file.

@cjbottaro
Copy link
Author

I got it to compile by using the readline installed by brew:

LDFLAGS="-L/usr/local/Cellar/readline/6.2.1/lib" CPPFLAGS="-I/usr/local/Cellar/readline/6.2.1/include" rbenv install 1.9.3-p0

@joe1chen
Copy link

For the benefit of anyone else running into this issue, just wanted to mention that building Ruby 1.9.3 with clang as described above works for me.

However, certain gems may not be updated to support or work with clang. In my case, I ran into an issue with the memcached-1.3.5 gem. This gem would not build with clang.

In the end, it was just easier to build Ruby 1.9.3 and all gems with gcc 4.2. I ended up uninstalling the XCode dev tools (/Developer/Library/uninstall-devtools) and then installed gcc 4.2 from https://github.com/kennethreitz/osx-gcc-installer. After restarting the console to ensure all environment variables were updated, I re-built Ruby 1.9.3 without any extra options needed. All my gems also built with gcc 4.2.

@jeremy
Copy link
Member

jeremy commented Dec 5, 2011

GCC is required now, so builds won't get as far as hitting errors like this. We can revisit when Ruby supports clang.

@jeremy jeremy closed this as completed Dec 5, 2011
@cicloid
Copy link

cicloid commented Feb 17, 2012

Will today announcement (Command Line Tools for Xcode) change things?

@jeremy
Copy link
Member

jeremy commented Feb 17, 2012

Yes it will!

@jeremy jeremy reopened this Feb 17, 2012
@bosborne
Copy link

bosborne commented Dec 2, 2012

Just an update, had a similar problem with openssl and Mac OS X 10.8.2, XCode 4.5.2 with command-line tools installed. Did:

rbenv install 1.9.3-p327

Saw:

Last 10 log lines:
compiling ossl_x509cert.c
compiling ossl_x509crl.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
make: *** [build-ext] Error 2

The solution was using brew's readline, like above:

export CPPFLAGS="-I/usr/local/Cellar/readline/6.2.4/include"
export LDFLAGS="-L/usr/local/Cellar/readline/6.2.4/lib"
export CONFIGURE_OPTS="--with-gcc=clang"

Adding CONFIGURE_OPTS alone wasn't sufficient.

mislav added a commit that referenced this issue Dec 11, 2013
I thought this was not necessary, but a number of people had problems
when linking to OS X's "readline" (actually Editline wrapper):

- Some components of Pry wouldn't work
- Writing literal Unicode characters was not possible #379
- The compilation would downright fail in some cases #82 #461

Fixes #461
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

7 participants