Need for speed -> a C extension?

> Your Ruby was compiled under 10.7 or 10.6?

I keep a log of the ruby compile. It looks like it was build under
10.6.0. The Mac OS here is 10.6.7 (there is no 10.7 out yet).

Oh, okay. I wanted to check since your uname above said "10.7.0".

Is there a better place for this "bug report" than this thread?

Ruby Issue Tracking System: http://redmine.ruby-lang.org/

I'm not sure about RubyInline

Can you run your test script with "ruby -d"?

Also, can you just try "require 'digest/md5'" in irb?

···

Martin Hansen <mail@maasha.dk> wrote:

unknown wrote in post #994006:

Ruby Issue Tracking System: http://redmine.ruby-lang.org/

I'm not sure about RubyInline

Can you run your test script with "ruby -d"?

$ ruby -d j.rb ->

http://pastie.org/1815275

Also, can you just try "require 'digest/md5'" in irb?

irb(main):001:0> require 'digest/md5'
ArgumentError: undefined class/module Digest::Base
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from (irb):1
        from /Users/maasha/maasha_install/bin/irb:12:in `<main>'

M

···

--
Posted via http://www.ruby-forum.com/\.

$ ruby -d j.rb ->

http://pastie.org/1815275

"Exception `ArgumentError' at
/Users/maasha/maasha_install/lib/ruby/1.9.1/x86_64-darwin10.6.0/digest/md5.bundle
- undefined class/module Digest::Base"

Also, can you just try "require 'digest/md5'" in irb?

irb(main):001:0> require 'digest/md5'
ArgumentError: undefined class/module Digest::Base
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from /Users/maasha/maasha_install/bin/irb:12:in `<main>'

Okay, so the issue is in your ruby not RubyInline.

I updated my machine to 10.6.7 (uname: 10.7.0 :slight_smile: and my previously
compiled 1.9.2 still works correctly. Can you try to install a fresh
build in another prefix (by hand, RVM, or homebrew) and see if the
same behavior is still present?

Thanks.

···

On Wed, Apr 20, 2011 at 8:55 AM, Martin Hansen <mail@maasha.dk> wrote:

Okay, so the issue is in your ruby not RubyInline.

I updated my machine to 10.6.7 (uname: 10.7.0 :slight_smile: and my previously
compiled 1.9.2 still works correctly. Can you try to install a fresh
build in another prefix (by hand, RVM, or homebrew) and see if the
same behavior is still present?

Thanks.

I reverted to ruby 1.9.1p129

gem install RubyInline
ERROR: While executing gem ... (ArgumentError)
    undefined class/module Digest::Base

This happens on both Mac and Linux

Darwin mel.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 i386

Linux bixeonws 2.6.32-30-server #59-Ubuntu SMP Tue Mar 1 22:46:09 UTC
2011 x86_64 GNU/Linux

What is this Digest::Base anyway? Can we have it shot and killed?

Martin

···

--
Posted via http://www.ruby-forum.com/\.

http://www.ruby-doc.org/stdlib/libdoc/digest/rdoc/classes/Digest/Base.html

If you still have the log for your Ruby compile lying around (and the
config file ./configure has generated), you could grep for OpenSSL
errors (that's what Ruby uses for SSL and, I think, crypto in
general).

···

On Wed, Apr 20, 2011 at 5:18 PM, Martin Hansen <mail@maasha.dk> wrote:

What is this Digest::Base anyway? Can we have it shot and killed?

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

I reverted to ruby 1.9.1p129

gem install RubyInline
ERROR: While executing gem ... (ArgumentError)
undefined class/module Digest::Base

This happens on both Mac and Linux

Darwin mel.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 i386

Linux bixeonws 2.6.32-30-server #59-Ubuntu SMP Tue Mar 1 22:46:09 UTC
2011 x86_64 GNU/Linux

What is this Digest::Base anyway?

"This abstract class provides a common interface to message digest
implementation classes written in C." Maybe both machines are missing
something so it didn't compile properly?

Can we have it shot and killed?

I don't think so :slight_smile:

···

Martin Hansen <mail@maasha.dk> wrote:

$ cd ext/digest/
$ make
make: Nothing to be done for `all'.

$ make clean
$ make all
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include
-I../.././ext/digest -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -O3 -ggdb
-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith
-Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC
-o digest.o -c digest.c
gcc -shared -o ../../.ext/x86_64-linux/digest.so digest.o -L. -L../..
-L. -rdynamic -Wl,-export-dynamic -Wl,-R
-Wl,/nas/fs/users/cameron/unix/.rvm/rubies/ruby-1.9.2-p180/lib
-L/nas/fs/users/cameron/unix/.rvm/rubies/ruby-1.9.2-p180/lib -lruby
-lpthread -lrt -ldl -lcrypt -lm -lc
cp ../.././ext/digest/lib/digest/hmac.rb ../../.ext/common/digest
cp ../.././ext/digest/lib/digest.rb ../../.ext/common
cp ../.././ext/digest/digest.h ../../.ext/include/ruby

(Linux 2.6.32-71.24.1.el6.x86_64)

···

On Wed, Apr 20, 2011 at 11:34 AM, <brabuhr@gmail.com> wrote:

What is this Digest::Base anyway?

"This abstract class provides a common interface to message digest
implementation classes written in C." Maybe both machines are missing
something so it didn't compile properly?

I just remembered something I heard on IRC the other night, that Ruby
1.9 sometimes has a problem with MacPorts's OpenSSL. I don't know the
details, but that might be something to consider, if you Martin is
using MacPorts.

MacPorts ticket: <https://trac.macports.org/ticket/28582&gt;

···

On Wed, Apr 20, 2011 at 10:24 AM, Phillip Gawlowski <cmdjackryan@googlemail.com> wrote:

On Wed, Apr 20, 2011 at 5:18 PM, Martin Hansen <mail@maasha.dk> wrote:

What is this Digest::Base anyway? Can we have it shot and killed?

http://www.ruby-doc.org/stdlib/libdoc/digest/rdoc/classes/Digest/Base.html

If you still have the log for your Ruby compile lying around (and the
config file ./configure has generated), you could grep for OpenSSL
errors (that's what Ruby uses for SSL and, I think, crypto in
general).