digest icon indicating copy to clipboard operation
digest copied to clipboard

Digests not initialized properly with digest/3.2.1 on ruby/3.4.7 and macOS 15...

Open hoyhoy opened this issue 3 months ago • 0 comments

If I use the default digest from ruby/3.4.7, all the digests work. But I had digest in my Gemfile, bundler updated it and all of the hexdigest failed...

Digest::SHA512::metadata is not initialized properly Digest::SHA384::metadata is not initialized properly Digest::SHA256::metadata is not initialized properly Digest::MD5::metadata is not initialized properly Digest::SHA1::metadata is not initialized properly

I tried the following...

export OPENSSL_LIBS=-L/opt/openssl-3.6.0/lib -lssl -lcrypto
export OPENSSL_PREFIX=/opt/openssl-3.6.0
export OPENSSL_INCLUDE_DIR=/opt/openssl-3.6.0/include
export OPENSSLDIR=/opt/openssl-3.6.0
export OPENSSL_ROOT_DIR=/opt/openssl-3.6.0
export OPENSSL_CFLAGS=-I/opt/openssl-3.6.0/include
export OPENSSL_LIB_DIR=/opt/openssl-3.6.0/lib

export CFLAGS=-I/opt/include -mmacosx-version-min=15.7  -I/opt/openssl-3.6.0/include
export LDFLAGS=-L/opt/lib -Wl,-rpath,/opt/lib  -mmacosx-version-min=15.7 -L/opt/openssl-3.6.0/lib

gem install digest --platform=ruby --verbose -- --without-common-digest

and...

gem install digest --platform=ruby --verbose -- --with-bundled-sha2 --with-bundled-sha1 --with-bundled-rmd160 --with-bundled-md5 --without-common-digest

But I still get Digest::SHA256::metadata is not initialized properly. If I gem uninstall digest, everything works with ruby 3.4.7's default digest.

hoyhoy avatar Nov 02 '25 18:11 hoyhoy