[OpenWrt-Tickets] [OpenWrt] #2630: ruby digest patch

OpenWrt openwrt-devel at lists.openwrt.org
Fri Nov 2 15:35:54 CET 2007


#2630: ruby digest patch
---------------------------------+------------------------------------------
 Reporter:  do5mc                |        Owner:  developers
     Type:  enhancement          |       Status:  new       
 Priority:  normal               |    Milestone:  Kamikaze  
Component:  packages             |   Resolution:            
 Keywords:  ruby digest package  |  
---------------------------------+------------------------------------------
Comment (by b.candler at pobox.com):

 strace shows it's trying to load libcrypto, which is part of openssl. This
 is because it's linked in:

 {{{
 $ find ext/digest -name Makefile | xargs grep crypto
 ext/digest/md5/Makefile:LIBS = $(LIBRUBYARG_SHARED) -lcrypto  -ldl -lcrypt
 -lm  -lc
 ext/digest/sha1/Makefile:LIBS = $(LIBRUBYARG_SHARED) -lcrypto  -ldl
 -lcrypt -lm   -lc
 ext/digest/rmd160/Makefile:LIBS = $(LIBRUBYARG_SHARED) -lcrypto  -ldl
 -lcrypt -lm   -lc
 }}}

 If you look at ext/digest/md5/extconf.rb :

 {{{
 if !with_config("bundled-md5") &&
     have_library("crypto") && have_header("openssl/md5.h")
   $objs << "md5ossl.#{$OBJEXT}"

 else
   $objs << "md5.#{$OBJEXT}"
 end
 }}}

 similarly in ext/digest/sha1/extconf.rb, ext/digest/rmd160/extconf.rb

 So as far as I can tell, you would at least need to add the following to
 CONFIGURE_ARGS
 {{{
         --with-bundled-md5 \
         --with-bundled-sha1 \
         --with-bundled-rmd160 \
 }}}

 and there might be other extconf.rb changes to prevent openssl being
 linked. (Alternatively, you could just build ruby inside an OpenWrt
 buildroot which doesn't have libopenssl present)

 Note: if you achieve this, i.e. being able to use digests without openssl,
 the downside would be a *larger* overall flash usage for those people who
 already have libopenssl installed for other reasons :-( But I don't
 suppose it would be that much.

-- 
Ticket URL: <https://dev.openwrt.org/ticket/2630#comment:2>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology


More information about the openwrt-tickets mailing list