undefined reference to `aes_gcm_struct'

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Feb 7 11:13:51 CET 2012


Hi,
 It seems aes-gcm-x86.c wasn't compiled in windows. If you have autotools
would applying this patch fixes the issue for you?

regards,
Nikos

On Tue, Feb 7, 2012 at 6:08 AM, Kyle Schwarz <zeranoe at gmail.com> wrote:
> I'm getting an undefined reference to aes_gcm_struct when trying to compile
> gnutls 3.0.12 for Win64. I'm using MinGW-w64. I had no problem compiling the
> 32-bit version.
>
> make[1]: Entering directory
> `/home/kyle/software/ffmpeg/packages/gnutls/build/src'
> /bin/bash ../libtool  --tag=CC   --mode=link x86_64-w64-mingw32-gcc
> -std=gnu99 -I/home/kyle/software/ffmpeg/packages/gmp/gmp-5.0.3-win64/include
> -L/home/kyle/software/ffmpeg/packages/gmp/gmp-5.0.3-win64/lib -o
> gnutls-serv.exe serv.o udp-serv.o common.o  ../lib/libgnutls.la
> libcmd-serv.la ../gl/libgnu.la  -lws2_32 -lws2_32
> libtool: link: x86_64-w64-mingw32-gcc -std=gnu99
> -I/home/kyle/software/ffmpeg/packages/gmp/gmp-5.0.3-win64/include -o
> gnutls-serv.exe serv.o udp-serv.o common.o
> -L/home/kyle/software/ffmpeg/packages/gmp/gmp-5.0.3-win64/lib
> ../lib/.libs/libgnutls.a
> -L/home/kyle/software/ffmpeg/packages/nettle/nettle-2.4-win64/lib
> -L/home/kyle/software/ffmpeg/packages/zlib/zlib-1.2.5-win64/lib -lnettle
> -lhogweed
> /home/kyle/software/ffmpeg/packages/gmp/gmp-5.0.3-win64/lib/libgmp.a -lz
> -lpthread ./.libs/libcmd-serv.a ../gl/.libs/libgnu.a -lws2_32
> ../lib/.libs/libgnutls.a(aes-x86.o):aes-x86.c:(.text+0x594): undefined
> reference to `aes_gcm_struct'
> ../lib/.libs/libgnutls.a(aes-x86.o):aes-x86.c:(.text+0x5e4): undefined
> reference to `aes_gcm_struct'
> collect2: ld returned 1 exit status
> make[1]: *** [gnutls-serv.exe] Error 1
>
> Any ideas?
>
> Best regards,
>  Kyle Schwarz
>
> _______________________________________________
> Gnutls-devel mailing list
> Gnutls-devel at gnu.org
> https://lists.gnu.org/mailman/listinfo/gnutls-devel
-------------- next part --------------
diff --git a/lib/accelerated/x86/Makefile.am b/lib/accelerated/x86/Makefile.am
index 4e2aa62..3ddd066 100644
--- a/lib/accelerated/x86/Makefile.am
+++ b/lib/accelerated/x86/Makefile.am
@@ -39,11 +39,12 @@ libx86_la_SOURCES = sha-padlock.c hmac-padlock.c aes-x86.c aes-padlock.c aes-gcm
 
 if ASM_X86_64
 AM_CFLAGS += -DASM_X86_64 -DASM_X86
+libx86_la_SOURCES += aes-gcm-x86.c
 
 if WINDOWS
 libx86_la_SOURCES += asm-coff/appro-aes-x86-64-coff.s asm-coff/padlock-x86-64-coff.s asm-coff/cpuid-x86-64-coff.s asm-coff/appro-aes-gcm-x86-64-coff.s
 else
-libx86_la_SOURCES += asm/appro-aes-x86-64.s asm/appro-aes-gcm-x86-64.s aes-gcm-x86.c asm/padlock-x86-64.s asm/cpuid-x86-64.s
+libx86_la_SOURCES += asm/appro-aes-x86-64.s asm/appro-aes-gcm-x86-64.s asm/padlock-x86-64.s asm/cpuid-x86-64.s
 endif
 
 else


More information about the Gnutls-devel mailing list