Forum: Ruby Again, Zlib load error on HP-UX

5d46c887d941733ee503466ff281bc29?d=identicon&s=25 Denis Berezhnoy (denisb)
on 2009-07-23 08:13
Hi guys,

I run into the same problem which was widely discussed. When I tried to
install ruby gems I got the following:

# ruby setup.rb
./lib/rubygems/spec_fetcher.rb:1:in `require': no such file to load --
zlib (LoadError)
        from ./lib/rubygems/spec_fetcher.rb:1

I googled a lot of solutions but could not manage to make them working
so far.  First of all I looked for zlib. It seems to be installed. At
least here what I have:

# zlib                                  1.2.3          zlib
# zlib.zlib-RUN
  zlib.zlib-RUN: /usr/local/doc/zlib/ChangeLog
  zlib.zlib-RUN: /usr/local/doc/zlib/HPUX.Install
  zlib.zlib-RUN: /usr/local/doc/zlib/README
  zlib.zlib-RUN: /usr/local/include/zconf.h
  zlib.zlib-RUN: /usr/local/include/zlib.h
  zlib.zlib-RUN: /usr/local/lib/hpux32/libz.a
  zlib.zlib-RUN: /usr/local/lib/hpux32/libz.so
  zlib.zlib-RUN: /usr/local/man/man3/zlib.3


Then I tried to rebuild Ruby:

./configure --prefix=/usr/local --with-zlib-include=/usr/local/include
--with-zlib-lib=/usr/local/lib/hpux32

make
...
compiling tk/tkutil
compiling win32ole
compiling zlib
making ruby
make[1]: Entering directory `/home/denisb/tmp/atf_ruby/ruby-1.8.7-p22'
gcc -g -O2    -DRUBY_EXPORT  -L.  -Wl,-E   main.o  -lruby-static -ldld
-ldl -lm   -o ruby
make[1]: Leaving directory `/home/denisb/tmp/atf_ruby/ruby-1.8.7-p22'


I checked /ext/zlib no compiled lib there.  Tried to compile zlib here:

#  ruby extconf.rb --with-zlib-include=/usr/local/include
--with-zlib-lib=/usr/local/lib/hpux32
checking for deflateReset() in -lz... no
checking for deflateReset() in -llibz... no
checking for deflateReset() in -lzlib1... no
checking for deflateReset() in -lzlib... no
checking for deflateReset() in -lzdll... no
#

I run out of idea what I can try else.

I have read that it is needed to install zlib devel package but I could
not find package for HP-UX.

Can you please suggest anything?

Best regards,
Denis
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-07-23 15:44
> Can you please suggest anything?

install pure ruby zlib?
=r
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-07-24 00:28
(Received via mailing list)
On Jul 22, 2009, at 23:14, Denis Berezhnoy wrote:

>
>  zlib.zlib-RUN: /usr/local/include/zlib.h
> make
>
> #
>
> I run out of idea what I can try else.

What's the output of ext/zlib/mkmf.log

What's the output when you just run extconf.rb?

Do you get a different result when you use miniruby like the Makefile
does?
5d46c887d941733ee503466ff281bc29?d=identicon&s=25 Denis Berezhnoy (denisb)
on 2009-07-24 06:40
(Received via mailing list)
Hi,

Thanks for you answers! Somehow I solved this issue by placing zlib.so
into /ext/zlib folder and rebuilding and reinstalling ruby then.

Denis
5d46c887d941733ee503466ff281bc29?d=identicon&s=25 Denis Berezhnoy (denisb)
on 2009-07-24 06:45
(Received via mailing list)
Hi,

Thanks for you answers! Somehow I solved this issue by placing zlib.so
into /ext/zlib folder and rebuilding and reinstalling ruby then.

Denis
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.