Skip to content

dpkg-buildpackage -j mishandled by debian cargo wrapper

It appears the cargo wrapper doesn't like -j to dpkg-buildpackage. From the log below I assume it sees DEB_BUILD_OPTIONS=parallel= in ENV, and then adds -j to the cargo invocation. But apparently cargo expects -j<something> or -j <something>.

If there is really an extra = in DEB_BUILD_OPTIONS, that might be a dpkg-buildpackage issue.

(sid_s390x-dchroot)zeha@zelenka:~/pdns-recursor-5.3.0$ dpkg-buildpackage -j
dpkg-buildpackage: info: source package pdns-recursor
dpkg-buildpackage: info: source version 5.3.0-4
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Chris Hofstaedtler <zeha@debian.org>
dpkg-buildpackage: info: host architecture s390x
 dpkg-source --before-build .
 debian/rules clean
dh clean --buildsystem=meson
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/zeha/pdns-recursor-5.3.0'
dh_auto_clean
rm -f dnslabeltext.cc
chmod +x mkpubsuffixcc || true
rm -rf debian/cargo_registry
make[1]: Leaving directory '/home/zeha/pdns-recursor-5.3.0'
   dh_autoreconf_clean -O--buildsystem=meson
   dh_clean -O--buildsystem=meson
 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building pdns-recursor using existing ./pdns-recursor_5.3.0.orig.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: warning: ignoring deletion of file dnslabeltext.cc, use --include-removal to override
dpkg-source: info: building pdns-recursor in pdns-recursor_5.3.0-4.debian.tar.xz
dpkg-source: info: building pdns-recursor in pdns-recursor_5.3.0-4.dsc
 debian/rules binary
dh binary --buildsystem=meson
   dh_update_autotools_config -O--buildsystem=meson
   dh_autoreconf -O--buildsystem=meson
