libgcrypt-1.7 fails self-test for all 'basic' with 'Checksum error' (log attached)

Somchai Smythe buraphalinuxserver at gmail.com
Thu Apr 28 10:31:12 CEST 2016


-O3 seems to trigger the problem.  Gmail will often mangle long lines,
but this should still be enough for you to see the problems.

This works:

./configure \
  --prefix=/usr \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --sysconfdir=/etc \
  --disable-static \
  --with-pic \
  CC='gcc -std=gnu11' \
  CFLAGS='-O3 -fno-strict-aliasing -m64 -march=x86-64 -mtune=generic -pipe'

This fails:

./configure \
  --prefix=/usr \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --sysconfdir=/etc \
  --disable-static \
  --with-pic \
  CC='gcc -std=gnu11' \
  CFLAGS='-O3 -m64 -march=x86-64 -mtune=generic -pipe'

This shows an aliasing issue that may be related to the problem:

./configure \
  --prefix=/usr \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --sysconfdir=/etc \
  --disable-static \
  --with-pic \
  CC='gcc -std=gnu11' \
  CFLAGS='-O3 -Wall -fstrict-aliasing -Wstrict-aliasing=1 -m64
-march=x86-64 -mtune=generic -pipe'

....
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -std=gnu11
-DHAVE_CONFIG_H -I. -I..     -O3 -Wall -fstrict-aliasing
-Wstrict-aliasing=1 -m64
libtool: compile:  gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I.. -O3 -Wall
-fstrict-aliasing -Wstrict-aliasing=1 -m64 -march=x86-64
-mtune=generic -pip
sexp.c: In function '_gcry_sexp_vextract_param':
sexp.c:2333:19: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
                   gcry_buffer_t *spec = (gcry_buffer_t*)array[idx];
                   ^
sexp.c:2353:19: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
                   gcry_buffer_t *spec = (gcry_buffer_t*)array[idx];
                   ^
sexp.c:2421:11: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
           gcry_buffer_t *spec = (gcry_buffer_t*)array[idx];
           ^
sexp.c:2427:11: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
           gcry_buffer_t *spec = (gcry_buffer_t*)array[idx];
           ^
....

The compiler in use:

gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413



On 4/27/16, Werner Koch <wk at gnupg.org> wrote:
> On Wed, 27 Apr 2016 03:42, buraphalinuxserver at gmail.com said:
>
>> + LINGUAS='en th'
>> + CC='gcc -std=gnu11'
>> + CFLAGS='-O3 -m64 -march=x86-64 -mtune=generic -pipe'
>> + ./configure --prefix=/usr --mandir=/usr/man --infodir=/usr/info
>> --sysconfdir=/etc --disable-static --with-pic
>
> It seems that the '+' shall indicate that this is one long line, right?
> You should not run configure in this way, but put the envar settings on
> the ./configure command line so that configure can track them,
>
> To track down the problem, build again without modified CFLAGS and then
> add more options until you see the error again.
>
>
> Salam-Shalom,
>
>    Werner
>
> --
> Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
>
>



More information about the Gcrypt-devel mailing list