You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strange Makefile build error on tikv-jemalloc-sys 0.7.1 #167
We now get the following build error while trying to build tikv-jemalloc-sys:
--- stderr
make[2]:***No rule to make target 's'.Stop.thread'main'(47826) panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/build.rs:441:9:
command did not execute successfully:cd"/home/ubuntu/polars/target/debug/build/tikv-jemalloc-sys-241a2b995cdbb770/out/build" && MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9 s""make"
expected success, got: exit status:2
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
This is not how you merge MAKEFLAGS. Make is very strange in that it will parse and mangle the command line options, turning single-character flags into a block at the start. Take a look at this Makefile:
foo:
echo $(MAKEFLAGS)
If I now run:
$ make -w -j 8 -k foo
wk --jobserver-fds=3,4 -j
Note how it combined the -w and -k options into just a string wk at the start?
However if you now naively concatenate this with something which specified -k, you'd get:
ws --jobserver-fds=3,4 -j k
Now this might work with some versions of Make, but not GNU Make:
$ MAKEFLAGS='-j16 s' make
make: *** No rule to make target 's'. Stop.
$ make --v
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I believe the issue is only happening with make>=4.4, since I am able to use the same code to successfully build on Debian 12 (which has make version 4.3). All the platforms listed here have make>=4.4.
Activity
[-]Strange build error on tikv-jemalloc-sys 0.7.1[/-][+]Strange Makefile build error on tikv-jemalloc-sys 0.7.1[/+]orlp commentedon Jun 11, 2026
The problem lies here:
jemallocator/jemalloc-sys/build.rs
Line 405 in 0e91291
This is not how you merge
MAKEFLAGS. Make is very strange in that it will parse and mangle the command line options, turning single-character flags into a block at the start. Take a look at thisMakefile:If I now run:
Note how it combined the
-wand-koptions into just a stringwkat the start?However if you now naively concatenate this with something which specified
-k, you'd get:Now this might work with some versions of Make, but not GNU Make:
jsf9k commentedon Oct 28, 2026
I am seeing something similar when trying to build aws/efs-utils on Debian 13 and 14, Kali, and Fedora 43 and 44:
jsf9k commentedon Oct 28, 2026
I believe the issue is only happening with
make>=4.4, since I am able to use the same code to successfully build on Debian 12 (which hasmakeversion 4.3). All the platforms listed here havemake>=4.4.