[Bug 231998] security/cryptopp: undefined reference to `CryptoPP::AlignedDeallocate(void*)'
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Oct 6 13:29:41 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231998
Bug ID: 231998
Summary: security/cryptopp: undefined reference to
`CryptoPP::AlignedDeallocate(void*)'
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: jhale at FreeBSD.org
Reporter: andreas.sommer87 at googlemail.com
Flags: maintainer-feedback?(jhale at FreeBSD.org)
Assignee: jhale at FreeBSD.org
Created attachment 197832
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=197832&action=edit
cryptopp 7.0.0 build log on 2018Q4 / FreeBSD 11.2 amd64
By default, the SIMD option is off, resulting in disabling certain features:
c++ -O2 -pipe -fstack-protector -fno-strict-aliasing -std=c++11 -stdlib=libc++
-Wno-deprecated-declarations -fPIC -DNDEBUG -DCRYPTOPP_DISABLE_ASM
-DCRYPTOPP_DISABLE_SSE2 -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_SSE4
-pthread -pipe -c misc.cpp
Thus, the `AlignedDeallocate` function does not get compiled.
Trying to use the shared object with `-lcryptopp` results in the above linker
error because `config.h` determines enabled features by the
`CRYPTOPP_DISABLE_*` macros.
In this case:
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 ||
CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM)
#define CRYPTOPP_BOOL_ALIGN16 1
#else
#define CRYPTOPP_BOOL_ALIGN16 0
#endif
So a program linking against libcryptopp will think that
CRYPTOPP_BOOL_ALIGN16=1 while it was actually compiled (using default option)
with CRYPTOPP_BOOL_ALIGN16=0, leading to the missing function.
Not sure how to approach this. Maybe write the chosen `CRYPTOPP_DISABLE_*` into
the installed `config.h`?!
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list