[Rubyinstaller-devel] compiling OpenSSL

Luis Lavena luislavena at gmail.com
Thu Apr 10 16:01:47 EDT 2008

On Thu, Apr 10, 2008 at 2:27 PM, Gordon Thiesfeld <gthiesfeld at gmail.com> wrote:
> So, I just stumbled across this article[1] that talks about compiling
>  OpenSSL with Mingw for Ruby and Python.  I thought I'd give it a try
>  to see if it would help with the openssl test failures.  I'm having a
>  few problems.

Hello Gordon!

I wasn't aware there are OpenSSL failures in the MinGW build. AFAIK
the only blocker I still have is test_readline, which hangs and halt
the whole 'rake check' process.

If you see the recipes, I've been using a pre-build binary from
GNUwin32 project instead of build it myself.

Right now the way the Rake tasks are organized is not good enough, and
can get brittle over time.

>  The first problem is in the extract step.  Bsdtar errors out when it
>  tries to extract the latest OpenSSL tar.gz[2].  So, I've sort of
>  skipped that step for the moment.  I run rake extract, then I manually
>  extract these files where I need them.

Can you provide the output or the error message you're getting when it
tries to extract it? Also, this OpenSSL need ot be extracted in it's
own directory, instead of using the OpenSSL package target location,
instead of MinGW one.

>  The second problem is getting the order of things right in rake.  I'm
>  assuming I would need to configure, compile, and install the OpenSSL
>  files (*.dll and *.a) before I try to build Ruby, and my rake skills
>  aren't good enough to figure out how to do this.

Yes and no, configure will be chained with configure of ruby
interpreter, and for compile will happen the same.

That wouldn't work unless we provide --with-openssl-dir or something
to the ruby configure process (to avoid clutter mingw and msys
installation with leftovers of these packages).

I think we need a new abstraction layer on top of Rake, that can be
more descriptive and precise of the dependencies, but don't have
enough time right now to design something :-P

>  So, I think I'm going to try to configure msys and mingw properly, and
>  try this as a manual process to see if there's any worth to this
>  approach.  But, before I do that, I thought I'd ask here.  Does this
>  seem like a worthwhile approach, or am I on a wild goose chase? :-)

Please do, I'll suggest you revert your changes, use latest.zip and
let rake do it's stuff, then use the sandbox/mingw and sandbox/msys as
base MinGW and start playing with manual build of OpenSSL.

I think is real worthy, since one of the goals of these recipes is cut
the dependency of externals builds, for ruby or it's dependencies.

The bad is some GNU projects (like readline) mess a lot the packages
and make almost impossible replicate the build procedure from sources.

>  Thanks,

Thanks to you man!, please keep us posted on this!

I'll hang out at #ruby-lang the weekend, trying to get other gems
working on Windows and MinGW.

Luis Lavena
Multimedia systems
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

More information about the Rubyinstaller-devel mailing list