[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

building openssl extension

ptkwt

10/29/2004 1:00:00 AM

I tried building ruby 1.8.2 preview 2 and noticed that I didn't get
openssl (require 'openssl' fails).

So then I saw something about the --with-openssl-dir option for
configure, and I ran configure again using:
./configure --with-openssl-dir=/usr/local/ssl/include/openssl/

Then 'make'. I checked in ext/openssl, but there was no .so file built.

I next tried:
cd ext/openssl
C_INCLUDE_PATH='/usr/local/ssl/include' ruby extconf.rb

And got:
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for unistd.h... yes
checking for sys/time.h... yes
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... yes
checking for OpenSSL_add_all_digests() in -lcrypto... no
checking for OpenSSL_add_all_digests() in -llibeay32... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.


Do I need a newer version of libcrypto or libeay32?

$ uname -a
Linux jed.home.com 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i686
unknown unknown GNU/Linux

(Mandrake 10.0 with the older 2.4.19 kernel)

Phil
6 Answers

Brian Candler

10/29/2004 8:18:00 AM

0

> So then I saw something about the --with-openssl-dir option for
> configure, and I ran configure again using:
> ./configure --with-openssl-dir=/usr/local/ssl/include/openssl/

There is no 'with-openssl-dir' option that I can see:

$ grep -i ssl configure
$

But I suggest you try:

LDFLAGS="-L/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/ssl/include" ./configure
make

If that doesn't work, then post the contents of ext/openssl/mkmf.log here
for us to look at.

I remember that I had to do some trick like this to get ruby with openssl to
build on a Red Hat 9 box, but I don't have a note of what was the exact
command I had to run.

Regards,

Brian.


Brian Candler

10/29/2004 8:30:00 AM

0

> I remember that I had to do some trick like this to get ruby with openssl to
> build on a Red Hat 9 box, but I don't have a note of what was the exact
> command I had to run.

I have now found the note. I wrote:

| Incidentally, I had some difficulty building ruby-1.8 with OpenSSL support
| under Red Hat. The fix is:
|
| # export CPPFLAGS="-I/usr/kerberos/include"
| # export LDFLAGS="-L/usr/kerberos/lib"
| # ./configure

This may not be what you need for your Mandrake system, but from mkmf.log it
turned out there was some interdependency between the openssl and kerberos
libraries, and RH in their wisdom had put the kerberos libraries in a
non-standard place.

mkmf.log is your friend.

Regards,

Brian.


GOTOU Yuuzou

10/29/2004 5:06:00 PM

0

ptkwt

10/29/2004 5:27:00 PM

0

In article <20041030.020521.295418915.gotoyuzo@sawara.priv.tokyo.netlab.jp>,
GOTOU Yuuzou <gotoyuzo@notwork.org> wrote:
>In message <cls4mq0rfe@enews4.newsguy.com>,
> `ptkwt@aracnet.com (Phil Tomson)' wrote:
>> So then I saw something about the --with-openssl-dir option for
>> configure, and I ran configure again using:
>> ./configure --with-openssl-dir=/usr/local/ssl/include/openssl/
>
>Did you try this?
>
> ./configure --with-openssl-dir=/usr/local/ssl
>

As pointed out by Brian Candler, I don't see a --with-openssl-dir option
defined in the configure script:

$ grep -i ssl configure
$


But I will try this.

Phil

ptkwt

10/29/2004 11:37:00 PM

0

In article <20041030.020521.295418915.gotoyuzo@sawara.priv.tokyo.netlab.jp>,
GOTOU Yuuzou <gotoyuzo@notwork.org> wrote:
>In message <cls4mq0rfe@enews4.newsguy.com>,
> `ptkwt@aracnet.com (Phil Tomson)' wrote:
>> So then I saw something about the --with-openssl-dir option for
>> configure, and I ran configure again using:
>> ./configure --with-openssl-dir=/usr/local/ssl/include/openssl/
>
>Did you try this?
>
> ./configure --with-openssl-dir=/usr/local/ssl
>

That worked.

Phil

ptkwt

10/30/2004 6:33:00 AM

0

In article <cluk6o12uke@enews3.newsguy.com>,
Phil Tomson <ptkwt@aracnet.com> wrote:
>In article <20041030.020521.295418915.gotoyuzo@sawara.priv.tokyo.netlab.jp>,
>GOTOU Yuuzou <gotoyuzo@notwork.org> wrote:
>>In message <cls4mq0rfe@enews4.newsguy.com>,
>> `ptkwt@aracnet.com (Phil Tomson)' wrote:
>>> So then I saw something about the --with-openssl-dir option for
>>> configure, and I ran configure again using:
>>> ./configure --with-openssl-dir=/usr/local/ssl/include/openssl/
>>
>>Did you try this?
>>
>> ./configure --with-openssl-dir=/usr/local/ssl
>>
>
>That worked.
>
>Phil

Sorry to reply to my own post, but someone else might also run into
this in the future:

Later I discovered that while openssl worked by doing the above
configure with the --with-openssl-dir=/usr/local/ssl and then make, that
webrick no longer worked: something about missing symbols in md5.so. So
I had to save the openssl.so and then rebuild after doing a clean configure
without the --with-openssl-dir=/usr/local/ssl and rebuilt &
reinstalled (making sure to put the saved openssl.so in the right place).
Now both openssl and webrick seem to work.

Phil