servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

Build problem: implicit declaration, libsodium version dependency #113

Closed gh0st42 closed 7 years ago

gh0st42 commented 8 years ago

Current dev snapshot doesn't compile on raspberry pi with raspbian(jessie) and libsodium13 from the repos:

$ make
SERVALD CC overlay_mdp.c
overlay_mdp.c: In function ‘overlay_mdp_decrypt’:
overlay_mdp.c:471:7: error: implicit declaration of function ‘crypto_box_open_easy_afternm’ [-Werror=implicit-function-declaration]
       if (crypto_box_open_easy_afternm(ob_ptr(plaintext), cipher_text, cipher_len, nonce, k)) {
       ^
overlay_mdp.c: In function ‘encrypt_payload’:
overlay_mdp.c:776:3: error: implicit declaration of function ‘crypto_box_easy_afternm’ [-Werror=implicit-function-declaration]
   if (crypto_box_easy_afternm(cipher_text, buffer, msg_len, nonce, k)) {
   ^
cc1: all warnings being treated as errors
Makefile:161: recipe for target 'objs_servald/overlay_mdp.o' failed
make: *** [objs_servald/overlay_mdp.o] Error 1

I guess libsodium too old!? Version 1.0.0-1 on Raspbian, on my other machine I have 1.0.3 and here it compiles. It's only a very slight difference in the minor version...

lakeman commented 8 years ago

Looks like 1.0.2; https://github.com/jedisct1/libsodium/blob/22ab28be0a80878452836c08161a26005c460630/ChangeLog#L129

quixotique commented 7 years ago

Serval DNA requires libsodium version ≥ 1.0.2. See the most recent INSTALL.md