# Extremely hard to install rubygems on hpux

**URL:** <https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931>\
**Category:** Ruby\
**Created:** [April 7, 2009, 3:18pm UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931 "2009-04-07T15:18:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [April 7, 2009, 3:18pm UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931/1 "2009-04-07T15:18:08Z")

</div>

hi, all.

after installing ruby 1.8.7.p72 successfully, I tried to install  
rubygems.1.3.1.

It seems to be normally installed.

but, when I execute it, the errors is generated.

#\> gem update  
/usr/local/lib/ruby/site\_ruby/1.8/ia64-hpux11.31/zlib.so: dlsym:  
Unknown symbol Init\_zlib - /usr/local/lib/ruby/site\_ruby/1.8/ia64-  
hpux11.31/zlib.so (LoadError)

actually, this is not a error log what I first met.

first error log is “no load error - zlib”.

to resolve this problem, I trace the zlib location ruby wants. the one  
of them is “/usr/local/lib/ruby/site\_ruby/1.8/ia64-hpux11.31” here.

I make a symbolic link by using /usr/local/lib/libz.so.1.2.3 under  
site\_ruby/1.8/ia…

wow. I am still in problems.

this time ruby cannot find “zlib.rb”. I am not sure this is main  
reason gem is failed. but it could be a reason.

the procedure to execute gem binary is extremely hard. :-\<

---

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [April 7, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931/2 "2009-04-07T15:52:10Z")

</div>

this is mkkf.log in ruby1.8.7p72/ext/zlib.

* * *

have\_library: checking for deflateReset() in -lz…  
-------------------- yes

“gcc -o conftest -I…/… -I…/…/. -I…/…/./ext/zlib -  
D\_FILE\_OFFSET\_BITS=64 -g -O2 conftest.c -L. -L…/… -L. -  
lruby-static -lz -lpthread -ldld -ldl -lm -lc”  
conftest.c: In function ‘t’:  
conftest.c:3: error: ‘deflateReset’ undeclared (first use in this  
function)  
conftest.c:3: error: (Each undeclared identifier is reported only once  
conftest.c:3: error: for each function it appears in.)  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { void ((volatile p)()); p = (void (()()))deflateReset;  
return 0; }  
/_ end \*/

“gcc -o conftest -I…/… -I…/…/. -I…/…/./ext/zlib -  
D\_FILE\_OFFSET\_BITS=64 -g -O2 conftest.c -L. -L…/… -L. -  
lruby-static -lz -lpthread -ldld -ldl -lm -lc”  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { deflateReset(); return 0; }  
/_ end \*/

* * *

have\_header: checking for zlib.h… -------------------- yes

“gcc -E -I…/… -I…/…/. -I…/…/./ext/zlib -D\_FILE\_OFFSET\_BITS=64 -  
g -O2 conftest.c -o conftest.i”  
checked program was:  
/\* begin _/  
1: #include \<zlib.h\>  
/_ end \*/

* * *

hmn, could be this a kind of clue ?

1. 
  1. 07, ¿ÀÈÄ 10:16, Jun Y. Kim ÀÛ¼º:

---

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [April 8, 2009, 12:25am UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931/3 "2009-04-08T00:25:27Z")

</div>

On Apr 7, 2009, at 06:50, Jun Y. Kim wrote:

> > first error log is “no load error - zlib”.
> > 
> > to resolve this problem, I trace the zlib location ruby wants. the  
> > one of them is “/usr/local/lib/ruby/site\_ruby/1.8/ia64-hpux11.31”  
> > here.
> > 
> > I make a symbolic link by using /usr/local/lib/libz.so.1.2.3 under  
> > site\_ruby/1.8/ia…

This won’t work as /usr/local/lib/libz.so is not a ruby extension.  
The ruby zlib extensions loads this file.

> -------------------- yes  
> /\* begin _/  
> /_ begin _/  
> D\_FILE\_OFFSET\_BITS=64 -g -O2 conftest.c -o conftest.i"  
> checked program was:  
> /_ begin _/  
> 1: #include \<zlib.h\>  
> /_ end \*/
> 
> * * *
> 
> hmn, could be this a kind of clue ?

These are both ok (in the first instance, deflateReset is probably a  
macro).

Did you get a zlib.so built? In your ruby checkout:

$ find .ext -name “_zlib_”

If you didn’t include your entire mkmf.log

---

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [April 8, 2009, 2:54am UTC](https://www.ruby-forum.com/t/extremely-hard-to-install-rubygems-on-hpux/164931/4 "2009-04-08T02:54:34Z")

</div>

thanks Eric.

you gave me a fantastic bullet to solve problems.

There is also zlib library in .ext/ia64-hpux11.31.

I copied it in to /usr/local/lib/ruby/site\_ruby/1.8/ia64-hpux11.31/.

then I got beautiful gem’s results. 🙂

However, I don’t understand why this zlib library didn’t be copied  
with the other libraries.

1. 
  1. 08, ¿ÀÀü 7:23, Eric H. ÀÛ¼º:
