Subject: GnuTLS fails to build for aarch64 in QEMU
From: Lars Rustand <[email-masked]>
To: [email-masked]
Date: Fri, 12 Jan 2024 07:52:07 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

GnuTLS fails to build with --system=aarch64-linux. The test "test-free"
fails. Output follows below:

make[6]: 'libtests.a' is up to date.
  CCLD     test-xalloc-die
make[6]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make  check-TESTS
make[6]: Entering directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[7]: Entering directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
PASS: test-alignasof
PASS: test-accept
PASS: test-arpa_inet
PASS: test-alloca-opt
PASS: test-assert
PASS: test-bind
PASS: test-array_list
PASS: test-binary-io.sh
PASS: test-byteswap
PASS: test-bitrotate
PASS: test-c-ctype
PASS: test-calloc-gnu
PASS: test-cloexec
PASS: test-canonicalize-lgpl
PASS: test-close
PASS: test-c-strcase.sh
PASS: test-connect
PASS: test-ctype
PASS: test-environ
PASS: test-dup2
PASS: test-errno
PASS: test-explicit_bzero
PASS: test-fcntl
PASS: test-fcntl-h
PASS: test-fdopen
PASS: test-fgetc
PASS: test-float
PASS: test-fopen-gnu
PASS: test-fopen
PASS: test-fputc
PASS: test-fread
PASS: test-fpending.sh
PASS: test-fseek2.sh
PASS: test-fseek.sh
PASS: test-fseeko2.sh
PASS: test-fseeko.sh
PASS: test-fseeko3.sh
PASS: test-error.sh
PASS: test-fstat
PASS: test-fseeko4.sh
PASS: test-ftell.sh
PASS: test-ftell2.sh
FAIL: test-free
PASS: test-ftell3
PASS: test-ftello3
PASS: test-ftello.sh
PASS: test-ftello2.sh
PASS: test-ftello4.sh
PASS: test-func
PASS: test-getaddrinfo
PASS: test-fwrite
PASS: test-ftruncate.sh
PASS: test-getcwd-lgpl
PASS: test-getdelim
PASS: test-getline
PASS: test-getdtablesize
PASS: test-getpeername
PASS: test-getprogname
PASS: test-gettimeofday
PASS: test-scratch-buffer
PASS: test-ignore-value
PASS: test-inet_ntop
PASS: test-inet_pton
PASS: test-intprops
PASS: test-inttostr
PASS: test-inttypes
PASS: test-ioctl
PASS: test-isblank
PASS: test-langinfo
PASS: test-limits-h
PASS: test-linked_list
PASS: test-listen
PASS: test-linkedhash_list
PASS: test-locale
PASS: test-localename
PASS: test-once1
PASS: test-once2
PASS: test-rwlock1
PASS: test-lstat
PASS: test-malloc-gnu
PASS: test-lseek.sh
PASS: test-memset_explicit
PASS: test-malloca
PASS: test-netdb
PASS: test-hash
PASS: test-netinet_in
PASS: test-nstrftime
PASS: test-open
PASS: test-parse-datetime
PASS: test-pathmax
PASS: test-perror2
PASS: test-pipe
PASS: test-pselect
PASS: test-pthread
PASS: test-nanosleep
PASS: test-pthread-thread
PASS: test-raise
PASS: test-rawmemchr
PASS: test-read-file
PASS: test-realloc-gnu
PASS: test-readlink
PASS: test-reallocarray
PASS: test-perror.sh
PASS: test-recvfrom
PASS: test-recv
PASS: test-sched
PASS: test-select
PASS: test-send
PASS: test-sendto
PASS: test-setenv
PASS: test-pthread_sigmask2
PASS: test-setlocale_null
PASS: test-pthread_sigmask1
PASS: test-setlocale1.sh
PASS: test-setsockopt
PASS: test-select-out.sh
PASS: test-shutdown
PASS: test-signal-h
PASS: test-setlocale2.sh
PASS: test-setlocale_null-mt-one
PASS: test-select-in.sh
PASS: test-snprintf
PASS: test-sockets
PASS: test-stat
PASS: test-stat-time
PASS: test-stdbool
PASS: test-stdckdint
PASS: test-stdint
PASS: test-stddef
PASS: test-stdio
PASS: test-stdlib
PASS: test-strerror
PASS: test-strerror_r
PASS: test-sigprocmask
PASS: test-memchr
PASS: test-string
PASS: test-strings
PASS: test-sleep
PASS: test-strverscmp
PASS: test-strnlen
PASS: test-strtoll
PASS: test-sys_ioctl
PASS: test-symlink
PASS: test-sys_select
PASS: test-sys_socket
PASS: test-sys_time
PASS: test-sys_stat
PASS: test-sys_types
PASS: test-sys_uio
PASS: test-setlocale_null-mt-all
PASS: test-thread_self
PASS: test-thread_create
PASS: test-timespec
PASS: test-time
PASS: test-unistd
PASS: test-unsetenv
PASS: test-vasprintf
PASS: test-vasnprintf
PASS: test-verify
PASS: test-vsnprintf
PASS: test-wchar
PASS: test-usleep
PASS: test-init.sh
PASS: test-xalloc-die.sh
PASS: test-tls
PASS: test-lock
PASS: test-verify.sh
============================================================================
Testsuite summary for GnuTLS 3.8.2
============================================================================
# TOTAL: 167
# PASS:  166
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See src/gl/tests/test-suite.log
Please report to [email-masked]
============================================================================
make[7]: *** [Makefile:5011: test-suite.log] Error 1
make[7]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[6]: *** [Makefile:5119: check-TESTS] Error 2
make[6]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[5]: *** [Makefile:6379: check-am] Error 2
make[5]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[4]: *** [Makefile:4903: check-recursive] Error 1
make[4]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[3]: *** [Makefile:6381: check] Error 2
make[3]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[2]: *** [Makefile:3949: check-recursive] Error 1
make[2]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl'
make[1]: *** [Makefile:4100: check] Error 2
make[1]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl'
make: *** [Makefile:2324: check-recursive] Error 1

Test suite failed, dumping logs.

--- ./src/gl/tests/test-suite.log -------------------------------------------

===============================================
   GnuTLS 3.8.2: src/gl/tests/test-suite.log
===============================================

# TOTAL: 167
# PASS:  166
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-free
===============

qemu-aarch64: ../../linux-user/mmap.c:801: mmap_reserve_or_unmap: Assertion `ret == 0' failed.
**
ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
Bail out! ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
FAIL test-free (exit status: 127)

error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("check" "-j" "8") exit-status: 2 term-signal: #f stop-signal: #f>
phase `check' failed after 175.9 seconds
command "make" "check" "-j" "8" failed with status 2