TokTok / c-toxcore

The future of online communications.
https://tox.chat
GNU General Public License v3.0
2.25k stars 284 forks source link

Sodium.h missing? #1105

Closed almindor closed 6 years ago

almindor commented 6 years ago

I'm getting

  CC       ../testing/misc_tools.lo
../testing/misc_tools.c:43:20: fatal error: sodium.h: No such file or directory
 #include "sodium.h"

when running make on v0.2.6 release. This is a regression that seems to have been introduced in v0.2.6 specifically commit fb89c03dd2b4c05847b7f3f7eeb965cae2e2087e

I am using these configuration options:

 ./configure --with-pic --prefix "$FAKEDIR" --with-libsodium-headers="$SODIUMDIR/src/libsodium/include" --with-libsodium-libs="$SODIUMLIBSDIR"

The directories for sodium includes are all good and the same steps compile and build with 0.2.5

nurupo commented 6 years ago

Try changing #include "sodium.h" to #include <sodium.h>.

almindor commented 6 years ago

This is not about me getting it to build, this is to report a regression/bug. The include is in toxcore sources. I don't want to force a patch on each build.

nurupo commented 6 years ago

Alright, you don't want to test it. I will test it later when I get to a computer.

zugz commented 6 years ago

Thanks for the report. This will be fixed in the next release.

almindor commented 6 years ago

Oh sorry about that, the way you worded your reply I thought you meant I should just change it on my end. I'll test it to make sure it's the right fix.

almindor commented 6 years ago

Changing "sodium.h" to <sodium.h> doesn't seem to fix it. I wonder if it's missing the -I <path-to-libsodium-from-configure> setup for this file since this was added in.

zugz commented 6 years ago

Changing "sodium.h" to <sodium.h> doesn't seem to fix it. I wonder if it's missing the -I <path-to-libsodium-from-configure> setup for this file since this was added in.

I haven't managed to replicate, but this does make sense.

Could you please check whether https://github.com/TokTok/c-toxcore/pull/1106 fixes the problem?

zoff99 commented 6 years ago

@almindor autotools (configure) are not fully fixed yet. the default method is cmake. autotools also do not yet make 1 lib only (you get more than 1 library file). we will try to fix this within the next few releases ...

almindor commented 6 years ago

@zugz Your PR fixes the issue :) thanks

almindor commented 6 years ago

@zoff99 I see. I'm only interested in the static files. This is for the SailfishOS (mobile) build of jTox. I use a VM (sailfish SDK) with some cross-compile environment setup to build the static .a files which are then included in the project for static linking. If autotools is generally outdated I guess I can switch to cmake but the PR from @zugz works for me.

zugz commented 6 years ago

@zugz Your PR fixes the issue :) thanks

Great. Thanks for reporting and testing.

almindor commented 6 years ago

Seems this issue is fixed in the last release.