Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted Thu October 09, 2025 12:40 AM

    I am upgrading our ruby to the latest version in the toolbox, from 3.3.7 to 3.4.4. 

    We have some ruby gems installed that use "digest/sha1" (even on the latest available gem version):

    require 'digest/sha1'

    On the older ruby version 3.3.7 from the toolbox this works (and the gems that use this also work)

    # ruby -v
    ruby 3.3.7 (2025-01-15 revision be31f993d7) [powerpc-aix7.1.0.0]
    # ruby
    require 'digest/sha1'
    #

    However when upgraded to the latest ruby 3.4.4 version from the toolbox this no longer works. 

    # ruby -v
    ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [powerpc-aix7.1.0.0]
    # ruby
    require 'digest/sha1'
    <internal:/opt/freeware/share/ruby/3.4/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require': rb_digest_wrap_metadata not found (LoadError)
            from <internal:/opt/freeware/share/ruby/3.4/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
            from -:1:in '<main>'
    #

    It probably is not ideal to be using digest/sha1, but it is what the gems we are using require, and it should work? I don't believe the function is deprecated in ruby? 

    Any help appreciated - we can't upgrade to this ruby version right now as the gems we need to install do not work with it.  

    Thanks,

    Alan



    ------------------------------
    Alan
    ------------------------------


  • 2.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted Thu October 09, 2025 08:03 AM

    can you tell me what the output is?  dump -H /path/to/digest.so ? 



    ------------------------------
    Aaron Kramer
    ------------------------------



  • 3.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted Thu October 09, 2025 08:04 AM

    might be a build issue, whats the output for: dump -H /path/to/digest.so ?



    ------------------------------
    Aaron Kramer
    ------------------------------



  • 4.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted Thu October 09, 2025 06:33 PM

    Hi Aaron,

    Thanks for the response. 

    Here is the 32bit and 64bit output (the gems we are running require the 32bit version of ruby, but the errors happen with both 32 and 64bit):

    # dump -H /opt/freeware/lib/ruby/3.4/digest.so
     
    /opt/freeware/lib/ruby/3.4/digest.so:
     
                            ***Loader Section***
                          Loader Header Information
    VERSION#         #SYMtableENT     #RELOCent        LENidSTR
    0x00000001       0x0000003d       0x000000b2       0x0000004f
     
    #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
    0x00000004       0x00000e30       0x00000475       0x00000e7f
     
     
                            ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/freeware/lib:/usr/lib:/lib
    1                                    libruby.so
    2                                    libc.a              shr.o
    3                                    libgcc_s.a          shr.o
    # dump -H -X64 /opt/freeware/lib64/ruby/3.4/digest.so
     
    /opt/freeware/lib64/ruby/3.4/digest.so:
     
                            ***Loader Section***
                          Loader Header Information
    VERSION#         #SYMtableENT     #RELOCent        LENidSTR
    0x00000001       0x0000003d       0x000000b2       0x00000066
     
    #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
    0x00000004       0x00001110       0x00000496       0x00001176
     
     
                            ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
    1                                    libruby.so
    2                                    libc.a              shr_64.o
    3                                    libgcc_s.a          shr.o

    Regards,

    Alan



    ------------------------------
    Alan
    ------------------------------



  • 5.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted 29 days ago

    Any feedback from the IBM team who built the ruby 3.4.4 version whether this change in behaviour is expected on the new version, or if there is a build/packaging issue here?



    ------------------------------
    Alan
    ------------------------------



  • 6.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted 29 days ago

    Hi Alan,

    Thank you for bringing this to our attention. We have successfully reproduced the issue on our system, and we are currently working on identifying and resolving it.





    ------------------------------
    Lakshmi Surekha Kovvuri
    ------------------------------



  • 7.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted 29 days ago

    sha1 use is deprecated - from 2022 NIST Retires SHA-1 Cryptographic Algorithm



    ------------------------------
    Alexander Pettitt
    ------------------------------



  • 8.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted 28 days ago

    Agreed. However ruby has not deprecated support for SHA1 (as far as I am aware), so it should still work. 



    ------------------------------
    Alan
    ------------------------------



  • 9.  RE: Ruby 3.4.4 in the toolbox no longer works with digest/sha1

    Posted 28 days ago

    Yes, but if every time something is deprecated you remove support from tooling, you're forcing everybody to stop updating/upgrading/improving.

    I've seen way too many machines stuck in the past (e.g. 1990's) due to removal of algorithms from the code, those machines could still be current if the code was there, just disabled by default.



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------