Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin (gcc-11.4.0) fails to compile ciphers/sm4.c #663

Closed
karel-m opened this issue Sep 1, 2024 · 1 comment
Closed

Cygwin (gcc-11.4.0) fails to compile ciphers/sm4.c #663

karel-m opened this issue Sep 1, 2024 · 1 comment

Comments

@karel-m
Copy link
Member

karel-m commented Sep 1, 2024

Just FYI, I will try to create a pull request with a fix later.

gcc -Iltm -Iltc/headers -DLTC_SOURCE -DLTC_NO_TEST -DLTC_NO_PROTOTYPES -DLTM_DESC -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/build=/usr/src/debug/perl-5.36.3-1 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/src/perl-5.36.3=/usr/src/debug/perl-5.36.3-1 -fwrapv -fno-strict-aliasing   -O3  -msse4.1 -maes -Wall -Werror -Wextra -DARGTYPE=4 -c ltc/ciphers/sm4.c -o ltc/ciphers/sm4.o
In file included from ltc/headers/tomcrypt.h:12,
                 from ltc/headers/tomcrypt_private.h:4,
                 from ltc/ciphers/sm4.c:18:
ltc/ciphers/sm4.c:140:29: error: expected identifier or ‘(’ before numeric constant
  140 | LTC_INLINE static sm4_u32_t _L(sm4_u32_t B)
      |                             ^~
ltc/ciphers/sm4.c: In function ‘_T’:
ltc/ciphers/sm4.c:150:12: error: called object is not a function or function pointer
  150 |     return _L(t(Z));
      |            ^~
ltc/ciphers/sm4.c:151:1: error: control reaches end of non-void function [-Werror=return-type]
  151 | }
      | ^
At top level:
ltc/ciphers/sm4.c:287:12: error: ‘sm4_self_test_ltc’ defined but not used [-Werror=unused-function]
  287 | static int sm4_self_test_ltc(void)
      |            ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:199: ltc/ciphers/sm4.o] Error 1
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/11/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.4.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,d,fortran,lto,objc,obj-c++,jit --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --disable-multilib --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (GCC)
karel-m added a commit that referenced this issue Sep 1, 2024
karel-m added a commit that referenced this issue Sep 1, 2024
sjaeckel added a commit that referenced this issue Sep 2, 2024
@sjaeckel
Copy link
Member

sjaeckel commented Sep 5, 2024

Closed via #664

@sjaeckel sjaeckel closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants