Problem installing 1.6.8 on OS X 10.2

Whoops, I get:

bash-2.05a$ ls -dF /Library/Receipts/BSD*.pkg
/Library/Receipts/BSD.pkg/

      cc:
      bcc:
Mark Wilson <mwilson13@cox.net>

06/24/2003 10:36 PM AST
            <font size=-1></font>

Have you tried the following (from the Ruby Cocoa page)

The required packages (BSD.pkg and BSDSDK.pkg) may not have been
installed, depending on the options selected when Mac OS X 10.2 was
installed. Please first check whether Ruby is installed, and if
required, install it from the Mac OS X 10.2 installer.

Enter this at your terminal prompt:

$ ls -dF /Library/Receipts/BSD*.pkg

and see if you get this:

/Library/Receipts/BSD.pkg/ /Library/Receipts/BSDSDK.pkg/

[snip]

Am I correct that in the statement CFLAGS='-g -o2 -fno-common'
./configure, that the -o2 is l.c. o (not zero)? [snip]

Yes. the l.c. o stands for the optimization level attempted by the
compiler.

A few questions.

Are you using fink? If so, have you recently updated it? If so, have
you tried to install Ruby 1.6.7 through fink?

Are you using another package distribution system (like darwin ports or
others)?

What version of Mac OS X are you using?

What is the output when you run `uname -a'?

What do you see when you run `which gcc', `which ranlib', `which make'?
All of these should be in `/usr/bin/'.

Have you tried to install Ruby 1.8 preview 3?

Are you the administrator of the computer?

I don't remember whether you need to remove the old developer tools
before installing the updated ones, but I recommend just following the
instructions on the Apple site.

Regards,

Mark Wilson

···

To: Gary.Palmer@ccmail.nevada.edu
      Subject: Re: problem installing 1.6.8 on OS X 10.2
On Tuesday, June 24, 2003, at 09:58 PM, Gary.Palmer@ccmail.nevada.edu wrote:

bash-2.05a$ make
gcc -g -O2 -pipe -I. -I. -c array.c
gcc -g -O2 -pipe -I. -I. -c bignum.c
gcc -g -O2 -pipe -I. -I. -c class.c
gcc -g -O2 -pipe -I. -I. -c compar.c
gcc -g -O2 -pipe -I. -I. -c dir.c
gcc -g -O2 -pipe -I. -I. -c dln.c
gcc -g -O2 -pipe -I. -I. -c enum.c
gcc -g -O2 -pipe -I. -I. -c error.c
gcc -g -O2 -pipe -I. -I. -c eval.c
gcc -g -O2 -pipe -I. -I. -c file.c
gcc -g -O2 -pipe -I. -I. -c gc.c
gcc -g -O2 -pipe -I. -I. -c hash.c
gcc -g -O2 -pipe -I. -I. -c inits.c
gcc -g -O2 -pipe -I. -I. -c io.c
gcc -g -O2 -pipe -I. -I. -c marshal.c
gcc -g -O2 -pipe -I. -I. -c math.c
gcc -g -O2 -pipe -I. -I. -c numeric.c
gcc -g -O2 -pipe -I. -I. -c object.c
gcc -g -O2 -pipe -I. -I. -c pack.c
gcc -g -O2 -pipe -I. -I. -c parse.c
gcc -g -O2 -pipe -I. -I. -c process.c
gcc -g -O2 -pipe -I. -I. -c prec.c
gcc -g -O2 -pipe -I. -I. -c random.c
gcc -g -O2 -pipe -I. -I. -c range.c
gcc -g -O2 -pipe -I. -I. -c re.c
gcc -g -O2 -pipe -I. -I. -c regex.c
gcc -g -O2 -pipe -I. -I. -c ruby.c
gcc -g -O2 -pipe -I. -I. -c signal.c
gcc -g -O2 -pipe -I. -I. -c sprintf.c
gcc -g -O2 -pipe -I. -I. -c st.c
gcc -g -O2 -pipe -I. -I. -c string.c
gcc -g -O2 -pipe -I. -I. -c struct.c
gcc -g -O2 -pipe -I. -I. -c time.c
gcc -g -O2 -pipe -I. -I. -c util.c
gcc -g -O2 -pipe -I. -I. -c variable.c
gcc -g -O2 -pipe -I. -I. -c version.c
gcc -g -O2 -pipe -I. -I. -c dmyext.c
ar rcu libruby.a array.o bignum.o class.o compar.o dir.o dln.o enum.o
error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o
numeric.o
object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o
ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o
variable.o
version.o dmyext.o
gcc -g -O2 -pipe -I. -I. -c main.c
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
bash-2.05a$ 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
bash-2.05a$ ranlib 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
bash-2.05a$ sudo make install
Password:
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
bash-2.05a$ sudo ranlib /usr/local/lib/library-static.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 B. Palmer

      To: ruby-talk@ruby-lang.org
      cc: Gary.Palmer <gary.palmer@ccmail.nevada.edu>
      bcc:
      Subject: Re: problem installing 1.6.8 on OS X 10.2
Mark Wilson <mwilson13@cox.net>

06/24/2003 12:33 AM AST
            <font size=-1></font>

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]

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):

1. make sure you have the most recent Apple Developer Tools (I think
the last update was December 2002).

2. delete /usr/local/lib/ruby and usr/local/bin/ruby.

3. delete the extracted ruby folder.

4. use the bash shell (type bash at your terminal prompt).

5. run the following on the ruby tarball:

gtar -zxf ruby-1.6.8.tar.gz

Don't use stuff-it.

6. 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

I no longer remember how to do this, but I think the Apple site has
instructions on how to put the second BSD package on your system.

···

On Wednesday, June 25, 2003, at 12:37 AM, Gary.Palmer@ccmail.nevada.edu wrote:

Whoops, I get:

bash-2.05a$ ls -dF /Library/Receipts/BSD*.pkg
/Library/Receipts/BSD.pkg/

[snip]