Page MenuHome GnuPG

libgcrypt-1.9.4 build failure on ARM without NEON
Closed, ResolvedPublic

Description

Originally reported downstream in Gentoo here. I've also posted a patch to gcrypt-devel.

Failure snippet:

libtool: compile:  armv6j-unknown-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/cipher -I.. -I../src -I/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/src -I../mpi -I/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/mpi -O2 -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c /var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/cipher/cipher-gcm.c  -fPIC -DPIC -o .libs/cipher-gcm.o
/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/cipher/cipher-gcm.c: In function ‘setupM’:
/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/cipher/cipher-gcm.c:591:12: error: ‘features’ undeclared (first use in this function)
  591 |   else if (features & HWF_ARM_NEON)
      |            ^~~~~~~~
/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4/cipher/cipher-gcm.c:591:12: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:854: cipher-gcm.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4-.arm/cipher'
make[1]: *** [Makefile:502: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/libgcrypt-1.9.4/work/libgcrypt-1.9.4-.arm'
make: *** [Makefile:434: all] Error 2
 * ERROR: dev-libs/libgcrypt-1.9.4::gentoo failed (compile phase):

I've explained the issue in more detail within the patch but the gist is that we define features based on one smaller set of CPU features (not checking for NEON) and then try to reference it later on based on a larger set of CPU features (so it can fail if NEON is set because NEON isn't a prerequisite for defining features).

Details

External Link
https://bugs.gentoo.org/831397
Version
1.9.4

Event Timeline

jukivili added a subscriber: jukivili.

Thanks for report. I got similar report earlier this week from gentoo user through email and made following patch for them to test. I'll push it to master soon.

werner triaged this task as Normal priority.Jan 22 2022, 6:15 PM
werner added projects: libgcrypt, arm.