Mac OS 10.8.2 and openssl

Quoting Dr. Hegewald (hegewald@irmb.tu-bs.de):

> 3) (from ..../ruby/ext/openssl)
> export PKG_CONFIG_PATH=/path/to/install/lib/pkgconfig:$PKG_CONFIG_PATH
> make clean
> ruby extconf.rb

This command fails with the same error as before,

Are you sure you executed the export command correctly? What do you
get if you type

echo $PKG_CONFIG_PATH

? And if you type

ls -al /path/to/install/lib/pkgconfig

? Also, the contents of the mkmf.log file may be useful.

Many thanks for your efforts here Carlo. But I think I have to go
back to ruby 1.9.3 until I get new input on the issue.

Maybe... Somebody who regularly uses Ruby under Mac will eventually
offer the right solution.

Carlo

···

Subject: Re: Mac OS 10.8.2 and openssl
  Date: mer 27 feb 13 11:19:26 +0900

--
  * Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
  * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)

  Subject: Re: Mac OS 10.8.2 and openssl
  Date: mer 27 feb 13 11:19:26 +0900

Quoting Dr. Hegewald (hegewald@irmb.tu-bs.de):

3) (from ..../ruby/ext/openssl)
export PKG_CONFIG_PATH=/path/to/install/lib/pkgconfig:$PKG_CONFIG_PATH
make clean
ruby extconf.rb

This command fails with the same error as before,

Are you sure you executed the export command correctly?

I guess it is OK:

$ ls -l $PKG_CONFIG_PATH
total 24
-rw-r--r-- 1 me we 288 27 Feb 11:35 libcrypto.pc
-rw-r--r-- 1 me we 303 27 Feb 11:35 libssl.pc
-rw-r--r-- 1 me we 313 27 Feb 11:35 openssl.pc

? Also, the contents of the mkmf.log file may be useful.

This is the openssl/mkmf.log:

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.

Cheers,
Jan

···

On 27.02.2013, at 16:03, Carlo E. Prelz <fluido@fluido.as> wrote:

Quoting Dr. Hegewald (hegewald@irmb.tu-bs.de):

> ? Also, the contents of the mkmf.log file may be useful.

This is the openssl/mkmf.log:

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.

Only? If so, your ruby source must be damaged. There should be a lot of
other stuff in the file.

Try to execute this short script, AFTER SETTING PKG_CONFIG_PATH as I
wrote yesterday:

--8<----8<----8<----8<----8<----8<----8<----8<----8<--
require 'mkmf'
p pkg_config('openssl')
p have_func('SSL_library_init()','openssl/ssl.h','-Werror=deprecated-declarations')
p have_header('openssl/ssl.h',nil,'-Werror=deprecated-declarations')
--8<----8<----8<----8<----8<----8<----8<----8<----8<--

What is the output, and what is the entire content of the resulting
mkmf.log? (Note that my file is 50 lines long).

The point is that, after executing pkg_config, you should only access
your new copy of openssl, which should pass that test. At least this
is what happens here.

Carlo

···

Subject: Re: Mac OS 10.8.2 and openssl
  Date: gio 28 feb 13 05:09:24 +0900

--
  * Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
  * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)

It is from ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2 and ruby compiles and runs from this source (though with out openssl).

But I think I got it working eventually:

Reading the suggestions and linked discussions the the others have provided, I gave the --with-openssl-dir flag another chance (as it seems still to be used despite of the warning). Now I tried different path variants to point to my new openssl install. It seems so succeed when using the dir above the openssl bin dir. Previously I only tried the path to the binary and the path to its containing dir:

ls /Users/me/bin/openssl-1.0.1e-bin
bin include lib ssl

cd ruby-2.0.0-p0-src
./configure --with-openssl-dir=/Users/me/bin/openssl-1.0.1e-bin --prefix=/Users/me/bin/ruby-2.0.0-p0-bin
make install

and now I could install gems with e.g.
gem install terminal-notifier

So I guess the openssl stuff is configured fine now.

Cheers and many thanks to all for the very useful input!

Jan Hegewald

···

On 28.02.2013, at 09:56, "Carlo E. Prelz" <fluido@fluido.as> wrote:

  Subject: Re: Mac OS 10.8.2 and openssl
  Date: gio 28 feb 13 05:09:24 +0900

Quoting Dr. Hegewald (hegewald@irmb.tu-bs.de):

? Also, the contents of the mkmf.log file may be useful.

This is the openssl/mkmf.log:

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.

Only? If so, your ruby source must be damaged. There should be a lot of
other stuff in the file.