Again, Zlib load error on HP-UX

D

Denis Berezhnoy

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
 
E

Eric Hodel

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.

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?
 
D

Denis Berezhnoy

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
 
D

Denis Berezhnoy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top