Skip to content

(UndefinedFunctionError) function :crypto.hash/2 is undefined (module :crypto is not available) #8134

Open
@psumbera

Description

@psumbera

I have working combination of Erlang OTP 24.2 / Elixir 1.12.1 / Hex 1.0.1 / Rabbitmq 3.8.35 .

I'm trying to update just Erlang to version 24.3.4.16 to get some fixes.

When I try to rebuild with it Rabbitmq I get following error:

Unchanged:
  csv 2.4.1
  json 1.4.1
  observer_cli 1.7.3
  parallel_stream 1.0.6
  recon 2.5.2
  stdout_formatter 0.2.4
* Getting json (Hex package)

08:48:52.986 [error] Unable to load crypto library. Failed with error:
":load, Library load-call unsuccessful (226)."


08:48:53.009 [warn]  The on_load function for module crypto returned:
{:error, {:load, 'Library load-call unsuccessful (226).'}}

** (UndefinedFunctionError) function :crypto.hash/2 is undefined (module :crypto is not available)
    (crypto 5.0.6.4) :crypto.hash(:sha256, <<86, 69, 82, 83, 73, 79, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, )
    (hex 1.0.1) src/mix_hex_tarball.erl:153: :mix_hex_tarball.unpack/3
    (hex 1.0.1) lib/hex/tar.ex:36: Hex.Tar.unpack!/2
    (hex 1.0.1) lib/hex/scm.ex:165: Hex.SCM.update/1
    (hex 1.0.1) lib/hex/scm.ex:231: Hex.SCM.checkout/1
    (mix 1.12.1) lib/mix/dep/fetcher.ex:64: Mix.Dep.Fetcher.do_fetch/3
    (mix 1.12.1) lib/mix/dep/converger.ex:190: Mix.Dep.Converger.all/9
    (mix 1.12.1) lib/mix/dep/converger.ex:123: Mix.Dep.Converger.all/7

When I copy old crypto.so from Erlang 24.2 to 24.3.4.16 installatiion, Rabbitmq builds just fine.

I wonder what was the change which is causing the issue and how to avoid it?

Note in both cases I do use OpenSSL 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue is reported as a bughelp wantedIssue not worked on by OTP; help wanted from the communityteam:VMAssigned to OTP team VM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions