Skip to content

Unable to build for Debian Forky/Kali #385

Open

Description

@jsf9k

I have to support Kali AMIs that need to use efs-utils. Kali is based on Debian Testing, which is currently Forky. I am unable to build any version of efs-utils for this platform.

Building version 2.4.2 (with gcc 13) fails with:

/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-fips-sys-0.13.9/aws-lc  │   /crypto/fipsmodule/bcm.c:41:", " 
  │   /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-fips-sys-0.13.9/aws-lc  │   /crypto/fipsmodule/../internal.h: In function 'OPENSSL_memchr':", " 
  │   /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-fips-sys-0.13.9/aws-lc  │   /crypto/fipsmodule/../internal.h:921:10: error: return discards 'const' qualifier from
  │   pointer target type [-Werror=discarded-qualifiers]", "    921 |   return memchr(s, c,
  │   n);", "        |          ^~~~~~", "  At top level:", "  cc1: note: unrecognized
  │   command-line option '-Wno-c11-extensions' may have been intended to silence earlier
  │   diagnostics", "  cc1: all warnings being treated as errors", "

because Debian Forky/Kali ships with version 2.43 of glibc. This version of glibc uses ISO C23 type-generic macros. In C23, passing a const pointer to these functions automatically forces them to return a const pointer.

Building version 3.4.3 (with gcc 13 or 14) fails with:

"error: failed to run custom build
  │   command for `tikv-jemalloc-sys
  │   v0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7`", "", "Caused by:", " 
  │   process didn't exit successfully:
  │   `/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-46e976685df1220f/build-script  │   -build` (exit status: 101)", "  --- stdout", "  TARGET=x86_64-unknown-linux-gnu", " 
  │   HOST=x86_64-unknown-linux-gnu", "  NUM_JOBS=8", " 
  │   OUT_DIR=\"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out  │   \"", " 
  │   BUILD_DIR=\"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/o  │   ut/build\"", " 
  │   SRC_DIR=\"/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0  │   .6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7\"", " 
  │   cargo:rustc-cfg=prefixed", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_OVERRIDE", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE", " 
  │   cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu", "  CC_x86_64-unknown-linux-gnu
  │   = None", "  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu", " 
  │   CC_x86_64_unknown_linux_gnu = None", "  cargo:rerun-if-env-changed=HOST_CC", "  HOST_CC
  │   = None", "  cargo:rerun-if-env-changed=CC", "  CC = Some(gcc-13)", " 
  │   cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM", "  CC_KNOWN_WRAPPER_CUSTOM =
  │   None", "  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT", " 
  │   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS", "  CRATE_CC_NO_DEFAULTS = None", " 
  │   cargo:rerun-if-env-changed=CFLAGS", "  CFLAGS = None", " 
  │   cargo:rerun-if-env-changed=HOST_CFLAGS", "  HOST_CFLAGS = None", " 
  │   cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu", " 
  │   CFLAGS_x86_64_unknown_linux_gnu = None", " 
  │   cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu", " 
  │   CFLAGS_x86_64-unknown-linux-gnu = None", "  CC=\"gcc-13\"", "  CFLAGS=\"-O3
  │   -ffunction-sections -fdata-sections -fPIC -m64 -Wall\"", " 
  │   JEMALLOC_REPO_DIR=\"jemalloc\"", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_MALLOC_CONF", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_PAGE", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_HUGEPAGE", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_QUANTUM", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM", " 
  │   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_VADDR", " 
  │   cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR", " 
  │   --with-jemalloc-prefix=_rjem_", "  CARGO_FEATURE_STATS not set", "  running: cd
  │   \"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build\"  │   && CC=\"gcc-13\" CFLAGS=\"-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall\"
  │   CPPFLAGS=\"-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall\" LDFLAGS=\"-O3
  │   -ffunction-sections -fdata-sections -fPIC -m64 -Wall\" \"sh\"
\"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build/c  │   onfigure\" \"--with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7\"
  │   \"--disable-cxx\" \"--enable-doc=no\" \"--enable-shared=no\"
  │   \"--with-jemalloc-prefix=_rjem_\" \"--with-private-namespace=_rjem_\"
  │   \"--disable-stats\" \"--host=x86_64-unknown-linux-gnu\"
  │   \"--build=x86_64-unknown-linux-gnu\"
  │   \"--prefix=/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/ou  │   t\"",
