Opened 5 years ago
Last modified 5 years ago
#5439 new defect
build broken on debian stretch + libsodium woes
Reported by: | wobbol | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | libsodium ModIo.h ModIo.cpp sodium.h debian stretch build |
Cc: | Patch: | 0ad-0.0.23b-alpha |
Description
The libsodium shipped with stretch is too old.
It does not include sodium_base642bin()
or sodium_base64_VARIANT_*
.
The user must use sudo apt-get install -t stretch-backports libsodium-dev
.
Something seems to be wrong with the build as well. When I verified that the missing functions were present in the system's libsodium header file, I cleaned and rebuilt everything like this:
./clean-workspace.sh ./update-workspace.sh -j5 cd gcc make clean make -j5
I got the same error as before, however.
Since I was sure that I had the right stuff installed, I just hacked in the required libsodium macros and functions into ModIo.h
. For reasons that I don't understand, that worked when it really shouldn't have.
I have verified that I could get into a single player match. All the tests come back clean.
The strange thing is, libsodium is the only C header file that the build system has trouble finding. There are countless other C header files included and used with no problem.
Attachments (1)
Change History (3)
by , 5 years ago
Attachment: | ModIo.patch added |
---|
comment:1 by , 5 years ago
note: the maintainers on buster and sid seem to not run into this problem. I will see if I can get 23b into stretch-backports. So that other debian users can enjoy 0ad with their friends and such.
comment:2 by , 5 years ago
This is not a defect in 0 A.D. code, but that you try to build the game with the old version of libsodium rather than the devel one, isn't it?
The premake5.lua
script somewhere contains the information where it looks for the libraries, perhaps one can change it with an environment variable or such, or perhaps just uninstalling the old libsodium version might already be sufficient, if you don't need it otherwise.
If the build system won't behave, apply this patch to $root/source/ps/ModIo.h to get the build to complete.