[ruby-dev:49185] [Ruby trunk - Bug #11345] [Open] Failed to build standard library openssl on OSX 10.10.4

From: tomo.asleep@...
Date: 2015-07-12 02:55:13 UTC
List: ruby-dev #49185
Issue #11345 has been reported by Tomoya Chiba.

----------------------------------------
Bug #11345: Failed to build standard library openssl on OSX 10.10.4
https://bugs.ruby-lang.org/issues/11345

* Author: Tomoya Chiba
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.3dev
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I failed to build standard library openssl when I use OpenSSL provided by Apple.
When I tried to build ruby by running `./configure && make`,
building of standard library openssl failed and was skipped.
I couldn't find the following error message because other long messages hid the message.
I noticed that I failed to build standard library openssl when I used a code which requires standard library openssl.

```
configuring openssl
Ignore OpenSSL broken by Apple.
Please use another openssl. (e.g. using `./configure --with-openssl-dir=/path/to/openssl')
Failed to configure openssl. It will not be installed.
```

([This code](https://github.com/ruby/ruby/blob/e7d6fc01dd72e43cd0ff7c20c3da9f20483822f3/ext/openssl/extconf.rb#L62) would raise this error.)

I think that it is hard to find this message and documents should describe that OSX users should specify another openssl library as  `--with-openssl-dir` parameter of the configure script.
What do you think?

If you tell me a proper place to add the description, I will add such description and send a pull request :-)

```
You cannot use openssl provided by Apple to build standard library openssl.
If you use OSX, you should install another openssl and run ```./configure --with-openssl-dir=/path/to/another-openssl```.
For Homebrew user, run `brew install openssl` and then ```./configure --with-openssl-dir=`brew prefix openssl` ```.
```

There are other people failing to build standard library openssl because of using Apple OpenSSL.

* https://redmine.ruby-lang.org/issues/5853
* https://www.ruby-forum.com/topic/4411415
* http://stackoverflow.com/questions/17181075/openssl-error-installing-ruby-2-0-0-p195-on-mac-with-rbenv
* http://spring-mt.tumblr.com/post/35775477040/openssl-ruby-2-0-0-preview1-bundle (Japanese)

---

In Japanese,

標準添付のopensslをMacOSXでビルドすると、AppleがバンドルしているOpenSSLだと以下の様なエラーメッセージが出て標準添付のopensslのビルドに失敗してスキップされてしまうのですが、`configure && make`してビルドすると長いメッセージに埋もれてしまい、このことに気づきにくいと感じました。(私はopensslが必要なコードを使って初めてスキップされたことに気づきました。)

```
configuring openssl
Ignore OpenSSL broken by Apple.
Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl')
Failed to configure openssl. It will not be installed.
```

(エラーメッセージが出るのは、[ここのソースコード](https://github.com/ruby/ruby/blob/e7d6fc01dd72e43cd0ff7c20c3da9f20483822f3/ext/openssl/extconf.rb#L62)の処理によるようです。)


Macでビルドする際には `configure --with-openssl-dir=/path/to/openssl` と他のOpenSSLの場所を指定するようにREADME等に明記したほうが良いと思うのですが、いかがでしょうか。

どこの箇所に説明を追加するべきかを教えていただければ、以下の内容を書き足してプルリクエストを送ります:-)

```
You cannot use openssl provided by Apple to build standard library openssl.
If you use OSX, you should install another openssl and run ```./configure --with-openssl-dir=/path/to/another-openssl```.
For Homebrew user, run `brew install openssl` and then ```./configure --with-openssl-dir=`brew prefix openssl` ```.
```

AppleのOpenSSLを使用してしまっているせいで標準添付のOpenSSLのビルドに失敗している方が他にもいるようです。

* https://redmine.ruby-lang.org/issues/5853
* https://www.ruby-forum.com/topic/4411415
* http://stackoverflow.com/questions/17181075/openssl-error-installing-ruby-2-0-0-p195-on-mac-with-rbenv
* http://spring-mt.tumblr.com/post/35775477040/openssl-ruby-2-0-0-preview1-bundle (Japanese)




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next