On Thu, Sep 26, 2024 at 10:29:03AM +0200, Thomas Klausner wrote: > Hi! > > With latest source, I see > > --- Process.lo --- > In file included from > /usr/src/tools/llvm-lib/libLLVMSupport/../../llvm/../../external/apache2/llvm/lib/../dist/llvm/lib/Support/Process.cpp:108: > /usr/src/tools/llvm-lib/libLLVMSupport/../../llvm/../../external/apache2/llvm/lib/../dist/llvm/lib/Support/Unix/Process.inc:38:10: > fatal error: malloc_np.h: No such file or directory > 38 | #include <malloc_np.h> > | ^~~~~~~~~~~~~ > compilation terminated. > > when building with > > build.sh -j 32 -x -V MKDEBUG=yes -V MKDEBUGLIB=yes -T /usr/obj/tools.gcc -m > amd64 -O /usr/obj/src.amd64 -D /usr/obj/amd64.gcc.20240926 -R > /usr/obj/amd64.gcc.20240926.release distribution > > It's repeatable, on two consecutive tries.
The problem is that this file expects malloc_np.h to exist when HAVE_MALLCTL is set. Its own check does check for the existence of the header file too: /usr/src/tools/llvm-lib/libLLVMSupport/../../llvm/../../external/apache2/llvm/lib/../dist/llvm/cmake/config-ix.cmake:check_symbol_exists(mallctl malloc_np.h HAVE_MALLCTL) But in the object file generated in the tools dir it is set: # grep -r HAVE_MALLCTL /usr/obj/src.amd64 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:| #define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.log:#define HAVE_MALLCTL 1 /usr/obj/src.amd64/tools/llvm/config/config.status:D["HAVE_MALLCTL"]=" 1" /usr/obj/src.amd64/tools/llvm/config/include/llvm/Config/config.h:#define HAVE_MALLCTL 1 I think this is because the autoconf version only checks for the symbol and not the header: ./external/apache2/llvm/autoconf/autoconf/configure.ac:AC_CHECK_FUNCS([mallinfo mallctl]) but someone more versed in the tools/ framework might know better. So what's the proper fix and why doesn't this hit anyone else? Or is it that noone else is building on a 'new' jemalloc system yet? Thomas