saghul/txiki.js

Build problems on Void Linux

ItsTheWhale opened this issue · 1 comments

Problem

Attempted to build the software (commit 67f7059) but having CMake errors.

Environment

Void Linux with Linux 6.6_1 on x86_64, with installed dependencies base-devel (20181003_2), libcurl-devel (8.6.0_1), cmake (3.27.6_1), autoconf (2.71_1), texinfo (7.0.3_1), libtool (2.4.7_5).

Expected Result

Successful build with no errors.

Actual Result

CMake error.

$ git clone --recursive https://github.com/saghul/txiki.js --shallow-submodules
$ cd txiki.js
$ make
cmake -B build -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building in Release mode
-- Building with GNU 13.2.0 on Linux-6.6.16_1
--   BUILD_WITH_ASAN: OFF
--   USE_EXTERNAL_FFI: OFF
-- Building in Release mode
-- Building with GNU 13.2.0 on Linux-6.6.16_1
-- Performing Test COMPILER_SUPPORTS_Wall
-- Performing Test COMPILER_SUPPORTS_Wall - Success
-- Performing Test COMPILER_SUPPORTS_Werror
-- Performing Test COMPILER_SUPPORTS_Werror - Success
-- Performing Test COMPILER_SUPPORTS_Wextra
-- Performing Test COMPILER_SUPPORTS_Wextra - Success
-- Performing Test COMPILER_SUPPORTS_Wnoimplicitfallthrough
-- Performing Test COMPILER_SUPPORTS_Wnoimplicitfallthrough - Success
-- Performing Test COMPILER_SUPPORTS_Wnosigncompare
-- Performing Test COMPILER_SUPPORTS_Wnosigncompare - Success
-- Performing Test COMPILER_SUPPORTS_Wnomissingfieldinitializers
-- Performing Test COMPILER_SUPPORTS_Wnomissingfieldinitializers - Success
-- Performing Test COMPILER_SUPPORTS_Wnounusedparameter
-- Performing Test COMPILER_SUPPORTS_Wnounusedparameter - Success
-- Performing Test COMPILER_SUPPORTS_Wnounusedvariable
-- Performing Test COMPILER_SUPPORTS_Wnounusedvariable - Success
-- Performing Test COMPILER_SUPPORTS_Wnounusedbutsetvariable
-- Performing Test COMPILER_SUPPORTS_Wnounusedbutsetvariable - Success
-- Performing Test COMPILER_SUPPORTS_Wnoarraybounds
-- Performing Test COMPILER_SUPPORTS_Wnoarraybounds - Success
-- Performing Test COMPILER_SUPPORTS_Wnoformattruncation
-- Performing Test COMPILER_SUPPORTS_Wnoformattruncation - Success
-- Performing Test COMPILER_SUPPORTS_funsignedchar
-- Performing Test COMPILER_SUPPORTS_funsignedchar - Success
--   BUILD_SHARED_LIBS: OFF
--   BUILD_EXAMPLES: OFF
--   BUILD_STATIC_QJS_EXE: OFF
--   CONFIG_ASAN: OFF
--   CONFIG_MSAN: OFF
--   CONFIG_UBSAN: OFF
--   BUILD_QJS_LIBC: OFF
-- Performing Test UV_LINT_W4
-- Performing Test UV_LINT_W4 - Failed
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER_MSVC
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER_MSVC - Failed
-- Performing Test UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC
-- Performing Test UV_LINT_NO_CONDITIONAL_CONSTANT_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_EMPTY_TU_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_FILE_SCOPE_MSVC - Failed
-- Performing Test UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC
-- Performing Test UV_LINT_NO_NONSTANDARD_NONSTATIC_DLIMPORT_MSVC - Failed
-- Performing Test UV_LINT_NO_HIDES_LOCAL
-- Performing Test UV_LINT_NO_HIDES_LOCAL - Failed
-- Performing Test UV_LINT_NO_HIDES_PARAM
-- Performing Test UV_LINT_NO_HIDES_PARAM - Failed
-- Performing Test UV_LINT_NO_HIDES_GLOBAL
-- Performing Test UV_LINT_NO_HIDES_GLOBAL - Failed
-- Performing Test UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC
-- Performing Test UV_LINT_NO_CONDITIONAL_ASSIGNMENT_MSVC - Failed
-- Performing Test UV_LINT_NO_UNSAFE_MSVC
-- Performing Test UV_LINT_NO_UNSAFE_MSVC - Failed
-- Performing Test UV_LINT_WALL
-- Performing Test UV_LINT_WALL - Success
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER - Success
-- Performing Test UV_LINT_STRICT_PROTOTYPES
-- Performing Test UV_LINT_STRICT_PROTOTYPES - Success
-- Performing Test UV_LINT_EXTRA
-- Performing Test UV_LINT_EXTRA - Success
-- Performing Test UV_LINT_UTF8_MSVC
-- Performing Test UV_LINT_UTF8_MSVC - Failed
-- Performing Test UV_F_STRICT_ALIASING
-- Performing Test UV_F_STRICT_ALIASING - Success
-- summary of build options:
    Install prefix:  /usr/local
    Target system:   Linux
    Compiler:
      C compiler:    /usr/bin/cc (GNU)
      CFLAGS:         

