[Ruby] compiling ruby 1.8.5 w/ openssl on Debian (Etch/testing) 686 in $HOME

Mike Mondragon mikemondragon at gmail.com
Thu Feb 1 21:38:07 PST 2007


A way to get it to work is by setting the configuration option for linking
the external modules statically, like so:

./configure --prefix=$HOME --with-static-linked-ext
make
make install

ldd shows that the installation of ruby is using the iconv, readline, and
openssl libraries that were built locally as well.

$ ldd /home/mike/bin/ruby
        linux-gate.so.1 =>  (0xffffe000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xa7fae000)
        libcrypt.so.1 => /lib/tls/libcrypt.so.1 (0xa7f7f000)
        libm.so.6 => /lib/tls/libm.so.6 (0xa7f59000)
        libreadline.so.5 => /home/mike/lib/libreadline.so.5 (0xa7f2c000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0xa7eeb000)
        libssl.so.0.9.8 => /home/mike/lib/libssl.so.0.9.8 (0xa7eb1000)
        libcrypto.so.0.9.8 => /home/mike/lib/libcrypto.so.0.9.8 (0xa7d88000)
        libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xa7d81000)
        libiconv.so.2 => /home/mike/lib/libiconv.so.2 (0xa7ca3000)
        libutil.so.1 => /lib/tls/libutil.so.1 (0xa7c9f000)
        libz.so.1 => /usr/lib/libz.so.1 (0xa7c8b000)
        libc.so.6 => /lib/tls/libc.so.6 (0xa7b53000)
        /lib/ld-linux.so.2 (0xa7fc7000)


On 1/31/07, Mike Mondragon <mikemondragon at gmail.com> wrote:
>
> I'm having trouble getting ruby 1.8.5 to include openssl when it is
> comiled on a Debian box in a user's $HOME directory.
>
> There are many similar discussions on Debian and Ubuntu forums and the
> "Debian way" is to just use the deb packages and make sure to include
> libopenssl-ruby.  This question is not about that.
>
> Specifically I want to have ruby 1.8.5 compiled in my user environment
> with openssl support on my Debian box.  I am able to do this in a basic
> hosting environment at pair.com on a FreeBSD box.
>
> Here's how its built with openssl and readline support on the FreeBSD box.
>
> each project directory is in $HOME
>
> in openssl-0.9.8d directory
> ./config --prefix=$HOME --openssldir=$HOME/openssl shared
> make
> make install
>
> in readline-5.2 directory
> ./configure --prefix=$HOME
> make
> make install
>
> in ruby-1.8.5 directory
> ./configure --prefix=$HOME
> make
> make install
>
> As I said this works fine on FreeBSD and as long as I have these
> environment set:
> PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
> LD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:/usr/lib
> I can run my copy of ruby with openssl support in cron jobs, etc.
>
> However, when I go through the same steps on my Debian box ruby 1.8.5compiles and installs without any errors, but its missing the openssl
> support (and readline support)
>
> Specifically on the FreeBSD the openssl library is installed in the
> standard manner:
> $HOME/lib/ruby/1.8/openssl.rb
> $HOME/lib/ruby/1.8/openssl/*
>
> but $HOME/lib/ruby/1.8/openssl* is missing on the Debian build.  Also
> cd-ing into ext/openssl and doing a make install nets nothing:
> cd ext/openssl/
> make install
> make: Nothing to be done for `install'.
>
> Doing the above in the FreeBSD environment makes the openssl  library.
>
> During configure and make nothing is mentioned about openssl either
> missing or being broken when the ext directory is processed.  If someone
> knows how to resolve this issue please let me know.  If you have any clues
> about where I might poke around in the configure and make environments that
> would also be helpful.  I have experience working with a make build
> environment so if you have some pointers on where to look that would be
> great.  Seems like my environment is missing some configure trigger around
> the Setup files in ext.  Some have openssl and readline commented out
> (Setup, Setup.x68, etc.) but I don't know their exact meaning or how they
> are created.
>
> My gcc version is 4.1.2
>
> Thanks!
>
> (PS what happened at last night's meeting that everyone is crooning
> about?)
>
> --
> Mike Mondragon
> http://mondragon.cc/


More information about the Ruby mailing list