Closed sschnug closed 1 year ago
Hi @sschnug as you correctly pointed out, HPKE is not exposed by tink::static
, and ideally it should be there; Unfortunately, simply adding it to tink::static
would break compatibility with OpenSSL. So the exclusion is intentional :)
If you use BoringSSL, adding the tink_internal_hybrid_hpke_config
target is the only option AFAICT.
Closing this issue. Feel free to reopen it if there are any further issues/clarifications needed!
Original Issue
While trying to build a simple demo project doing Hybrid Encryption based on the official example
cc/examples/hybrid_encryption
(but flattening / isolating / simplifying everything into a fresh tink-external project) using cmake i stumbled upon the following issue:This nearly example-identical cmake config:
leads to this error during linking:
Remark:
example.cc
has these parts (without the original macros/flags) and compiles (until linking)Workaround
I fixed this and verified the correct working of the example built by explicitly declaring the target:
tink_internal_hybrid_hpke_config
in the cmake config:Question
This explicit declaration looks like something which should have been automatically added when declaring
tink::static
.As this example currently seems to be a second-class citizen when cmake (instead of bazel) is used (https://github.com/google/tink/commit/68ea64916bcf6bdce07c926ef0d844f34c0d6da8), it's hard to tell if this is oversight or if there is a good reason for this?
Version
tink @ 27b061bb = 1.7.0
(Ubuntu 20.04, cmake version 3.21.3)
Remark / Thanks
The library, docs and examples look really nice in general!