CMake Deprecation Warning at deps/sqlite3/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The CXX compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
----
Generator:  Unix Makefiles
Compiler:   GNU
Build Type: Release
LTO:        ON
Flags:          -Dd_m3HasTracer -Wall -Wextra -Wparentheses -Wundef -Wpointer-arith -Wstrict-aliasing=2 -Werror=implicit-function-declaration -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers -Wjump-misses-init -Dd_m3HasWASI
Debug flags:   -g -ggdb -O0
Release flags: -O3 -Wfatal-errors -fomit-frame-pointer -fno-stack-check -fno-stack-protector -march=native
----
-- Found CURL: /usr/lib64/libcurl.so (found version "8.6.0")  
-- Configuring done (2.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/user/Sources/txiki.js/build
cmake --build build -j 12
make[1]: Entering directory '/home/user/Sources/txiki.js/build'
[  0%] Building C object deps/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o
[  1%] Creating directories for 'libffi'
[  3%] Building C object deps/quickjs/CMakeFiles/qjs.dir/libbf.c.o
[  3%] Building C object deps/quickjs/CMakeFiles/qjs.dir/cutils.c.o
[  3%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_wasi.c.o
[  3%] Building C object CMakeFiles/ffi-test.dir/tests/fixtures/ffi-test-lib.c.o
[  6%] Building C object deps/quickjs/CMakeFiles/qjs.dir/libregexp.c.o
[  7%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_uvwasi.c.o
[  7%] Building C object deps/quickjs/CMakeFiles/qjs.dir/libunicode.c.o
[  7%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_libc.c.o
[  9%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_meta_wasi.c.o
[ 11%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/fs-poll.c.o
[ 12%] No download step for 'libffi'
[ 12%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_api_tracer.c.o
[ 14%] Linking C shared library libffi-test.so
[ 15%] Building C object deps/quickjs/CMakeFiles/qjs.dir/quickjs.c.o
[ 15%] No update step for 'libffi'
[ 15%] Built target ffi-test
[ 17%] No patch step for 'libffi'
[ 19%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_bind.c.o
[ 20%] Performing configure step for 'libffi'
[ 20%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/idna.c.o
[ 20%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_code.c.o
/home/user/Sources/txiki.js/deps/wasm3/source/m3_code.c: In function 'EmitWord32':
/home/user/Sources/txiki.js/deps/wasm3/source/m3_code.c:87:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   87 |     * ((u32 *) & i_page->code [i_page->info.lineIndex++]) = i_word;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Sources/txiki.js/deps/wasm3/source/m3_code.c: In function 'EmitWord64':
/home/user/Sources/txiki.js/deps/wasm3/source/m3_code.c:98:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   98 |     * ((u64 *) & i_page->code [i_page->info.lineIndex]) = i_word;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 22%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_compile.c.o
[ 23%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/inet.c.o
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
[ 25%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_core.c.o
/home/user/Sources/txiki.js/deps/wasm3/source/m3_compile.c: In function 'PushConst':
/home/user/Sources/txiki.js/deps/wasm3/source/m3_compile.c:685:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  685 |                 u64 constant = * (u64 *) & o->constants [slot - o->slotFirstConstIndex];
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Sources/txiki.js/deps/wasm3/source/m3_compile.c:706:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  706 |                     constant = * (u64 *) & o->constants [i];
      |                                          ^~~~~~~~~~~~~~~~~~
/home/user/Sources/txiki.js/deps/wasm3/source/m3_compile.c:747:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  747 |                 u64 * constant = (u64 *) & o->constants [constTableIndex];
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 26%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/random.c.o
[ 26%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_env.c.o
[ 26%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/strscpy.c.o
[ 28%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_exec.c.o
[ 30%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/strtok.c.o
[ 31%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_function.c.o
[ 31%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/thread-common.c.o
[ 33%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/threadpool.c.o
[ 33%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_info.c.o
[ 34%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_module.c.o
[ 36%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/timer.c.o
[ 36%] Building C object deps/wasm3/source/CMakeFiles/m3.dir/m3_parse.c.o
[ 36%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/uv-common.c.o
[ 38%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/uv-data-getter-setters.c.o
[ 38%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/version.c.o
[ 39%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/async.c.o
[ 41%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/core.c.o
[ 41%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/dl.c.o
[ 42%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/fs.c.o
[ 44%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/getaddrinfo.c.o
[ 44%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/getnameinfo.c.o
[ 46%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/loop-watcher.c.o
[ 46%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/loop.c.o
[ 47%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/pipe.c.o
[ 49%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/poll.c.o
[ 49%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/process.c.o
[ 50%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/random-devurandom.c.o
[ 50%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/signal.c.o
[ 52%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/stream.c.o
[ 53%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/tcp.c.o
[ 53%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/thread.c.o
autoreconf: running: aclocal -I m4
[ 55%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/tty.c.o
[ 57%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/udp.c.o
[ 57%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/proctitle.c.o
[ 58%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/linux.c.o
[ 58%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/procfs-exepath.c.o
[ 60%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/random-getrandom.c.o
[ 61%] Building C object deps/libuv/CMakeFiles/uv_a.dir/src/unix/random-sysctl-linux.c.o
[ 61%] Linking C static library libuv.a
[ 61%] Built target uv_a
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal -I m4
[ 63%] Linking C static library libm3.a
[ 63%] Built target m3
autoreconf: running: /usr/bin/autoconf
configure.ac:8: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:8: You should run autoupdate.
./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
configure.ac:8: the top level
configure.ac:41: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:41: You should run autoupdate.
m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
configure.ac:41: the top level
configure.ac:74: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:74: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:3: AC_FUNC_MMAP_BLACKLIST is expanded from...
configure.ac:74: the top level
configure.ac:91: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:91: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:91: the top level
configure.ac:118: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:118: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/asmcfi.m4:1: GCC_AS_CFI_PSEUDO_OP is expanded from...
configure.ac:118: the top level
configure.ac:122: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:122: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
configure.ac:122: the top level
configure.ac:138: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:138: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
configure.ac:138: the top level
configure.ac:185: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:185: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
configure.ac:185: the top level
configure.ac:310: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:310: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:310: the top level
configure.ac:418: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:418: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:418: the top level
configure.ac:418: warning: The macro `AC_PROG_LD' is obsolete.
configure.ac:418: You should run autoupdate.
m4/libtool.m4:3350: AC_PROG_LD is expanded from...
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:418: the top level
configure.ac:418: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:418: You should run autoupdate.
./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from...
acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:418: the top level
configure.ac:418: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:418: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
configure.ac:418: the top level
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
autoreconf: Leaving directory '.'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
continue configure in default builddir "./x86_64-pc-linux-gnu"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=x86_64-pc-linux-gnu" "linux
gnu"
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking dependency style of gcc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for libtool-sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for readelf... readelf
checking size of size_t... 8
checking for C compiler vendor... gnu
checking whether C compiler accepts -fstrict-aliasing... yes
checking whether C compiler accepts -ffast-math... yes
checking for gcc architecture flag... 
checking for x86 cpuid 0 output... 20:756e6547:6c65746e:49656e69
checking for x86 cpuid 1 output... 906a4:18400800:7ffafbff:bfebfbff
checking whether C compiler accepts -march=core2... yes
checking for gcc architecture flag... -march=core2
checking whether C compiler accepts  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2... yes
checking CFLAGS for maximum warnings... -Wall
checking whether to enable maintainer-specific portions of Makefiles... no
checking for sys/memfd.h... no
checking for memfd_create... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking for mkostemp... yes
checking for mkstemp... yes
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... yes
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for memcpy... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking size of double... 8
checking size of long double... 16
checking whether byte ordering is bigendian... no
checking assembler .cfi pseudo-op support... yes
checking assembler supports pc related relocs... yes
checking whether compiler supports pointer authentication... no
checking for _ prefix in compiled symbols... no
checking toolchain supports unwind section type... yes
checking whether C compiler accepts -fno-lto... yes
checking whether .eh_frame section should be read-only... yes
checking for __attribute__((visibility("hidden")))... yes
checking for ld used by gcc... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
configure: versioning on shared library symbols is no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating include/Makefile
config.status: creating include/ffi.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating man/Makefile
config.status: creating doc/Makefile
config.status: creating libffi.pc
config.status: creating fficonfig.h
config.status: fficonfig.h is unchanged
config.status: executing buildir commands
config.status: reusing top_srcdir/Makefile from earlier configure
config.status: build in x86_64-pc-linux-gnu (HOST=)
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing include commands
config.status: executing src commands
[ 63%] Performing build step for 'libffi'
MAKE x86_64-pc-linux-gnu : 0 * all-all
Making all in include
Making all in testsuite
Making all in man
Making all in doc
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF src/.deps/raw_api.Tpo -c ../src/raw_api.c -o src/raw_api.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF src/.deps/java_raw_api.Tpo -c ../src/java_raw_api.c -o src/java_raw_api.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/x86/ffi64.lo -MD -MP -MF src/x86/.deps/ffi64.Tpo -c ../src/x86/ffi64.c -o src/x86/ffi64.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c ../src/closures.c -o src/closures.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c -o src/prep_cif.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/types.lo -MD -MP -MF src/.deps/types.Tpo -c ../src/types.c -o src/types.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2 -Wall -fexceptions -MT src/x86/ffiw64.lo -MD -MP -MF src/x86/.deps/ffiw64.Tpo -c ../src/x86/ffiw64.c -o src/x86/ffiw64.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -MT src/x86/unix64.lo -MD -MP -MF src/x86/.deps/unix64.Tpo -c ../src/x86/unix64.S -o src/x86/unix64.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -MT src/x86/win64.lo -MD -MP -MF src/x86/.deps/win64.Tpo -c ../src/x86/win64.S -o src/x86/win64.o
../src/java_raw_api.c: In function 'ffi_java_raw_call':
../src/java_raw_api.c:317:3: warning: 'ffi_java_raw_to_ptrarray' is deprecated [-Wdeprecated-declarations]
  317 |   ffi_java_raw_to_ptrarray (cif, raw, avalue);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
../src/java_raw_api.c:76:1: note: declared here
   76 | ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args)
      | ^~~~~~~~~~~~~~~~~~~~~~~~
../src/java_raw_api.c: In function 'ffi_java_translate_args':
../src/java_raw_api.c:328:3: warning: 'ffi_java_raw_size' is deprecated [-Wdeprecated-declarations]
  328 |   ffi_java_raw *raw = (ffi_java_raw*)alloca (ffi_java_raw_size (cif));
      |   ^~~~~~~~~~~~
../src/java_raw_api.c:45:1: note: declared here
   45 | ffi_java_raw_size (ffi_cif *cif)
      | ^~~~~~~~~~~~~~~~~
../src/java_raw_api.c:331:3: warning: 'ffi_java_ptrarray_to_raw' is deprecated [-Wdeprecated-declarations]
  331 |   ffi_java_ptrarray_to_raw (cif, avalue, raw);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
../src/java_raw_api.c:157:1: note: declared here
  157 | ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw)
      | ^~~~~~~~~~~~~~~~~~~~~~~~
../src/java_raw_api.c: In function 'ffi_prep_java_raw_closure':
../src/java_raw_api.c:369:3: warning: 'ffi_prep_java_raw_closure_loc' is deprecated [-Wdeprecated-declarations]
  369 |   return ffi_prep_java_raw_closure_loc (cl, cif, fun, user_data, cl);
      |   ^~~~~~
../src/java_raw_api.c:337:1: note: declared here
  337 | ffi_prep_java_raw_closure_loc (ffi_java_raw_closure* cl,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libtool: link: rm -fr  .libs/libffi_convenience.a .libs/libffi_convenience.la
libtool: link: rm -fr  .libs/libffi.a .libs/libffi.la .libs/libffi.lai
libtool: link: ar cr .libs/libffi_convenience.a  src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/tramp.o src/x86/ffi64.o src/x86/unix64.o src/x86/ffiw64.o src/x86/win64.o
libtool: link: ar cr .libs/libffi.a  src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/tramp.o src/x86/ffi64.o src/x86/unix64.o src/x86/ffiw64.o src/x86/win64.o
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link: ranlib .libs/libffi.a
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
libtool: link: ( cd ".libs" && rm -f "libffi.la" && ln -s "../libffi.la" "libffi.la" )
[ 63%] Performing install step for 'libffi'
MAKE x86_64-pc-linux-gnu : 0 * install
Making install in include
 /usr/bin/mkdir -p '/home/user/Sources/txiki.js/build/ffi_root/usr/local/include'
 /usr/bin/install -c -m 644 ffi.h ffitarget.h '/home/user/Sources/txiki.js/build/ffi_root/usr/local/include'
Making install in testsuite
Making install in man
 /usr/bin/mkdir -p '/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 ../../man/ffi.3 ../../man/ffi_call.3 ../../man/ffi_prep_cif.3 ../../man/ffi_prep_cif_var.3 '/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/man/man3'
Making install in doc
 /usr/bin/mkdir -p '/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/info'
 /usr/bin/install -c -m 644 ../../doc/libffi.info '/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/info'
 install-info --info-dir='/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/info' '/home/user/Sources/txiki.js/build/ffi_root/usr/local/share/info/libffi.info'
 /usr/bin/mkdir -p '/home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/pkgconfig'
 /usr/bin/mkdir -p '/home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libffi.la '/home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64'
 /usr/bin/install -c -m 644 libffi.pc '/home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/pkgconfig'
libtool: install: /usr/bin/install -c .libs/libffi.lai /home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64/libffi.la
libtool: install: /usr/bin/install -c .libs/libffi.a /home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64/libffi.a
libtool: install: chmod 644 /home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64/libffi.a
libtool: install: ranlib /home/user/Sources/txiki.js/build/ffi_root/usr/local/lib/../lib64/libffi.a
libtool: warning: remember to run 'libtool --finish /usr/local/lib/../lib64'
[ 65%] Completed 'libffi'
[ 65%] Built target libffi
[ 66%] Linking C static library libqjs.a
[ 66%] Built target qjs
[ 68%] Linking C static library libsqlite3.a
[ 68%] Built target sqlite3
[ 73%] Building C object CMakeFiles/tjs.dir/src/builtins.c.o
[ 73%] Building C object CMakeFiles/tjs.dir/src/ffi.c.o
[ 73%] Building C object CMakeFiles/tjs.dir/src/curl-websocket.c.o
[ 73%] Building C object CMakeFiles/tjs.dir/src/curl-utils.c.o
[ 73%] Building C object CMakeFiles/tjs.dir/src/cli.c.o
[ 73%] Building C object CMakeFiles/tjs.dir/src/error.c.o
[ 74%] Building C object CMakeFiles/tjs.dir/src/eval.c.o
[ 74%] Building C object CMakeFiles/tjs.dir/src/fs.c.o
[ 76%] Building C object CMakeFiles/tjs.dir/src/fswatch.c.o
[ 76%] Building C object CMakeFiles/tjs.dir/src/os.c.o
[ 77%] Building C object CMakeFiles/tjs.dir/src/modules.c.o
[ 79%] Building C object CMakeFiles/tjs.dir/src/dns.c.o
[ 80%] Building C object CMakeFiles/tjs.dir/src/process.c.o
[ 80%] Building C object CMakeFiles/tjs.dir/src/sha1.c.o
[ 82%] Building C object CMakeFiles/tjs.dir/src/streams.c.o
[ 84%] Building C object CMakeFiles/tjs.dir/src/signals.c.o
[ 84%] Building C object CMakeFiles/tjs.dir/src/sys.c.o
[ 85%] Building C object CMakeFiles/tjs.dir/src/timers.c.o
[ 85%] Building C object CMakeFiles/tjs.dir/src/udp.c.o
[ 87%] Building C object CMakeFiles/tjs.dir/src/utils.c.o
[ 88%] Building C object CMakeFiles/tjs.dir/src/version.c.o
In function 'SHA1Update',
    inlined from 'SHA1Final' at /home/user/Sources/txiki.js/src/sha1.c:267:5:
/home/user/Sources/txiki.js/src/sha1.c:221:13: warning: 'SHA1Transform' reading 64 bytes from a region of size 0 [-Wstringop-overread]
  221 |             SHA1Transform(context->state, &data[i]);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Sources/txiki.js/src/sha1.c:221:13: note: referencing argument 2 of type 'const unsigned char[64]'
/home/user/Sources/txiki.js/src/sha1.c: In function 'SHA1Final':
/home/user/Sources/txiki.js/src/sha1.c:56:6: note: in a call to function 'SHA1Transform'
   56 | void SHA1Transform(
      |      ^~~~~~~~~~~~~
In function 'SHA1Update',
    inlined from 'SHA1Final' at /home/user/Sources/txiki.js/src/sha1.c:271:9:
/home/user/Sources/txiki.js/src/sha1.c:221:13: warning: 'SHA1Transform' reading 64 bytes from a region of size 0 [-Wstringop-overread]
  221 |             SHA1Transform(context->state, &data[i]);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Sources/txiki.js/src/sha1.c:221:13: note: referencing argument 2 of type 'const unsigned char[64]'
/home/user/Sources/txiki.js/src/sha1.c: In function 'SHA1Final':
/home/user/Sources/txiki.js/src/sha1.c:56:6: note: in a call to function 'SHA1Transform'
   56 | void SHA1Transform(
      |      ^~~~~~~~~~~~~
[ 88%] Building C object CMakeFiles/tjs.dir/src/vm.c.o
[ 90%] Building C object CMakeFiles/tjs.dir/src/wasm.c.o
[ 92%] Building C object CMakeFiles/tjs.dir/src/worker.c.o
[ 92%] Building C object CMakeFiles/tjs.dir/src/ws.c.o
[ 93%] Building C object CMakeFiles/tjs.dir/src/xhr.c.o
[ 93%] Building C object CMakeFiles/tjs.dir/src/_sqlite3.c.o
[ 95%] Building C object CMakeFiles/tjs.dir/src/bundles/c/core/core.c.o
[ 96%] Building C object CMakeFiles/tjs.dir/src/bundles/c/core/polyfills.c.o
[ 96%] Building C object CMakeFiles/tjs.dir/src/bundles/c/core/run-main.c.o
make[3]: *** No rule to make target 'ffi_root/usr/local/lib/libffi.a', needed by 'tjs'.  Stop.
make[3]: *** Waiting for unfinished jobs....
[ 98%] Building C object CMakeFiles/tjs.dir/deps/quickjs/cutils.c.o
[100%] Building C object CMakeFiles/tjs.dir/src/posix-socket.c.o
make[2]: *** [CMakeFiles/Makefile2:211: CMakeFiles/tjs.dir/all] Error 2
make[1]: *** [Makefile:136: all] Error 2
make[1]: Leaving directory '/home/user/Sources/txiki.js/build'
make: *** [Makefile:17: build/tjs] Error 2

Resolution

It appears Libffi installed to lib64 instead of lib. I patched it by appending the flag --disable-multi-os-directory to Libffi's configure command in CMake (line 116) to force it to install to lib instead (see this Stack Overflow question). It builds and works flawlessly.
This patch should be applicable to all systems, since this has no effect on systems where gcc --print-multi-os-directory already outputs lib, and according to above Stack Overflow post is reasonably common.

Merged!