fireblocks / mpc-lib

GNU General Public License v3.0
147 stars 86 forks source link

'cmp_key_metadata' type mismatch (struct vs. class) #6

Closed kozyilmaz closed 8 months ago

kozyilmaz commented 8 months ago

'cmp_key_metadata' is defined as struct and current code gives an error on macOS (tested on Ventura 13.6)

In file included from cosigner/mta.cpp:2:
../../include/cosigner/cmp_key_persistency.h:28:1: error: 'cmp_key_metadata' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct cmp_key_metadata
^
../../include/cosigner/cmp_ecdsa_signing_service.h:25:1: note: did you mean struct here?
class cmp_key_metadata;
^~~~~
struct

clang version:

% clang -v
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
kozyilmaz commented 8 months ago

tested also with gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) on Linux: Linux asgard 5.15.0-86-generic #96-Ubuntu SMP Wed Sep 20 08:29:36 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

kozyilmaz commented 8 months ago

Commit is not signed, creating another PR with properly signed commit