Closed deliciouslytyped closed 3 years ago
This is happening because link-time optimization is disabled. See: https://github.com/blueprint-freespeech/ricochet-refresh/blob/main/src/libtego/source/tor_stubs.cpp
To expand on this, we are using tor's ed25519 code, which unfortunately is fairly tightly integrated into the tor daemon, so has some extra baggage we don't need. The functions that we do call, also live in compilation units with a lot of functionality we do not need. Without link-time optimization enabled, these functions are marked as required by the linker (which you see above) even though they are never actually called.
We can't enable lto on Windows build targets because of an outstanding mingw bug that results in some really interesting runtime failures on x86_64 targets, so the functions are just stubbed out in that tor_stubs.cpp file.
Ok, I'll look into enabling LTO again, but IIUC that had it's own issues. So just checking: compiling ricochet-refresh without LTO is not supported.
I'm building from source on NixOS and run into the following errors:
Using a script to search for definitions of a missing symbol, for example
crypto_strongest_rand
, I find no definitions:Looking at https://linux.die.net/man/1/nm , "U" means a symbol is undefined, for a definition there should probably be an entry with something like "T".
So my question is how is this supposed to build/be built? The lack of a symbol suggests that there are object files which I am not building, which should exist. - or that I forgot a dependency somewhere.
cc @pospeselr