You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to build the aws-lc-rs or the dependent project it fails for some targets (in particular x86_64-pc-windows-gnu) with a compiler error around static_assert. Error example:
rust/aws-lc-rs/aws-lc-sys/aws-lc/crypto/refcount_win.c:23:15: error: expected declaration specifiers or '...' before '_Alignof'
23 | static_assert(alignof(CRYPTO_refcount_t) == alignof(LONG),
| ^~~~~~~
This happens because the standard <assert.h> header for MinGW toolchain contains this:
#if (defined _ISOC11_SOURCE \
|| (defined __STDC_VERSION__&&__STDC_VERSION__ >= 201112L)) \
&& !defined (__cplusplus)
/* Static assertion. Requires support in the compiler. */#undef static_assert
#definestatic_assert _Static_assert
#endif
The workaround is to use CFLAGS="-D_ISOC11_SOURCE" env variable when building. A better solution to my opinion is to configure the build scripts to include it by default.
Edit: I think it happens because build scripts set "-std=c99", and assert_static is c11 feature.
The text was updated successfully, but these errors were encountered:
Thanks for submitting this issue. For most platforms, AWS-LC's C code is expected to be compliant with C99. However, Windows (of course) often requires exceptions to be made.
Let me take some time to investigate this (and potentially other issues?) when building AWS-LC w/ MinGW. I'll then follow up here.
As of our v1.7.1 release, I believe this issue to be resolved. Feel free to reopen or create a new issue if you are still having a problem building aws-lc-rs. Thanks!
When trying to build the aws-lc-rs or the dependent project it fails for some targets (in particular x86_64-pc-windows-gnu) with a compiler error around static_assert. Error example:
This happens because the standard
<assert.h>
header for MinGW toolchain contains this:The workaround is to use
CFLAGS="-D_ISOC11_SOURCE"
env variable when building. A better solution to my opinion is to configure the build scripts to include it by default.Edit: I think it happens because build scripts set "-std=c99", and assert_static is c11 feature.
The text was updated successfully, but these errors were encountered: