Public bug reported: The following problem compiles with g++ but not with clang++. I would expect both to work. This used to work with ubuntu 15.04 but fails with ubuntu 15.10. Note that the program is not designed to do anything except tickle the library linking bug that I am reporting.
#include <crypto++/aes.h> #include <crypto++/base64.h> #include <crypto++/osrng.h> #include <crypto++/sha.h> #include <iostream> #include <string> int main(int argc, char *argv[]) { std::cout << argc << " - " << argv[0] << std::endl; std::string message("test"); std::string digest; CryptoPP::SHA256 hash; CryptoPP::StringSource(message, true, new CryptoPP::HashFilter(hash, new CryptoPP::Base64Encoder(new CryptoPP::StringSink(digest)))); } // Fails: // clang++ -ggdb3 -Wall -Wextra -std=c++14 -o crypt crypt.cc -lcrypto++ // Succeeds: // g++ -ggdb3 -Wall -Wextra -std=c++14 -o crypt crypt.cc -lcrypto++ I suspect this bug is parallel to (i.e., same etiology) but not a duplicate of https://bugs.launchpad.net/ubuntu/+source/libjsoncpp/+bug/1510042 ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: libcrypto++-dev 5.6.1-8 ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3 Uname: Linux 4.2.0-16-generic x86_64 ApportVersion: 2.19.1-0ubuntu3 Architecture: amd64 CurrentDesktop: i3 Date: Wed Oct 28 11:04:52 2015 Dependencies: gcc-5-base 5.2.1-22ubuntu2 libc6 2.21-0ubuntu4 libcrypto++9v5 5.6.1-8 libgcc1 1:5.2.1-22ubuntu2 libstdc++6 5.2.1-22ubuntu2 EcryptfsInUse: Yes InstallationDate: Installed on 2015-10-23 (4 days ago) InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422) SourcePackage: libcrypto++ UpgradeStatus: Upgraded to wily on 2015-10-23 (4 days ago) ** Affects: libcrypto++ (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug wily -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1510859 Title: linking against -lcrypto++ fails with clang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libcrypto++/+bug/1510859/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs