Undefined symbols for architecture x86_64: libsodium

I am using libsodium: 0.0.3 in my application but when I start the application I get below error.
Not able to compile libsodium

===> Compiling libsodium
 LD     libsodium_drv.so
Undefined symbols for architecture x86_64:
  "_driver_alloc", referenced from:
      _libsodium_api_crypto_aead_aes256gcm_encrypt_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_decrypt_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_encrypt_detached_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_decrypt_detached_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_encrypt_init in libsodium_api_crypto_aead_chacha20poly1305.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_decrypt_init in libsodium_api_crypto_aead_chacha20poly1305.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_encrypt_detached_init in libsodium_api_crypto_aead_chacha20poly1305.o
      ...
  "_driver_async", referenced from:
      _libsodium_async_call in libsodium_request.o
  "_driver_caller", referenced from:
      _libsodium_drv_call in libsodium_drv.o
  "_driver_failure_atom", referenced from:
      _libsodium_api_crypto_auth_crypto_auth in libsodium_api_crypto_auth.o
      _libsodium_api_crypto_auth_hmacsha256_crypto_auth_hmacsha256 in libsodium_api_crypto_auth_hmacsha256.o
      _libsodium_api_crypto_auth_hmacsha256_init in libsodium_api_crypto_auth_hmacsha256.o
      _libsodium_api_crypto_auth_hmacsha256_final in libsodium_api_crypto_auth_hmacsha256.o
      _libsodium_api_crypto_auth_hmacsha512_crypto_auth_hmacsha512 in libsodium_api_crypto_auth_hmacsha512.o
      _libsodium_api_crypto_auth_hmacsha512_init in libsodium_api_crypto_auth_hmacsha512.o
      _libsodium_api_crypto_auth_hmacsha512_final in libsodium_api_crypto_auth_hmacsha512.o
      ...
  "_driver_free", referenced from:
      _libsodium_api_crypto_aead_aes256gcm_encrypt_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_decrypt_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_encrypt_detached_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_decrypt_detached_init in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_encrypt_init in libsodium_api_crypto_aead_chacha20poly1305.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_decrypt_init in libsodium_api_crypto_aead_chacha20poly1305.o
      _libsodium_api_crypto_aead_chacha20poly1305_ietf_encrypt_detached_init in libsodium_api_crypto_aead_chacha20poly1305.o
      ...
  "_driver_mk_atom", referenced from:
      _init_libsodium_api in libsodium_api.o
      _get_libsodium_api in libsodium_api.o
      _libsodium_api_crypto_auth_primitive in libsodium_api_crypto_auth.o
      _libsodium_api_crypto_box_primitive in libsodium_api_crypto_box.o
      _libsodium_api_crypto_generichash_primitive in libsodium_api_crypto_generichash.o
      _libsodium_api_crypto_hash_primitive in libsodium_api_crypto_hash.o
      _libsodium_api_crypto_onetimeauth_primitive in libsodium_api_crypto_onetimeauth.o
      ...
  "_driver_mk_port", referenced from:
      _libsodium_port_alloc in libsodium_port.o
  "_driver_realloc", referenced from:
      _libsodium_drv_call in libsodium_drv.o
  "_erl_drv_mutex_create", referenced from:
      _libsodium_drv_init in libsodium_drv.o
  "_erl_drv_mutex_destroy", referenced from:
      _libsodium_drv_finish in libsodium_drv.o
  "_erl_drv_mutex_lock", referenced from:
      _libsodium_api_randombytes_set_implementation_init in libsodium_api_randombytes.o
      _libsodium_drv_init in libsodium_drv.o
      _libsodium_drv_finish in libsodium_drv.o
  "_erl_drv_mutex_unlock", referenced from:
      _libsodium_api_randombytes_set_implementation_init in libsodium_api_randombytes.o
      _libsodium_drv_init in libsodium_drv.o
      _libsodium_drv_finish in libsodium_drv.o
  "_erl_drv_send_term", referenced from:
      _libsodium_api_crypto_aead_aes256gcm_is_available in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_keybytes in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_nsecbytes in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_npubbytes in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_abytes in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_statebytes in libsodium_api_crypto_aead_aes256gcm.o
      _libsodium_api_crypto_aead_aes256gcm_encrypt in libsodium_api_crypto_aead_aes256gcm.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/sahilpaudel/Documents/PharmEasy/Elixir/AfterGlow/deps/libsodium/c_src/../priv/libsodium_drv.so] Error 1
===> Hook for compile failed!

** (Mix) Could not compile dependency :libsodium, "/Users/sahilpaudel/.mix/rebar3 bare compile --paths "/Users/sahilpaudel/Documents/PharmEasy/Elixir/AfterGlow/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile libsodium", update it with "mix deps.update libsodium" or clean it with "mix deps.clean libsodium"