<snip>
  │   ===============================================================================", " 
  │   jemalloc version   : 5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7", "  library
  │   revision   : 2", "", "  CONFIG             :
  │   --with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 --disable-cxx
  │   --enable-doc=no --enable-shared=no --with-jemalloc-prefix=_rjem_
  │   --with-private-namespace=_rjem_ --disable-stats --host=x86_64-unknown-linux-gnu
  │   --build=x86_64-unknown-linux-gnu
  │   --prefix=/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out
  │   build_alias=x86_64-unknown-linux-gnu host_alias=x86_64-unknown-linux-gnu CC=gcc-13
  │   'CFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'LDFLAGS=-O3
  │   -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'CPPFLAGS=-O3 -ffunction-sections
  │   -fdata-sections -fPIC -m64 -Wall' CXX=g++-13", "  CC                 : gcc-13", " 
  │   CONFIGURE_CFLAGS   : -std=gnu11 -Wall -Wextra -Wsign-compare -Wundef
  │   -Wno-format-zero-length -Wpointer-arith -Wno-missing-braces
  │   -Wno-missing-field-initializers -Wno-missing-attributes -pipe -g3 -fvisibility=hidden
  │   -Wimplicit-fallthrough -O3 -funroll-loops", "  SPECIFIED_CFLAGS   : -O3
  │   -ffunction-sections -fdata-sections -fPIC -m64 -Wall", "  EXTRA_CFLAGS       : ", " 
  │   CPPFLAGS           : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
  │   -D_GNU_SOURCE -D_REENTRANT", "  CXX                : g++-13", "  CONFIGURE_CXXFLAGS :
  │   -fvisibility=hidden -Wimplicit-fallthrough -O3", "  SPECIFIED_CXXFLAGS : ", " 
  │   EXTRA_CXXFLAGS     : ", "  LDFLAGS            : -O3 -ffunction-sections -fdata-sections
  │   -fPIC -m64 -Wall", "  EXTRA_LDFLAGS      : ", "  DSO_LDFLAGS        : -shared
  │   -Wl,-soname,$(@F)", "  LIBS               : -lm  -pthread", "  RPATH_EXTRA        : ",
  │   "", "  XSLTPROC           : false", "  XSLROOT            : ", "", "  PREFIX           
  │   : /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out", " 
  │   BINDIR             :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/bin", " 
  │   DATADIR            :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/share",
  │   "  INCLUDEDIR         :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/include",  │   "  LIBDIR             :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/lib", " 
  │   MANDIR             :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/share/man  │   ", "", "  srcroot            : ", "  abs_srcroot        :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build/",
  │   "  objroot            : ", "  abs_objroot        :
  │   /tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build/",
  │   "", "  JEMALLOC_PREFIX    : _rjem_", "  JEMALLOC_PRIVATE_NAMESPACE", "                 
  │   : _rjem_je_", "  install_suffix     : ", "  malloc_conf        : ", "  documentation   
  │   : 0", "  shared libs        : 0", "  static libs        : 1", "  autogen            :
  │   0", "  debug              : 0", "  stats              : 0", "  experimental_smallocx :
  │   0", "  prof               : 0", "  prof-libunwind     : 0", "  prof-libgcc        : 0",
  │   "  prof-gcc           : 0", "  fill               : 1", "  utrace             : 0", " 
  │   xmalloc            : 0", "  log                : 0", "  lazy_lock          : 0", " 
  │   cache-oblivious    : 1", "  cxx                : 0", " 
  │   ===============================================================================", " 
  │   running: cd
  │   \"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build\"  │   && MAKEFLAGS=\" -- RUSTFLAGS=-C\\\\ linker=gcc-13 CXX=g++-13 CC=gcc-13 -j
  │   --jobserver-fds=3,11 --jobserver-auth=3,11\" \"make\"", "  make[1]: Entering directory
  │   '/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build'",  │   "  make[1]: Leaving directory
  │   '/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build'",  │   "", "  --- stderr", "  make[1]: *** No rule to make target '-j'.  Stop.", "", "  thread
  │   'main' (16125) panicked at
  │   /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0.6.1+5.3.0  │   -1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/build.rs:411:9:", "  command did not
  │   execute successfully: cd
  │   \"/tmp/efs-utils/src/target/release/build/tikv-jemalloc-sys-3b6221c80805e387/out/build\"  │   && MAKEFLAGS=\" -- RUSTFLAGS=-C\\\\ linker=gcc-13 CXX=g++-13 CC=gcc-13 -j
  │   --jobserver-fds=3,11 --jobserver-auth=3,11\" \"make\"", "  expected success, got: exit
  │   status: 2", "  note: run with `RUST_BACKTRACE=1` environment variable to display a
  │   backtrace", "warning: build failed, waiting for other jobs to finish...", "gmake: ***
  │   [Makefile:86: deb] Error 101"], "stdout": "./build-deb.sh\nCleaning deb build
  │   workspace\nCreating application directories\nBuilding efs-proxy\n", "stdout_lines":
  │   ["./build-deb.sh", "Cleaning deb build workspace", "Creating application directories",
  │   "Building efs-proxy"]}

I see the same issue when trying to build 3.3.4 RPMs for Fedora as well.

Activity

  1. samuhale commented on Oct 27, 2026

    @samuhale
    Contributor

    We do not recommend backporting efs-utils 2.x, as it is not receiving continuous support.

    For 3.x, it looks like an issue with MAKEFLAGS. I don't believe those are configured by efs-utils

  2. jsf9k commented on Oct 28, 2026

    @jsf9k
    ContributorAuthor

    I think tikv/jemallocator#167 is the underlying issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions