could not compile dependency :salty, “mix compile” failed

…衆ロ難τιáo~ 提交于 2021-01-28 11:54:09

问题


I am compiling my application with mix compile and there an error is occurring for the dependency salty.

I have already added the dependency salty and libsodium. But still error is not resolved.

this is my mix.exs file with all the dependencies.

defp deps do
    [
      {:poison, "~> 3.0", override: true},
      {:syndicate, in_umbrella: true},
      {:xarango, "~> 0.7.0"},
      {:ecto, "~> 3.1"},
      {:phoenix, "~> 1.4.0"},
      {:gettext, "~> 0.11"},
      {:cowboy, "~> 2.6"},
      {:joken, "~> 2.0"},
      {:ecto_sql, "~> 3.0"},
      {:jason, "~> 1.0"},
      {:postgrex, ">= 0.0.0"},
      {:sage, "~> 0.4.0"},
      {:salty, "~> 0.1.3", hex: :libsalty},
      {:libsodium, "~> 0.0.10"}
    ]
  end

it should compile perfectly but it is throwing an error

 SALTY_CONST_INT64(box_curve25519xchacha20poly1305_SEEDBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_ABYTES’:
src/salty_nif.c:632:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_ABYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_NPUBBYTES’:
src/salty_nif.c:631:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_NPUBBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_NSECBYTES’:
src/salty_nif.c:630:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_NSECBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_KEYBYTES’:
src/salty_nif.c:629:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_KEYBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_ABYTES’:
src/salty_nif.c:578:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_ABYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_NPUBBYTES’:
src/salty_nif.c:577:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_NPUBBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_NSECBYTES’:
src/salty_nif.c:576:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_NSECBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_KEYBYTES’:
src/salty_nif.c:575:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_KEYBYTES);
 ^
Makefile:37: recipe for target 'priv/salty_nif.so' failed
make: *** [priv/salty_nif.so] Error 1
 SALTY_CONST_INT64(box_curve25519xchacha20poly1305_SEEDBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_ABYTES’:
src/salty_nif.c:632:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_ABYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_NPUBBYTES’:
src/salty_nif.c:631:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_NPUBBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_NSECBYTES’:
src/salty_nif.c:630:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_NSECBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_xchacha20poly1305_ietf_KEYBYTES’:
src/salty_nif.c:629:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_xchacha20poly1305_ietf_KEYBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_ABYTES’:
src/salty_nif.c:578:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_ABYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_NPUBBYTES’:
src/salty_nif.c:577:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_NPUBBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_NSECBYTES’:
src/salty_nif.c:576:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_NSECBYTES);
 ^
src/salty_nif.c: In function ‘salty_aead_chacha20poly1305_ietf_KEYBYTES’:
src/salty_nif.c:575:1: warning: control reaches end of non-void function [-Wreturn-type]
 SALTY_CONST_INT64(aead_chacha20poly1305_ietf_KEYBYTES);
 ^
Makefile:37: recipe for target 'priv/salty_nif.so' failed
make: *** [priv/salty_nif.so] Error 1

could not compile dependency :salty, "mix compile" failed. You can recompile this dependency with "mix deps.compile salty", update it with "mix deps.update salty" or clean it with "mix deps.clean salty"
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

回答1:


As noted in the comments to question, installing libsodium 1.0.12+ addresses the issue.



来源:https://stackoverflow.com/questions/56661363/could-not-compile-dependency-salty-mix-compile-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!