build-aux/gen-version: 10: git: not found
build-aux/gen-version: 10: git: not found
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
build-aux/gen-version: 10: git: not found
build-aux/gen-version: 10: git: not found
build-aux/gen-version: 10: git: not found
configure.ac:10: installing 'build-aux/compile'
configure.ac:5: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/home/zeha/pdns-recursor-5.3.0'
/usr/share/cargo/bin/cargo prepare-debian debian/cargo_registry --link-from-system
debian cargo wrapper: options = ['parallel='], profiles = [], parallel = ['-j'], lto =
debian cargo wrapper: rust_type = s390x-unknown-linux-gnu, gnu_type = s390x-linux-gnu
debian cargo wrapper: linking /usr/share/cargo/registry/* into /home/zeha/pdns-recursor-5.3.0/debian/cargo_registry/
echo> ./rec-rust-lib/rust/Cargo.lock
PATH=debian/configure-helpers/:$PATH dh_auto_configure -- \
	--sysconfdir=/etc/powerdns \
	-Dreproducible=true \
	-Dunit-tests=true \
	-Dsystemd-service=enabled \
	-Dsystemd-service-user=pdns \
	-Dsystemd-service-group=pdns \
	-Dlibcap=enabled \
	-Dsigners-libsodium=enabled \
	-Dsigners-libcrypto=enabled \
	-Dlua=auto \
	-Dsnmp=enabled \
	-Ddns-over-tls=enabled \
	-Ddnstap=enabled
	cd obj-s390x-linux-gnu && DEB_PYTHON_INSTALL_LAYOUT=deb LC_ALL=C.UTF-8 meson setup .. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/s390x-linux-gnu -Dpython.bytecompile=-1 --sysconfdir=/etc/powerdns -Dreproducible=true -Dunit-tests=true -Dsystemd-service=enabled -Dsystemd-service-user=pdns -Dsystemd-service-group=pdns -Dlibcap=enabled -Dsigners-libsodium=enabled -Dsigners-libcrypto=enabled -Dlua=auto -Dsnmp=enabled -Ddns-over-tls=enabled -Ddnstap=enabled
The Meson build system
Version: 1.9.0
Source dir: /home/zeha/pdns-recursor-5.3.0
Build dir: /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu
Build type: native build
Project name: pdns-recursor
Project version: 5.3.0
C compiler for the host machine: cc (gcc 15.2.0 "cc (Debian 15.2.0-3) 15.2.0")
C linker for the host machine: cc ld.bfd 2.45
C++ compiler for the host machine: c++ (gcc 15.2.0 "c++ (Debian 15.2.0-3) 15.2.0")
C++ linker for the host machine: c++ ld.bfd 2.45
Host machine cpu family: s390x
Host machine cpu: s390x
Compiler for C++ supports link arguments -Wl,-no_warn_duplicate_libraries: NO
Checking for size of "time_t" : 8
Checking if "time_t is signed" compiles: YES
Checking if "-latomic is not needed for using __atomic builtins" links: YES
Run-time dependency threads found: YES
Check usable header "pthread.h" with dependency threads: YES
Check usable header "pthread_np.h" with dependency threads: NO
Checking if "2-arg pthread_setname_np" with dependency threads links: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES
Checking for function "pthread_getattr_np" with dependency threads: YES
Checking for function "pthread_get_stackaddr_np" with dependency threads: NO
Checking for function "pthread_get_stacksize_np" with dependency threads: NO
Header "string.h" has symbol "strerror_r" : YES
Checking for function "strerror_r" : YES
Checking if "strerror_r() returns char *" compiles: YES
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency luajit found: NO (tried pkgconfig and cmake)
Message: LuaJIT not found
Run-time dependency lua5.3 found: YES 5.3.6
Has header "lua.hpp" with dependency lua5.3: YES
Compiler for C++ supports arguments -fstack-protector: YES
Compiler for C++ supports arguments --param=ssp-buffer-size=4: YES
Compiler for C++ supports link arguments -Wl,-z,relro: YES
Compiler for C++ supports link arguments -Wl,-z,now: YES
../meson/hardening/meson.build:24: WARNING: Building position independent executables (PIEs) is disabled or not supported
Compiler for C++ supports arguments -D_FORTIFY_SOURCE=3: YES
Checking for function "inet_aton" : YES
Checking for function "gethostbyname" : YES
Checking for function "socket" : YES
Checking for function "gethostent" : YES
Checking for function "recvmmsg" : YES
Checking for function "sendmmsg" : YES
Checking for function "accept4" : YES
Header "ifaddrs.h" has symbol "getifaddrs" : YES
Checking whether type "struct tm" has member "tm_gmtoff" : YES
Has header "sys/mman.h" : YES
Checking for function "mmap" : YES
Run-time dependency libsodium found: YES 1.0.18
Checking for function "crypto_box_easy_afternm" with dependency libsodium: YES
Checking for function "crypto_box_curve25519xchacha20poly1305_easy" with dependency libsodium: YES
Checking for function "randombytes_stir" with dependency libsodium: YES
Checking for function "sodium_memcmp" with dependency libsodium: YES
Checking for function "crypto_shorthash" with dependency libsodium: YES
Run-time dependency libcrypto found: YES 3.5.2
Checking if "libcrypto test program" with dependency libcrypto links: YES
Checking for function "RAND_bytes" with dependency libcrypto: YES
Checking for function "RAND_pseudo_bytes" with dependency libcrypto: YES
Checking for function "CRYPTO_memcmp" with dependency libcrypto: YES
Checking for function "OPENSSL_init_crypto" with dependency libcrypto: YES
Checking for function "EVP_MD_CTX_new" with dependency libcrypto: YES
Checking for function "EVP_MD_CTX_free" with dependency libcrypto: YES
Checking for function "RSA_get0_key" with dependency libcrypto: YES
Checking for function "OCSP_basic_sign" with dependency libcrypto: YES
Header "openssl/kdf.h" has symbol "EVP_PKEY_CTX_set1_scrypt_salt" with dependency libcrypto: YES
Has header "openssl/ecdsa.h" with dependency libcrypto: YES
Header "openssl/evp.h" has symbol "NID_X9_62_prime256v1" with dependency libcrypto: YES
Header "openssl/evp.h" has symbol "NID_secp384r1" with dependency libcrypto: YES
Header "openssl/evp.h" has symbol "NID_ED25519" with dependency libcrypto: YES
Header "openssl/evp.h" has symbol "NID_ED448" with dependency libcrypto: YES
Run-time dependency libssl found: YES 3.5.2
Checking for function "SSL_CTX_set_ciphersuites" with dependency libssl: YES
Checking for function "SSL_CTX_set_num_tickets" with dependency libssl: YES
Checking for function "SSL_CTX_set_keylog_callback" with dependency libssl: YES
Checking for function "SSL_CTX_get0_privatekey" with dependency libssl: YES
Checking for function "SSL_set_hostflags" with dependency libssl: YES
Checking for function "SSL_CTX_set_alpn_protos" with dependency libssl: YES
Checking for function "SSL_CTX_set_next_proto_select_cb" with dependency libssl: YES
Checking for function "SSL_get0_alpn_selected" with dependency libssl: YES
Checking for function "SSL_get0_next_proto_negotiated" with dependency libssl: YES
Checking for function "SSL_CTX_set_alpn_select_cb" with dependency libssl: YES
Checking for function "SSL_CTX_use_cert_and_key" with dependency libssl: YES
Header "openssl/ssl.h" has symbol "SSL_CTX_set_min_proto_version" with dependency libssl: YES
Program net-snmp-config found: YES (/usr/bin/net-snmp-config)
Checking for function "snmp_select_info2" : YES
Checking for function "clock_gettime" : YES
Run-time dependency Boost found: YES 1.83.0 (/usr/include)
Run-time dependency Boost (found: context) found: YES 1.83.0 (/usr)
Run-time dependency Boost (found: unit_test_framework) found: YES 1.83.0 (/usr)
Run-time dependency Boost (found: filesystem) found: YES 1.83.0 (/usr)
Run-time dependency libsystemd found: YES 258
Run-time dependency systemd found: YES 258
Checking for function "localtime_r" : YES
Checking for function "gmtime_r" : YES
Checking for function "recvmmsg" : YES (cached)
Checking for function "sched_setscheduler" : YES
Checking for function "getrandom" : YES
Checking for function "arc4random" : YES
Checking for function "getentropy" : YES
Checking for function "arc4random_uniform" : YES
Checking for function "arc4random_buf" : YES
Checking for function "explicit_bzero" : YES
Checking for function "explicit_memset" : NO
Checking for function "memset_s" : NO
Has header "sys/random.h" : YES
Run-time dependency resolv found: NO (tried pkgconfig and cmake)
Library resolv found: YES
Checking if "-lresolv is needed" with dependency -lresolv links: YES
Run-time dependency libfstrm found: YES 0.6.1
Checking for function "fstrm_tcp_writer_init" with dependency libfstrm: YES
Run-time dependency libcurl found: YES 8.16.0-rc3
Run-time dependency libcap found: YES 2.75
Checking for function "dlopen" : YES
Program python3 found: YES (/usr/bin/python3)
Program build_recrust found: YES (/home/zeha/pdns-recursor-5.3.0/rec-rust-lib/rust/build_recrust)
Program cargo found: YES (/usr/bin/cargo)
Configuring config.h using configuration
Program sh found: YES (/usr/bin/sh)
Program incfiles found: YES (/home/zeha/pdns-recursor-5.3.0/incfiles)
Program python3 found: YES (/usr/bin/python3)
Program cp found: YES (/usr/bin/cp)
Program ragel found: YES (/usr/bin/ragel)
Program python3 (venv) found: YES (/usr/bin/python3) modules: venv
Configuring pdns-recursor.service using configuration
Configuring pdns-recursor@.service using configuration
Build targets in project: 23

pdns-recursor 5.3.0

  Build
    Source Dir                : /home/zeha/pdns-recursor-5.3.0
    Build Dir                 : /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu

  System
    System                    : linux
    C++ Compiler              : gcc
    C++ Compiler Version      : 15.2.0
    C++ Compiler Command      : c++
    Linker                    : ld.bfd
    Platform Defines          : HAVE_LINUX
    Size of time_t            : 8
    Signed time_t             : YES
    Need -latomic             : NO
    tm_gmtoff                 : YES
    clock_gettime             : YES
    Need -lresolv             : YES
    dlopen                    : YES

  POSIX Threads
    Threads                   : YES
    Have <pthread.h>          : YES
    Have <pthread_np.h>       : NO
    pthread_setname Variant   : HAVE_PTHREAD_SETNAME_NP_2
    Description               : pthread_setname_np takes 2 arguments (Linux/glibc, QNX, IBM)
    pthread_setaffinity_np    : YES
    pthread_getattr_np        : YES
    pthread_get_stackaddr_np  : NO
    pthread_get_stacksize_np  : NO

  Function strerror_r
    Symbol                    : YES
    Declaration               : YES
    Returns char *            : YES

  Lua
    Lua                       : YES
    Implementation            : lua5.3
    Version                   : 5.3.6
    Have <lua.hpp>            : YES

  Hardening
    PIE                       : NO
    Stack Protector           : YES
    Stack Smashing Protection : YES
    SSP Buffer Size           : 4
    RELRO                     : YES
    Source Fortification      : YES
    Source Fortification Level: 3
    Control Flow Protection   : NO
    Stack Clash Protection    : NO

  Networking Functions
    inet_aton                 : YES
    gethostbyname             : YES
    socket                    : YES
    gethostent                : YES
    recvmmsg                  : YES
    sendmmsg                  : YES
    accept4                   : YES
    getifaddrs                : YES

  Function mmap
    Have <sys/mman.h>         : YES
    mmap                      : YES

  Crypto
    libsodium signers         : YES
    OpenSSL libcrypto         : YES
    OpenSSL libcrypto ECDSA   : YES
    OpenSSL libcrypto ED25519 : YES
    OpenSSL libcrypto ED448   : YES
    OpenSSL libcrypto EdDSA   : YES
    OpenSSL libssl            : YES

  Configuration
    SNMP                      : YES
    DNS over TLS              : YES
    libsystemd                : YES
    Systemd                   : YES
    Auto Var Init             : disabled
    Sanitizers                : none
    DNSTAP                    : YES
    CURL                      : YES
    NOD                       : YES

  Boost
    Boost                     : YES
    Version                   : 1.83.0
    Test                      : YES
    Filesystem                : YES

  Reproducible Builds
    Reproducible Builds       : YES

  Systemd
    Lib Version               : 258
    Version                   : 258
    Service User              : pdns
    Service Group             : pdns

  Various Functions
    localtime_r               : YES
    gmtime_r                  : YES
    recvmmsg                  : YES
    sched_setscheduler        : YES
    getrandom                 : YES
    arc4random                : YES
    getentropy                : YES
    arc4random_uniform        : YES
    arc4random_buf            : YES
    explicit_bzero            : YES
    explicit_memset           : NO
    memset_s                  : NO

  Capabilities
    libcap support            : YES

  DNS Labels
    Ragel                     : YES
    Ragel Path                : /usr/bin/ragel
    Ragel Version             : 6.10

  Manual Pages
    Python                    : YES
    Path                      : /usr/bin/python3
    Version                   : 3.13.7
    Generating man pages      : false

  User defined options
    buildtype                 : plain
    dns-over-tls              : enabled
    dnstap                    : enabled
    libcap                    : enabled
    libdir                    : lib/s390x-linux-gnu
    localstatedir             : /var
    lua                       : auto
    prefix                    : /usr
    python.bytecompile        : -1
    reproducible              : true
    signers-libcrypto         : enabled
    signers-libsodium         : enabled
    snmp                      : enabled
    sysconfdir                : /etc/powerdns
    systemd-service           : enabled
    systemd-service-group     : pdns
    systemd-service-user      : pdns
    unit-tests                : true
    wrap_mode                 : nodownload

Found ninja-1.12.1 at /usr/bin/ninja
make[1]: Leaving directory '/home/zeha/pdns-recursor-5.3.0'
   dh_auto_build -O--buildsystem=meson
	cd obj-s390x-linux-gnu && LC_ALL=C.UTF-8 ninja -j1 -v
[1/184] /usr/bin/python3 ../rec-rust-lib/generate.py ../rec-rust-lib ./rec-rust-lib
Generate: using srcdir and gendir from argumens
Generate cwd: /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu
Generate srcdir: ../rec-rust-lib = /home/zeha/pdns-recursor-5.3.0/rec-rust-lib
Generate gendir: ./rec-rust-lib = /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu/rec-rust-lib
[1/184] /usr/bin/meson --internal exe --unpickle /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu/meson-private/meson_exe_build_recrust_9982d2cae79c69befaebee93d1085c3ca63dae05.dat
debian cargo wrapper: options = ['parallel='], profiles = [], parallel = ['-j'], lto =
debian cargo wrapper: rust_type = s390x-unknown-linux-gnu, gnu_type = s390x-linux-gnu
debian cargo wrapper: running subprocess (['env', 'RUST_BACKTRACE=1', '/usr/bin/cargo', '-Zavoid-dev-deps', 'build', '--verbose', '--verbose', '-j', '--target', 's390x-unknown-linux-gnu', '--release', '--target-dir=./target', '--manifest-path', '/home/zeha/pdns-recursor-5.3.0/rec-rust-lib/rust/Cargo.toml'],) {}
error: unexpected argument 's390x-unknown-linux-gnu' found

Usage: cargo build [OPTIONS]

For more information, try '--help'.
while executing ['/home/zeha/pdns-recursor-5.3.0/rec-rust-lib/rust/build_recrust']
FAILED: rec-rust-lib/rust/librecrust.a rec-rust-lib/rust/cxx.h rec-rust-lib/rust/lib.rs.h rec-rust-lib/rust/misc.rs.h rec-rust-lib/rust/web.rs.h
/usr/bin/meson --internal exe --unpickle /home/zeha/pdns-recursor-5.3.0/obj-s390x-linux-gnu/meson-private/meson_exe_build_recrust_9982d2cae79c69befaebee93d1085c3ca63dae05.dat
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-s390x-linux-gnu && LC_ALL=C.UTF-8 ninja -j1 -v returned exit code 1
make: *** [debian/rules:24: binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2