From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bACGE-0000RG-8x for qemu-devel@nongnu.org; Tue, 07 Jun 2016 04:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bACGA-0003mq-Ii for qemu-devel@nongnu.org; Tue, 07 Jun 2016 04:21:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bACGA-0003ml-Dr for qemu-devel@nongnu.org; Tue, 07 Jun 2016 04:21:14 -0400 Date: Tue, 7 Jun 2016 09:21:10 +0100 From: "Daniel P. Berrange" Message-ID: <20160607082110.GA20196@redhat.com> Reply-To: "Daniel P. Berrange" References: <1465250735-30064-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1465250735-30064-1-git-send-email-vapier@gentoo.org> Subject: Re: [Qemu-devel] [PATCH] crypto: aes: always rename internal symbols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Frysinger Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org On Mon, Jun 06, 2016 at 06:05:35PM -0400, Mike Frysinger wrote: > From: Mike Frysinger > > OpenSSL's libcrypto always defines AES symbols with the same names as > qemu's local aes code. This is problematic when enabling at least curl > as that frequently also uses libcrypto. It might not be noticed when > running, but if you try to statically link, everything falls down. > > An example snippet: > LINK qemu-nbd > .../libcrypto.a(aes-x86_64.o): In function 'AES_encrypt': > (.text+0x460): multiple definition of 'AES_encrypt' > crypto/aes.o:aes.c:(.text+0x670): first defined here > .../libcrypto.a(aes-x86_64.o): In function 'AES_decrypt': > (.text+0x9f0): multiple definition of 'AES_decrypt' > crypto/aes.o:aes.c:(.text+0xb30): first defined here > .../libcrypto.a(aes-x86_64.o): In function 'AES_cbc_encrypt': > (.text+0xf90): multiple definition of 'AES_cbc_encrypt' > crypto/aes.o:aes.c:(.text+0xff0): first defined here > collect2: error: ld returned 1 exit status > .../qemu-2.6.0/rules.mak:105: recipe for target 'qemu-nbd' failed > make: *** [qemu-nbd] Error 1 > > The aes.h header has redefines already for FreeBSD, but go ahead and > enable that for everyone since there's no real good reason to not use > a namespace all the time. > > Signed-off-by: Mike Frysinger > --- > include/crypto/aes.h | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Thanks, applied to the crypto patch queue. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|