linking against -lcrypto++ fails with clang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libcrypto++ (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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:
CryptoPP:
new CryptoPP:
new CryptoPP:
}
// 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:/
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: libcrypto++-dev 5.6.1-8
ProcVersionSign
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)
This issue report can probably be closed per https:/ /bugs.launchpad .net/ubuntu/ +source/ llvm-toolchain- 3.8/+bug/ 1510042/ comments/ 8 .