zlib.so Problem on MIPS target platform.

C

craigslist

Hi

You'll have to forgive me if I miss some obvious details, as I've
never actually programmed in ruby. I've been tasked to install ruby
and supporting applications, gems, etc.

I've built an embedded linux system cross-compiled on the MIPS
platform. I'm currently in the process of getting ruby installed and
running. My build platform is Redhat FC4. Target platform is the
2.6.10 kernel on MIPS AU1000 processor (Little Endian).

Using the following:

ruby-1.8.4
rubygems-0.9.0
sqlite-2.8.17
sqlite-ruby-2.2.3
zlib-1.2.1

Due to filesystem space limits, all apps are currently compiled
against uClibc, rather than libc as is normally found on most systems.

Ruby is installed and running on the target. Sqlite is also
installed. Sqlite-ruby is also installed. I'm now attempting to
install rubygems, and subsequently, install other gems such as rake,
mongrel, etc.

Now, here's my problem, ruby is using zlib when working with the
gems. I have been unsuccessful so far, to get rubygems installed
correctly due to the zlib.so file. I receive the following error
message when installing rubygems, or any gem.

........................................................................
..........................................
As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a
while)...
...done.
No library stubs found.

/usr/local/lib/ruby/1.8/mipsel-linux/zlib.so: Unable to resolve
symbol - /usr/local/lib/ruby/1.8)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:7
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:93:in
`manage_gems'
from /home/maccontrol/rubygems-0.9.0/./post-install.rb:70:in
`install_sources'
from /home/maccontrol/rubygems-0.9.0/./post-install.rb:81:in
`try_run_hook'
from setup.rb:577:in `run_hook'
from setup.rb:1315:in `exec_task_traverse'
from setup.rb:1168:in `exec_install'
from setup.rb:887:in `exec_install'
from setup.rb:710:in `invoke'
from setup.rb:674:in `invoke'
from setup.rb:1352
........................................................................
..............................................

Unable to resolve symbol. Ok, that leads me to believe there is a
problem with the library i just built from zlib-1.2.1. I have
installed libz.so.1.2.1. Checking the dependencies on libz.so.1.2.1,
i can see that all required dependencies are available and it is
properly linked to uclibc. Included in the zlib-1.2.1 package are two
test applications, minigzip and example. Both test apps run perfectly
on the target platform with the newly created libz.so.1.2.1 library.
So it seems that the library is functioning correctly and ruby is
able to FIND the library. But it fails to load within ruby.

I have also attempted to compile (rather than libz.so.1.2.1), the
zlib source included with ruby (ext/zlib), as well as ruby-
zlib-0.6.0. Neither of these two options have successfully cross-
compiled against mipsel-uclibc to generate a working libz.so. And
from what i understand....ruby-1.6.(something) and later does not
require, or use its own zlib object, but rather uses the one
installed on the system.?.?.

So anyway, back to the original problem...."Unable to resolve
symbol". I can't seem to find a problem with the library, yet ruby
does not like it. Is there any way to gather more information from
ruby concerning this error? Anyone have suggestions as to what might
be causing this problem? Can i create a small test app to load the
library exactly the same way as ruby does, and perhaps pull a little
more error information?

I'm also able to produce the error on the target simply by using irb
and giving it the command
require 'zlib'

Again, "Unable to resolve symbol".

Any info someone can provide regarding zlib.so and ruby would be
appreciated.

Thanks

Stefan Willmert
 
A

Aredridel

--=-1BlgK5BqUQPsbufhW96V
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Unable to resolve symbol. Ok, that leads me to believe there is a =20
problem with the library i just built from zlib-1.2.1. I have =20
installed libz.so.1.2.1. Checking the dependencies on libz.so.1.2.1, =20
i can see that all required dependencies are available and it is =20
properly linked to uclibc. Included in the zlib-1.2.1 package are two =20
test applications, minigzip and example. Both test apps run perfectly =20
on the target platform with the newly created libz.so.1.2.1 library. =20
So it seems that the library is functioning correctly and ruby is =20
able to FIND the library. But it fails to load within ruby.

Do note that zlib.so is the ruby extension, but libz.so.foo is the zlib
library. They're not the same thing. Sounds like you have a zlib.so
linked against another libz, but that's a guess.

Aria

--=-1BlgK5BqUQPsbufhW96V
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFPrTZtP09exA3hooRAq3QAKC/UL454PCdisAyi5MDbzOpVC1nmwCg6mdH
mbJePmLOrAjM0E0kBWXVW2Q=
=/wTr
-----END PGP SIGNATURE-----

--=-1BlgK5BqUQPsbufhW96V--
 
C

craigslist

Do note that zlib.so is the ruby extension, but libz.so.foo is the
zlib
library. They're not the same thing. Sounds like you have a zlib.so
linked against another libz, but that's a guess.

Aria

so...zlib.so extension IS required by ruby? I thought I had read
somewhere that the zlib.so extension was deprecated after 1.6.
(something). And I could simply use the libz.so from the system.

Currently, I simply have ln -s /usr/lib/libz.so.1.2.1 /usr/local/lib/
ruby/1.8/mipsel-linux/zlib.so .... so, just a link to the systems
libz. Is that the problem? And if so...does it matter whether i use
the included ruby/ext/zlib or the ruby-zlib-0.6.0 package? Are they
the same thing? (Besides the fact that I can't seem to get either to
cross compile correctly without some major tweaking).

Stefan Willmert
 
A

Aredridel

--=-iSnXHjevnrlgTJsBlR41
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
so...zlib.so extension IS required by ruby? I thought I had read =20
somewhere that the zlib.so extension was deprecated after 1.6.=20
(something). And I could simply use the libz.so from the system.
=20
Currently, I simply have ln -s /usr/lib/libz.so.1.2.1 /usr/local/lib/=20
ruby/1.8/mipsel-linux/zlib.so .... so, just a link to the systems =20
libz. Is that the problem? And if so...does it matter whether i use =20
the included ruby/ext/zlib or the ruby-zlib-0.6.0 package? Are they =20
the same thing? (Besides the fact that I can't seem to get either to =20
cross compile correctly without some major tweaking).

It is -- you don't need an externally supplied zlib.so, hence the
obsolescence of that package, but it is included in ruby 1.8:

aredridel@arcturus:~$ ls /usr/lib/ruby/1.8/i686-linux/zlib.so=20
/usr/lib/ruby/1.8/i686-linux/zlib.so

Aria

--=-iSnXHjevnrlgTJsBlR41
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFPsWTtP09exA3hooRAq+OAJ9PgsWlaHwzdgxzUewOGyCsQF3eaACg3MHB
08hGhcnoD6M/kGHgpJG5WvI=
=ZP2H
-----END PGP SIGNATURE-----

--=-iSnXHjevnrlgTJsBlR41--
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top