I’m not a UNIX whiz, but I’m trying to learn how to do these things
myself so I can stay current. I downloaded ruby 1.6.8, untarred it, ran
configure, make and make test, which failed. I tried ranlib libruby.a
and make test again, with the same result. Here is some of the recent
history of that effort. Any ideas on where to go from here?
PALMERS:~/src/ruby-1.6.8] gary% make
gcc -g -O2 -pipe main.o dmyext.o libruby.a -lobjc -o miniruby
ld: archive: libruby.a has no table of contents, add one with ranlib(1)
(can’t load from it)
make: *** [miniruby] Error 1
[PALMERS:~/src/ruby-1.6.8] gary% make test
gcc -g -O2 -pipe main.o dmyext.o libruby.a -lobjc -o miniruby
ld: archive: libruby.a has no table of contents, add one with ranlib(1)
(can’t load from it)
make: *** [miniruby] Error 1
[PALMERS:~/src/ruby-1.6.8] gary% locate libruby.a
/usr/local/lib/ruby/1.6/powerpc-darwin1.3.7/libruby.a
[PALMERS:~/src/ruby-1.6.8] gary% ranlib
/usr/local/lib/ruby/1.6/powerpc-darwin1.3.7/libruby.a
dyld: ranlib Undefined symbols:
ranlib undefined reference to ___keymgr_dwarf2_register_sectiyns
expected to be defined in /usr/lib/libSystem.B.dylib
ranlib undefined reference to elf expected to be defined in
/usr/lib/libSystem.B.dylib
ranlib undefined reference to Zstrlen expected to be defined in
/usr/lib/libSystem.B.dylib
Trace/BPT trap
Gary Palmer
I’ve never seen that before. I think you have to start over from the
beginning on this one.
I would recommend the following (not all of these are likely to be
necessary, but they help control the environment):
-
make sure you have the most recent Apple Developer Tools (I think
the last update was December 2002).
-
delete /usr/local/lib/ruby and usr/local/bin/ruby.
-
delete the extracted ruby folder.
-
use the bash shell (type bash at your terminal prompt).
-
run the following on the ruby tarball:
gtar -zxf ruby-1.6.8.tar.gz
Don’t use stuff-it.
- next do the following:
cd ruby-1.6.8/
CFLAGS=‘-g -O2 -fno-common’ ./configure
make
make test
sudo make install
sudo ranlib /usr/local/lib/libruby-static.a
Some of the above advice comes from this page:
http://www.imasy.or.jp/~hisa/mac/rubycocoa/build.en.html
Regards,
Mark Wilson
···
On Monday, June 23, 2003, at 09:17 PM, Gary.Palmer wrote:
[snip]
PALMERS:~/src/ruby-1.6.8] gary% make
gcc -g -O2 -pipe main.o dmyext.o libruby.a -lobjc -o miniruby
ld: archive: libruby.a has no table of contents, add one with
ranlib(1) (can’t load from it)
make: *** [miniruby] Error 1
[PALMERS:~/src/ruby-1.6.8] gary% make test
gcc -g -O2 -pipe main.o dmyext.o libruby.a -lobjc -o miniruby
ld: archive: libruby.a has no table of contents, add one with
ranlib(1) (can’t load from it)
make: *** [miniruby] Error 1
[PALMERS:~/src/ruby-1.6.8] gary% locate libruby.a
/usr/local/lib/ruby/1.6/powerpc-darwin1.3.7/libruby.a
[PALMERS:~/src/ruby-1.6.8] gary% ranlib
/usr/local/lib/ruby/1.6/powerpc-darwin1.3.7/libruby.a
dyld: ranlib Undefined symbols:
ranlib undefined reference to ___keymgr_dwarf2_register_sectiyns
expected to be defined in /usr/lib/libSystem.B.dylib
ranlib undefined reference to elf expected to be defined in
/usr/lib/libSystem.B.dylib
ranlib undefined reference to Zstrlen expected to be defined in
/usr/lib/libSystem.B.dylib
Trace/BPT trap
[snip]