无法编译依赖项:咸,“混合编译”失败

时间:2019-06-19 06:30:26

标签: erlang elixir phoenix-framework libsodium

我正在使用mix compile编译应用程序,并且依赖项salty发生错误。

我已经添加了依赖项saltylibsodium。 但是错误仍然无法解决。

这是我的mix.exs文件,具有所有依赖性。

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

应该可以完美编译,但是会引发错误

 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 个答案:

答案 0 :(得分:0)

如要评论的问题所述,安装libsodium 1.0.12+可解决此问题。