Page MenuHome GnuPG

libgcrypt 1.9.0 compilation fails on Ubuntu xenial
Closed, ResolvedPublic

Description

Invoking my usual release build flow for Debian/Ubuntu platforms,
everything worked on: bionic, buster, focal, stretch
but compiling libgcrypt 1.9.0 failed on Xenial, and only Xenial. The
hardware is the same in all cases, as I am just using Docker containers
for each userland,

~/src/libgcrypt-1.9.0# make install
DESTDIR=/tmp/pkgbuild.libgcrypt.144ce8c6 
Making install in compat
make[1]: Entering directory '/root/src/libgcrypt-1.9.0/compat'
make[2]: Entering directory '/root/src/libgcrypt-1.9.0/compat'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/src/libgcrypt-1.9.0/compat'
make[1]: Leaving directory '/root/src/libgcrypt-1.9.0/compat'
Making install in mpi
make[1]: Entering directory '/root/src/libgcrypt-1.9.0/mpi'
make[2]: Entering directory '/root/src/libgcrypt-1.9.0/mpi'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/src/libgcrypt-1.9.0/mpi'
make[1]: Leaving directory '/root/src/libgcrypt-1.9.0/mpi'
Making install in cipher
make[1]: Entering directory '/root/src/libgcrypt-1.9.0/cipher'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I..  -I../src -I../src -I../mpi -I../mpi  -Wa,--noexecstack -g -O2 -MT
blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c -o
blake2b-amd64-avx2.lo blake2b-amd64-avx2.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src
-I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD
-MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S  -fPIC
-DPIC -o .libs/blake2b-amd64-avx2.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src
-I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD
-MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S -o
blake2b-amd64-avx2.o >/dev/null 2>&1
Makefile:810: recipe for target 'blake2b-amd64-avx2.lo' failed
make[1]: *** [blake2b-amd64-avx2.lo] Error 1
make[1]: Leaving directory '/root/src/libgcrypt-1.9.0/cipher'
Makefile:500: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

GCC is: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609

(reported on behalf of @syscomet)

Details

Version
1.9.0

Event Timeline

I tested xenial with gcc-5.3 (xenial distro repo) and gcc-5.4 (xenial-updates distro repo) and libgcrypt 1.9.0 from git repo and from tarball. I did not get any errors.

I committed the partial result docker container, so I can restart it for investigation. So:

root@58c945bdda31:/vagrant# cd ~/src/libgcrypt-1.9.0/
root@58c945bdda31:~/src/libgcrypt-1.9.0# make
make  all-recursive
make[1]: Entering directory '/root/src/libgcrypt-1.9.0'
Making all in compat
make[2]: Entering directory '/root/src/libgcrypt-1.9.0/compat'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/src/libgcrypt-1.9.0/compat'
Making all in mpi
make[2]: Entering directory '/root/src/libgcrypt-1.9.0/mpi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/src/libgcrypt-1.9.0/mpi'
Making all in cipher
make[2]: Entering directory '/root/src/libgcrypt-1.9.0/cipher'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi  -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c -o blake2b-amd64-avx2.lo blake2b-amd64-avx2.S
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S  -fPIC -DPIC -o .libs/blake2b-amd64-avx2.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S -o blake2b-amd64-avx2.o >/dev/null 2>&1
Makefile:810: recipe for target 'blake2b-amd64-avx2.lo' failed
make[2]: *** [blake2b-amd64-avx2.lo] Error 1
make[2]: Leaving directory '/root/src/libgcrypt-1.9.0/cipher'
Makefile:500: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/src/libgcrypt-1.9.0'
Makefile:432: recipe for target 'all' failed
make: *** [all] Error 2
root@58c945bdda31:~/src/libgcrypt-1.9.0# cd cipher/
root@58c945bdda31:~/src/libgcrypt-1.9.0/cipher# gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S  -fPIC -DPIC -o .libs/blake2b-amd64-avx2.o
root@58c945bdda31:~/src/libgcrypt-1.9.0/cipher# gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -Wa,--noexecstack -g -O2 -MT blake2b-amd64-avx2.lo -MD -MP -MF .deps/blake2b-amd64-avx2.Tpo -c blake2b-amd64-avx2.S -o blake2b-amd64-avx2.o
blake2b-amd64-avx2.S: Assembler messages:
blake2b-amd64-avx2.S:217: Error: junk `()' after expression
blake2b-amd64-avx2.S:218: Error: junk `()' after expression
blake2b-amd64-avx2.S:220: Error: junk `()' after expression
blake2b-amd64-avx2.S:221: Error: junk `()' after expression
blake2b-amd64-avx2.S:267: Error: junk `()' after expression
blake2b-amd64-avx2.S:268: Error: junk `()' after expression

Looking at blake2b-amd64-avx2.S :

217         vbroadcasti128 .Lshuf_ror16 (RIP), R16;
218         vbroadcasti128 .Lshuf_ror24 (RIP), R24;
219 
220         vmovdqa .Liv+(0 * 8) (RIP), ROW3;
221         vmovdqa .Liv+(4 * 8) (RIP), ROW4;

267         vmovdqa .Liv+(0 * 8) (RIP), ROW3;
268         vmovdqa .Liv+(4 * 8) (RIP), ROW4;

Patch lets it build on xenial for me, thank you.

werner claimed this task.