James Ralston qralston+ml.nettle-bugs@andrew.cmu.edu writes:
Is it your intent to have nettle require GNU MP?
The idea is that the publickey algorithms require GMP. So if you compile on a system without GNU MP that more or less implies --disable-public-key. And then the rsa functions are unavailable.
I don't have it installed on this particular Solaris box; as a result, anything that includes rsa.h fails to compile, because rsa.h unconditionally includes <gmp.h>.
If it avoided the inclusion of "gmp.h", and the program *uses* some rsa function, then it would just fail at link time instead. GMP is needed for rsa.
There is actually one unfortunate sideeffect of the gmp dependency, when using the shared library: If you write a program that uses only the symmetric functions of nettle (i.e. no rsa), and you link dynamically, and nettle was compiled with public key support, then you need to link with GMP as well, even if it won't be used. With static linking, only object files that are referred to are dragged into the executable, so if one doesn't call any (funcction in some) object file that in turn calls GMP, there's no need to link with GMP. Dynamic linking doesn't look at individual object files, it's an all-or-nothing thing.
Suggestions on how to improve this situation is appreciated.
Regards, /Niels