# \[ruby\_1\_8\] can't grub Digest::SHAxxx on powerpc-darwin

**URL:** <https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225>\
**Category:** Development\
**Created:** [February 11, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225 "2007-02-11T18:21:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sugie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@sugie](https://www.ruby-forum.com/u/sugie)\
**Post date:** [February 11, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225/1 "2007-02-11T18:21:34Z")

</div>

e$B$3$s$P$s$O!#:XF#$H?=$7$^$9!#e(B

# e$B$I$3$KIU$1$h$&$+!"7oL\>$O$I$&$9$Y$-$+$H$+G:$s$@$N$G$9$,!"e(B

# e$B$h$jE,@Z$JJ}?K$,$"$j$^$7$?$i!"65$($F$$$?$@$1$l$P9,$$$G$9e(B

1.8.6e$B$N%j%j!\<%9%9%1%8%e!\<%k$r\<\*$K$7$^$7$F!"5W$7$V$j$Ke(Bruby\_1\_8e$B$re(BMac  
OS X  
e$B$G%S%k%I$7$F$\_$^$7$?!#0J2\<$N$h$&$Ke(Bconfiguree$B$7$?8ee(B

$ …/…/ruby\_1\_8/configure --enable-shared --enable-pthread  
–program-suffix=\_1\_8 --prefix=$HOME --with-readline-dir=$HOME

makee$B$7$^$7$?!#%$%s%9%H!\<%k$^$G$OLdBj$J$/9T$($?$h$&$G$9!#e(B

$ ruby\_1\_8 -v  
ruby 1.8.5 (2007-02-11 patchlevel 5000) [powerpc-darwin8.8.0]

e$B$7$+$7e(Bmake teste$B$OBg\>fIW$@$C$?$N$G$9$,!“e(Bmake  
test-alle$B$,DL$j$^$;$se(B  
e$B$G$7$?!#e(B(e$B$H$$$&$h$j$b!”;O$^$j$^$;$s$G$7$?e(B)

$ make test-all  
./miniruby …/…/ruby\_1\_8/runruby.rb --extout=.ext –  
“…/…/ruby\_1\_8/test/runner.rb” --basedir=“…/…/ruby\_1\_8/test”  
–runner=console  
/svn/ruby/o/ruby\_1\_8/.ext/common/digest.rb:16:in  
`const\_missing’: Digest class not found: Digest::SHA384 (NameError)  
make: \*\*\* [test-all] Error 1

digest.rbe$B=t!9$N=$@5$r;W$$$@$7!“$H$j$”$($:e(BSHA384e$BC1BN$rI\>2A$7$F$\_$?e(B  
e$B$N$G$9$,e(B

$ ruby\_1\_8 -rdigest -e ‘Digest::SHA384’  
/lib/ruby/1.8/digest.rb:15:in `const\_missing’:  
Digest class not found: Digest::SHA256 (NameError)

e$B$H%@%a$G$7$?!#$7$+$be(B

$ ruby\_1\_8 -rdigest -e ‘Digest::SHA256’  
/lib/ruby/1.8/digest.rb:15:in `const\_missing’:  
Digest class not found: Digest::SHA384 (NameError)

e$B$H!"%k!\<%W$7$F$$$k$h$&$JMM;R$G$9!#e(Brequiree$B@h$rJQ$($F$b7k6I$OF1$8$G$7$?!#e(B

$ ruby\_1\_8 -rdigest/sha2 -e ‘Digest::SHA384’  
/lib/ruby/1.8/digest.rb:15:in `const\_missing’:  
Digest class not found: Digest::SHA256 (NameError)

$ ruby\_1\_8 -rdigest/sha2.so -e ‘Digest::SHA384’  
/lib/ruby/1.8/digest.rb:15:in `const\_missing’:  
Digest classs not found: Digest::SHA256 (NameError)

e$B$?$@$J$\<$+!"Dj?t$H$7$FB8:\_$7$F$$$k$h$&$K$O8+$($^$9!#e(B

$ ruby\_1\_8 -rdigest -e ‘p Digest.constants’  
[“SHA256”, “Base”, “SHA512”, “SHA384”, “Instance”, “Class”]

e$B$J$\*2\<$N4D6-$G$O!"e(BDigest::SHA384e$B$NI\>2A$KLdBj$O=P$^$;$s$G$7$?!#e(B

ruby 1.9.0 (2007-02-10 patchlevel 0) [powerpc-darwin8.8.0]  
ruby 1.8.5 (2007-02-11 patchlevel 5000) [i686-linux]  
ruby 1.9.0 (2007-02-10 patchlevel 0) [i686-linux]

- 
  - 

e$BB\>$K$b$$$m$$$m9M$($?$N$G$9$,!"\<+J,$K$O$\*e$2$J$N$GD4$Y$?8B$j$rJs9p$5$;e(B  
e$B$F$$$?$@$-$^$7$?!#e(B

e$B$J$\*\<XB-$+$bCN$l$^$;$s$,!"KNIt$5$s$N%5%$%H$G$bF1$8$3$H$,3NG’$G$-$k$h$&$Ge(B  
e$B$9!#e(B

[http://mput.dip.jp/autobuild/ruby-1.8/latest.html](http://mput.dip.jp/autobuild/ruby-1.8/latest.html)

e$B$5$i$K!“F1MM$H;W$o$l$kLdBj$Oe(Bdigeste$B$N2~=$$,9T$o$l$?e(B2006/10/26e$B0J9\_!”$:$C$He(B  
e$B5/$3$jB3$1$F$$$k$h$&$G$9!#e(B

[http://mput.dip.jp/autobuild/ruby-1.8/summary.html](http://mput.dip.jp/autobuild/ruby-1.8/summary.html)

e$BD9J8$G$9$\_$^$;$s$,!"$h$m$7$/$\*4j$$$$$?$7$^$9!#e(B

---

<div class="post-metadata">

**Author:** ![sugie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@sugie](https://www.ruby-forum.com/u/sugie)\
**Post date:** [February 14, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225/2 "2007-02-14T14:24:27Z")

</div>

e$B!!Js9p$"$j$,$H$&$4$6$$$^$9!#e(B

At Mon, 12 Feb 2007 02:20:49 +0900,  
Tadashi S. wrote:

> $ make test-all  
> ./miniruby …/…/ruby\_1\_8/runruby.rb --extout=.ext –  
> “…/…/ruby\_1\_8/test/runner.rb” --basedir=“…/…/ruby\_1\_8/test”  
> –runner=console  
> /svn/ruby/o/ruby\_1\_8/.ext/common/digest.rb:16:in  
> `const\_missing’: Digest class not found: Digest::SHA384 (NameError)  
> make: \*\*\* [test-all] Error 1

e$B!!%G%P%C%0$7$F$\_$?$s$G$9$,!"e(B const\_missing e$B$K9T$/A0$Ke(B  
rb\_const\_get\_0 → rb\_autoload\_load → Init\_sha2 →   
rb\_define\_class\_under → rb\_const\_get\_0 e$B$H:FF~$7$F$$$k$H$3$m$Ge(B  
method\_missing e$B$KF~$C$F9T$C$F%(%i!\<$H$C$F$7$^$&$h$&$G$9!#e(B  
(Pure Ruby e$B$N%3!\<%I$G$O:F8=$7$J$$LOMMe(B)

> e$B$?$@$J$\<$+!"Dj?t$H$7$FB8:\_$7$F$$$k$h$&$K$O8+$($^$9!#e(B
> 
> $ ruby\_1\_8 -rdigest -e ‘p Digest.constants’  
> [“SHA256”, “Base”, “SHA512”, “SHA384”, “Instance”, “Class”]

e$B!!e(Bautoload e$B$J$N$G!“Dj?t$H$7$FDj5A$5$l$^$9!#FbItE\*$K$OCf?H$Oe(B  
Qundef e$B$G!”;2\>H$5$l$k$H8+$($J$$%$%s%9%?%s%9JQ?te(B **autoload**  
e$B$re(B  
e$B0z$$$Fe(B autoload e$B=hM}$r9T$$!"Dj5A$5$l$?CM$rJV$7$^$9!#e(B

> e$B$J$\*2\<$N4D6-$G$O!"e(BDigest::SHA384e$B$NI\>2A$KLdBj$O=P$^$;$s$G$7$?!#e(B
> 
> ruby 1.9.0 (2007-02-10 patchlevel 0) [powerpc-darwin8.8.0]  
> ruby 1.8.5 (2007-02-11 patchlevel 5000) [i686-linux]  
> ruby 1.9.0 (2007-02-10 patchlevel 0) [i686-linux]

e$B!!$?$^$?$^e(B 1.8.5 on OS X  
e$B$G5/$-$F$$$k$N$+!“$”$k$$$O$?$^$?$^B\>$Ne(B  
e$B4D6-$G5/$-$F$$$J$$$@$1$J$N$+$O$^$@FM$-;\_$a$i$l$F$$$^$;$s!#e(B

e$B!!$H$j$"$($:e(B autoload e$B$r30$92sHr:v$re(B trunk e$B$\*$h$Se(B  
ruby\_1\_8 e$B$Ke(B  
e$BF~$l$^$7$?!#e(B

–  
/  
/\_\_ \_\_ [Akinori.org](http://Akinori.org) / [MUSHA.org](http://MUSHA.org)  
/ ) ) ) ) / [FreeBSD.org](http://FreeBSD.org) / [Ruby-lang.org](http://Ruby-lang.org)  
Akinori MUSHA aka / (\_ / ( (\_\_( @ [iDaemons.org](http://iDaemons.org) / and.or.jp

“Different eyes see different things,  
Different hearts beat on different strings –  
But there are times for you and me when all such things agree”

---

<div class="post-metadata">

**Author:** ![sugie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@sugie](https://www.ruby-forum.com/u/sugie)\
**Post date:** [February 23, 2007, 3:04am UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225/3 "2007-02-23T03:04:20Z")

</div>

e$B@DLZ$G$9!#e(B

On 2007/02/12, at 2:20, Tadashi S. wrote:

> e$B$3$s$P$s$O!#:XF#$H?=$7$^$9!#e(B

> 1.8.6e$B$N%j%j!\<%9%9%1%8%e!\<%k$r\<\*$K$7$^$7$F!"5W$7$V$j$Ke(B  
> ruby\_1\_8e$B$re(BMac OS X  
> e$B$G%S%k%I$7$F$\_$^$7$?!#0J2\<$N$h$&$Ke(Bconfiguree$B$7$?8ee(B

> $ ruby\_1\_8 -rdigest -e ‘Digest::SHA384’  
> /lib/ruby/1.8/digest.rb:15:in `const\_missing’:  
> Digest class not found: Digest::SHA256 (NameError)

dln.c e$B$N%3%s%Q%$%k;~$K!Ve(BNSIsSymbolNameDefined is  
deprecatede$B!We(B  
e$B$H7Y9p$,=P$F$$$^$7$?!#$I$&$be(B dlopen e$B$,;H$o$l$F$J$$$h$&$G$9!#e(B  
dlopen e$B$r;H$&$h$&$KJQ$($?$H$3$m!"85$Ne(B digest.rb e$B$,F0$/$h$&$Ke(B  
e$B$J$j$^$7$?!#e(B

~/c/ruby-1.8 % /usr/local/pkg/ruby-1.8/bin/ruby -v -rdigest -e ‘p  
Digest::SHA384’  
ruby 1.8.6 (2007-02-19 patchlevel 5000) [i686-darwin8.8.3]  
Digest::SHA384

~/c/ruby-1.8 % grep autoload /usr/local/pkg/ruby-1.8/lib/ruby/1.8/  
digest.rb  
autoload “SHA256”, “digest/sha2.so”  
autoload “SHA384”, “digest/sha2.so”  
autoload “SHA512”, “digest/sha2.so”

e$B4D6-$O0J2\<$NDL$j$G$9!#e(B

~/c/ruby-1.8 % uname -srm  
Darwin 8.8.3 i386

e$B;29M$N$?$a%Q%C%A$r$O$j$D$1$F$\*$-$^$9!#e(B

–  
e$B@DLZJvO:e(B

# Index: dln.c

— dln.c (revision 11808)  
+++ dln.c (working copy)  
@@ -81,19 +81,27 @@

# include “macruby\_private.h”

#endif  
+#if defined( **APPLE** ) && defined( **MACH** )  
+# if defined(HAVE\_DLOPEN)  
+# define MACOSX\_DLOPEN  
+#else  
+# define MACOSX\_DYLD  
+# endif  
+#endif  
+  
#ifdef **BEOS**

# include \<image.h\>

#endif  
#ifndef NO\_DLN\_LOAD  
-#if defined(HAVE\_DLOPEN) && !defined(USE\_DLN\_A\_OUT) && !defined  
(\_AIX) && !defined( **APPLE** ) && !defined(\_UNICOSMP)  
+#if defined(HAVE\_DLOPEN) && !defined(USE\_DLN\_A\_OUT) && !defined  
(\_AIX) && !defined(MACOSX\_DYLD) && !defined(\_UNICOSMP)  
/\* dynamic load with dlopen() \*/

# define USE\_DLN\_DLOPEN

#endif  
#ifndef FUNCNAME\_PATTERN  
-# if defined(\_\_hp9000s300) || (defined( **NetBSD** ) && !defined  
( **ELF** )) || defined( **BORLANDC** ) || (defined( **FreeBSD** ) && !  
defined( **ELF** )) || (defined( **OpenBSD** ) && !defined( **ELF** )) ||  
defined(NeXT) || defined( **WATCOMC** ) || defined( **APPLE** )  
+# if defined(\_\_hp9000s300) || (defined( **NetBSD** ) && !defined  
( **ELF** )) || defined( **BORLANDC** ) || (defined( **FreeBSD** ) && !  
defined( **ELF** )) || (defined( **OpenBSD** ) && !defined( **ELF** )) ||  
defined(NeXT) || defined( **WATCOMC** ) || defined(MACOSX\_DYLD)

# define FUNCNAME\_PATTERN “_Init_%s”

# else

# define FUNCNAME\_PATTERN “Init\_%s”

@@ -1141,7 +1149,7 @@  
#endif  
#endif  
#else  
-#ifdef **APPLE**  
+#ifdef MACOSX\_DYLD  
#include \<mach-o/dyld.h\>  
#endif  
#endif  
@@ -1403,7 +1411,7 @@  
}  
#endif /\* \_AIX _/  
-#if defined(NeXT) || defined( **APPLE** )  
+#if defined(NeXT) || defined(MACOSX\_DYLD)  
 #define DLN\_DEFINED  
/_----------------------------------------------------  
By SHIROYAMA Takayuki removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![sugie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@sugie](https://www.ruby-forum.com/u/sugie)\
**Post date:** [February 24, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225/4 "2007-02-24T18:00:52Z")

</div>

e$B$3$s$P$s$O!“:XF#$G$9!#Js9pCY$l$F?=$7Lu$”$j$^$;$s!#e(B

On Wed, 14 Feb 2007 22:24:04 +0900  
“Akinori MUSHA” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> e$B!!%G%P%C%0$7$F$\_$?$s$G$9$,!"e(B const\_missing e$B$K9T$/A0$Ke(B  
> rb\_const\_get\_0 → rb\_autoload\_load → Init\_sha2 →   
> rb\_define\_class\_under → rb\_const\_get\_0 e$B$H:FF~$7$F$$$k$H$3$m$Ge(B  
> method\_missing e$B$KF~$C$F9T$C$F%(%i!\<$H$C$F$7$^$&$h$&$G$9!#e(B  
> (Pure Ruby e$B$N%3!\<%I$G$O:F8=$7$J$$LOMMe(B)  
> (snip)  
> e$B!!e(Bautoload e$B$J$N$G!“Dj?t$H$7$FDj5A$5$l$^$9!#FbItE\*$K$OCf?H$Oe(B  
> Qundef e$B$G!”;2\>H$5$l$k$H8+$($J$$%$%s%9%?%s%9JQ?te(B **autoload** e$B$re(B  
> e$B0z$$$Fe(B autoload e$B=hM}$r9T$$!"Dj5A$5$l$?CM$rJV$7$^$9!#e(B

e$B$J$k$[$I!"$=$N8e%3!\<%I$r:FEY\>/$7FI$\_D\>$7$F!"JY6/$K$J$j$^$7$?!#e(B  
e$B$[$s$H$Oe(Bautorequiree$B$@$H$+!"e(Bautoloade$B@lMQ$Ke(B(e$B8+$($F$O$$$1$J$$e(BQundefe$B4^$ae(B)  
e$BFbIt$GFH\<+$K%F!\<%V%k4IM}$r$d$C$F$k$N$G!“C1=c$Je(B(?)const\_missinge$B$H$Oe(B  
e$B;w$F$k$h$&$K8+$($F$b$d$O$j0c$&$s$@$J$!!”$H$^$G$OM}2r$G$-$^$7$?!#e(B

> e$B!!$H$j$"$($:e(B autoload e$B$r30$92sHr:v$re(B trunk e$B$\*$h$Se(B ruby\_1\_8 e$B$Ke(B  
> e$BF~$l$^$7$?!#e(B

1.8.6-preview1e$B$K2C$(!"@hDxe(Bpreview2e$B$G$b!"e(BDigest::SHA384e$B$NI\>2Ae(B

$ ./ruby-1.8.6 -rdigest -ve ‘p Digest::SHA384’  
ruby 1.8.6 (2007-02-24 patchlevel 0) [powerpc-darwin8.8.0]  
Digest::SHA384

e$B$He(Bmake test-alle$B$^$G$9$Y$FDL$k;v$r3NG’$$$?$7$^$7$?!#e(B  
e$B$I$&$b$"$j$,$H$&$4$6$$$^$7$?!#e(B

---

<div class="post-metadata">

**Author:** ![sugie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@sugie](https://www.ruby-forum.com/u/sugie)\
**Post date:** [February 23, 2007, 3:22am UTC](https://www.ruby-forum.com/t/ruby-1-8-cant-grub-digest-shaxxx-on-powerpc-darwin/85225/5 "2007-02-23T03:22:21Z")

</div>

e$B@DLZ$G$9!#e(B

On 2007/02/23, at 11:03, Minero A. wrote:

> dlopen e$B$r;H$&$h$&$KJQ$($?$H$3$m!"85$Ne(B digest.rb e$B$,F0$/$he(B  
> e$B$&$Ke(B  
> e$B$J$j$^$7$?!#e(B

e$B$"$"!\<!"$3$l$GD\>$k$C$F$N$O13$G$7$?!#85$Ne(B dln.c e$B$G$b%(%i!\<$Ke(B  
e$B$J$j$^$;$s!#$3$J$$$@$O%(%i!\<$K$J$C$F$?$N$K!"$J$s$G=P$J$/e(B  
e$B$J$C$?$s$@$m$&!D!D!#e(B
