open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.77k stars 435 forks source link

Fedora rawhide compilation failure. #1381

Closed beldmit closed 1 year ago

beldmit commented 1 year ago

https://copr.fedorainfracloud.org/coprs/dbelyavs/liboqs-draft/build/5499498/ is an attempt to build 0.7.2 with the patch from #1377

FAILED: src/kem/hqc/CMakeFiles/hqc_128_avx2.dir/pqclean_hqc-rmrs-128_avx2/reed_muller.c.o 
/usr/bin/gcc  -I/builddir/build/BUILD/liboqs-0.7.2/redhat-linux-build/include -I/builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2 -I/builddir/build/BUILD/liboqs-0.7.2/src/common/pqclean_shims -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -fPIC -fvisibility=hidden -march=native -Werror -Wall -Wextra -Wpedantic -Wstrict-prototypes -Wshadow -Wformat=2 -Wfloat-equal -Wwrite-strings -Wstrict-overflow -ggdb3 -mavx2 -mbmi -mpclmul -Wno-missing-braces -std=gnu11 -MD -MT src/kem/hqc/CMakeFiles/hqc_128_avx2.dir/pqclean_hqc-rmrs-128_avx2/reed_muller.c.o -MF src/kem/hqc/CMakeFiles/hqc_128_avx2.dir/pqclean_hqc-rmrs-128_avx2/reed_muller.c.o.d -o src/kem/hqc/CMakeFiles/hqc_128_avx2.dir/pqclean_hqc-rmrs-128_avx2/reed_muller.c.o -c /builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2/reed_muller.c
In function 'find_peaks',
    inlined from 'PQCLEAN_HQCRMRS128_AVX2_reed_muller_decode' at /builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2/reed_muller.c:390:18:
/builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2/reed_muller.c:339:44: error: 'tmp' is used uninitialized [-Werror=uninitialized]
  339 |         result |= mask & ((uint16_t *)&tmp)[i];
      |                          ~~~~~~~~~~~~~~~~~~^~~
/builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2/reed_muller.c: In function 'PQCLEAN_HQCRMRS128_AVX2_reed_muller_decode':
/builddir/build/BUILD/liboqs-0.7.2/src/kem/hqc/pqclean_hqc-rmrs-128_avx2/reed_muller.c:234:13: note: 'tmp' was declared here
  234 |     __m256i tmp = _mm256_setzero_si256();
      |             ^~~
cc1: all warnings being treated as errors
baentsch commented 1 year ago

As a quick workaround, would the build pass if you disable HQC (-DOQS_ENABLE_KEM_HQC=OFF as cmake argument)? At worst until we resolve https://github.com/open-quantum-safe/liboqs/issues/1319.

beldmit commented 1 year ago

I'm not in a hurry, for (semi)production purposes I would anyway just disable -Werror. If you are aware of this problem, feel free to close this issue.

beldmit commented 1 year ago

Current main branch enables -Werror when a special variable is set.

Thank you! Closing.