Summary
Building vykar 0.12.12 fails when the environment injects CFLAGS with -O2 (e.g. Arch Linux makepkg). The jitterentropy-base.c file in aws-lc-sys requires -O0, but the system -O2 flag appears last on the compiler command line and overrides it, triggering:
#error "The CPU Jitter random number generator must not be compiled with optimizations."
Root Cause
This is a known upstream bug in aws-lc-sys v0.38.0, fixed in aws/aws-lc-rs#1064. The cc crate changed its env-var caching behavior, causing the build script's temporary CFLAGS override to no longer work.
Fix
The fix shipped in aws-lc-rs v1.16.2 / aws-lc-sys v0.39.0. Vykar 0.12.12 currently pins aws-lc-rs v1.16.1 / aws-lc-sys v0.38.0 — just one patch version behind.
Updating Cargo.lock to pull in aws-lc-sys >= 0.39.0 should resolve the issue.
Workaround
Setting AWS_LC_SYS_NO_JITTER_ENTROPY=1 before building skips jitterentropy compilation entirely and avoids the conflict.
Reproduction
Build on Arch Linux (or any distro whose build system injects -O2 into CFLAGS):
Summary
Building vykar 0.12.12 fails when the environment injects
CFLAGSwith-O2(e.g. Arch Linuxmakepkg). Thejitterentropy-base.cfile inaws-lc-sysrequires-O0, but the system-O2flag appears last on the compiler command line and overrides it, triggering:Root Cause
This is a known upstream bug in
aws-lc-sysv0.38.0, fixed in aws/aws-lc-rs#1064. Thecccrate changed its env-var caching behavior, causing the build script's temporary CFLAGS override to no longer work.Fix
The fix shipped in
aws-lc-rsv1.16.2 /aws-lc-sysv0.39.0. Vykar 0.12.12 currently pinsaws-lc-rsv1.16.1 /aws-lc-sysv0.38.0 — just one patch version behind.Updating
Cargo.lockto pull inaws-lc-sys >= 0.39.0should resolve the issue.Workaround
Setting
AWS_LC_SYS_NO_JITTER_ENTROPY=1before building skips jitterentropy compilation entirely and avoids the conflict.Reproduction
Build on Arch Linux (or any distro whose build system injects
-O2into CFLAGS):