Description of problem: Statically linking against the Crypto++ library is impossible due to a missing static library.
Hello, I wanted to link statically against the Crypto++ library that is packaged inside Fedora. To my surprise, I have found that there is no "libcryptopp.a" library inside the cryptopp-devel package.
Shared linking works fine, but I would like to statically link the library to my program in order to avoid any shenanigans with the LD_PRELOAD variable.
I checked the spec file, and it seems that the static library is built explicitly excluded from the binary package, so that looks like it
s on purpose. What's the reason for doing that?
Note that upstream even recommends static linking, due to the exact same reason:
> The makefile links to the static version of the Crypto++ library to avoid binary
planting and other LD_PRELOAD tricks. You should use the static version of the
library in your programs to help avoid unwanted redirections.
Source: Readme.txt inside the source package or: https://github.com/weidai11/cryptopp/blob/master/Readme.txt
Besides, both Ubuntu and Debian ship the static library in their libcrypto++-dev package, so I'm wondering about the reasons for excluding it.
Version-Release number of selected component (if applicable): 5.6.5-2.fc27
How reproducible: Every time
Steps to Reproduce:
1. Install cryptopp-devel
No libcryptopp.a library available.
libcryptopp.a available for static linking.
The same issue exists in the Fedora EPEL repo
Fedora recommends to use shared libraries when possible and because the cflags used across the whole distribution are more appropriate for shared objects I often recommend you to build your own static version instead for your own usage (outside of fedora).