extremely hard to install rubygems on hpux

J

Jun Young Kim

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. :-<
 
J

Jun Young Kim

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

-------------------------------------

have_library: checking for deflateReset() in -lz... =20
-------------------- yes

"gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -=20
D_FILE_OFFSET_BITS=3D64 -g -O2 conftest.c -L. -L../.. -L. -=20
lruby-static -lz -lpthread -ldld -ldl -lm -lc"
conftest.c: In function 't':
conftest.c:3: error: 'deflateReset' undeclared (first use in this =20
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 =3D (void ((*)()))deflateReset; =20=

return 0; }
/* end */

"gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -=20
D_FILE_OFFSET_BITS=3D64 -g -O2 conftest.c -L. -L../.. -L. -=20
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=3D64 =
-=20
g -O2 conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <zlib.h>
/* end */

--------------------


hmn, could be this a kind of clue ?


2009. 04. 07, =BF=C0=C8=C4 10:16, Jun Young Kim =C0=DB=BC=BA:
 
E

Eric Hodel

2009. 04. 07, =BF=C0=C8=C4 10:16, Jun Young Kim =C0=DB=BC=BA:

This won't work as /usr/local/lib/libz.so is not a ruby extension. =20
The ruby zlib extensions loads this file.
this is mkkf.log in ruby1.8.7p72/ext/zlib.

-------------------------------------

have_library: checking for deflateReset() in -lz... =20
-------------------- yes

"gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -=20
D_FILE_OFFSET_BITS=3D64 -g -O2 conftest.c -L. -L../.. -L. -=20=
lruby-static -lz -lpthread -ldld -ldl -lm -lc"
conftest.c: In function 't':
conftest.c:3: error: 'deflateReset' undeclared (first use in this =20
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 =3D (void ((*)()))deflateReset; = =20
return 0; }
/* end */

"gcc -o conftest -I../.. -I../../. -I../.././ext/zlib -=20
D_FILE_OFFSET_BITS=3D64 -g -O2 conftest.c -L. -L../.. -L. -=20=
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 -=20
D_FILE_OFFSET_BITS=3D64 -g -O2 conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <zlib.h>
/* end */

These are both ok (in the first instance, deflateReset is probably a =20
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
 
J

Jun Young Kim

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 =20
with the other libraries.


2009. 04. 08, =BF=C0=C0=FC 7:23, Eric Hodel =C0=DB=BC=BA:
This won't work as /usr/local/lib/libz.so is not a ruby extension. =20=
 

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,772
Messages
2,569,593
Members
45,109
Latest member
JanieMalco
Top