Rebar3 compilation Issue in Ubuntu 21.04

Hello Folks,

I was trying to build the aesophia_cli package on Ubuntu 21.04. I am getting the following compilation error in this environment. Could you please share your pointers to solve this issue.

/Apps/ae-apps/aesophia_cli$ rebar3 escriptize
===> Verifying dependencies…
===> Fetching aeserialization (from {git,“GitHub - aeternity/aeserialization: Serialization formats for the aeternity node”,
{ref,“58e34ae7b5abfcc54f505ea8d57183d04f67120e”}})
===> Fetching aesophia (from {git,“GitHub - aeternity/aesophia: Stand alone compiler for the Sophia smart contract language”,
{ref,“5ad5270e381f6e810d7b8b5cdc168d283e7a90bb”}})
===> Fetching eblake2 v1.0.0
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/eblake2-1.0.0.tar
===> Fetching rebar3_hex v6.11.9
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.11.9.tar
===> Fetching hex_core v0.8.4
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/hex_core-0.8.4.tar
===> Fetching verl v1.0.2
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/verl-1.0.2.tar
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Fetching aebytecode (from {git,“GitHub - aeternity/aebytecode: Aeternity virtual machines byte code modules”,
{ref,“05dfd7ffc7fb1e07ecc0b1e516da571f56d7dc8f”}})
===> Fetching base58 (from {git,“GitHub - aeternity/erl-base58: A simple Erlang Base58 encoder and decoder”,
{ref,“60a335668a60328a29f9731b67c4a0e9e3d50ab6”}})
===> Fetching enacl (from {git,“GitHub - aeternity/enacl: Erlang bindings for NaCl / libsodium”,
{ref,“26180f42c0b3a450905d2efd8bc7fd5fd9cece75”}})
===> Fetching pc v1.13.0
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/pc-1.13.0.tar
===> Compiling pc
===> Fetching getopt v1.0.1
===> Downloaded package, caching at /home/semiott/.cache/rebar3/hex/hexpm/packages/getopt-1.0.1.tar
===> Fetching jsx (from {git,“GitHub - talentdeficit/jsx: an erlang application for consuming, producing and manipulating json. inspired by yajl”,
{ref,“3074d4865b3385a050badf7828ad31490d860df5”}})
===> Compiling jsx
===> Compiling getopt
===> Compiling eblake2
===> Compiling enacl
===> Compiling /home/semiott/Apps/ae-apps/aesophia_cli/c_src/enacl_nif.c
===> /home/semiott/Apps/ae-apps/aesophia_cli/c_src/enacl_nif.c:5:10: fatal error: sodium.h: No such file or directory
5 | #include <sodium.h>
| ^~~~~~~~~~
compilation terminated.

1 Like

Install libsodium (and make sure your compiler knows where it is).

2 Likes