RHEL 8 HPC cluster meson.build:1680:13: ERROR: Neither a subproject directory nor a llvm.wrap file was found.

Rob Kudyba <[email protected]> Fri, 28 Jul 2023 14:41:58 -0400
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CAD6rq1V7uvSksjLdVw3gM-uKEQCT3_1tnmwzwQaPqTFX+LYXSw@mail.gmail.com>
--000000000000784f400601907089
Content-Type: text/plain; charset="UTF-8"

Similar to the error mentioned in "I have build llvm and clang with source,
set llvm-config path to environment variable, but when i tried to build
mesa, it cant detect llvm subModule
<https://github.com/mesonbuild/meson/issues/11503>" meson setup errors out
with meson.build:1680:13: ERROR: Neither a subproject directory nor a
llvm.wrap file was found.

meson --version
1.2.0
Installed into Anaconda 2022-3.

I tried using various permutations of:
-Dllvm=enabled -Dshared-llvm=enabled
-Dcmake_prefix_path=/path/to/llvm/16.0.6/bin
same error, here's the entire output.

~/.local/bin/meson setup -Dllvm=enabled -Dshared-llvm=enabled
-Dcmake_prefix_path=/path/to/llvm/16.0.6/bin builddir/ --default-library
shared --native-file custom-llvm.ini
The Meson build system
Version: 1.2.0
Source dir: /path/to/me/mesa
Build dir: /path/to/me/mesa/builddir
Build type: native build
Project name: mesa
Project version: 23.3.0-devel
C compiler for the host machine: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20191121
(Red Hat 8.3.1-5)")
C linker for the host machine: cc ld.bfd 2.30-119
C++ compiler for the host machine: c++ (gcc 13.0.1 "c++ (GCC) 13.0.1
20230412 (experimental)")
C++ linker for the host machine: c++ ld.bfd 2.30-119
Host machine cpu family: x86_64
Host machine cpu: x86_64
Checking if "-mtls-dialect=gnu2" runs: YES
Checking if "split TLSDESC" : links: YES
Found pkg-config: /usr/bin/pkg-config (1.4.2)
Found CMake: /path/to/cmake/cmake-3.22.1-linux-x86_64/bin/cmake (3.22.1)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency vdpau found: NO (tried pkgconfig and cmake)
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Run-time dependency libomxil-bellagio found: NO (tried pkgconfig and cmake)
Run-time dependency libtizonia found: NO (tried pkgconfig and cmake)
Run-time dependency libtizplatform found: NO (tried pkgconfig and cmake)
Run-time dependency tizilheaders found: NO (tried pkgconfig and cmake)
Run-time dependency libva found: NO (tried pkgconfig and cmake)
Program python3 found: YES (/path/to/anaconda3-2022.05/bin/python3)
Fetching value of define "ETIME" : 62
Checking for function "bswap32" : YES
Checking for function "bswap64" : YES
Checking for function "clz" : YES
Checking for function "clzll" : YES
Checking for function "ctz" : YES
Checking for function "expect" : YES
Checking for function "ffs" : YES
Checking for function "ffsll" : YES
Checking for function "popcount" : YES
Checking for function "popcountll" : YES
Checking for function "unreachable" : YES
Checking for function "types_compatible_p" : NO
Compiler for C supports function attribute const: YES
Compiler for C supports function attribute flatten: YES
Compiler for C supports function attribute malloc: YES
Compiler for C supports function attribute pure: YES
Compiler for C supports function attribute unused: YES
Compiler for C supports function attribute warn_unused_result: YES
Compiler for C supports function attribute weak: YES
Compiler for C supports function attribute format: YES
Compiler for C supports function attribute packed: YES
Compiler for C supports function attribute returns_nonnull: YES
Compiler for C supports function attribute alias: YES
Compiler for C supports function attribute noreturn: YES
Compiler for C supports function attribute visibility:hidden: YES
Checking if "__uint128_t" compiles: YES
Checking for function "reallocarray" : YES
Checking for function "fmemopen" : YES
Checking if "gc-sections" : links: YES
Compiler for C supports arguments -Werror=implicit-function-declaration:
YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wmisleading-indentation: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-format-truncation: YES
Compiler for C supports arguments -Wno-nonnull-compare: YES
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Qunused-arguments: NO
Compiler for C supports arguments -fno-common: YES
Compiler for C supports arguments -Wno-microsoft-enum-value: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Werror=format: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Werror=thread-safety: NO
Compiler for C supports arguments -ffunction-sections: YES
Compiler for C supports arguments -fdata-sections: YES
Compiler for C++ supports arguments -Werror=return-type: YES
Compiler for C++ supports arguments -Werror=empty-body: YES
Compiler for C++ supports arguments -Wmisleading-indentation: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
Compiler for C++ supports arguments -Wno-format-truncation: YES
Compiler for C++ supports arguments -fno-math-errno: YES
Compiler for C++ supports arguments -fno-trapping-math: YES
Compiler for C++ supports arguments -Qunused-arguments: NO
Compiler for C++ supports arguments -flifetime-dse=1: YES
Compiler for C++ supports arguments -Wno-microsoft-enum-value: NO
Compiler for C++ supports arguments -Werror=format: YES
Compiler for C++ supports arguments -Wformat-security: YES
Compiler for C++ supports arguments -ffunction-sections: YES
Compiler for C++ supports arguments -fdata-sections: YES
Compiler for C supports arguments -Wno-override-init: YES
Compiler for C supports arguments -Wno-initializer-overrides: NO
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Werror=gnu-empty-initializer: NO
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C++ supports arguments -Werror=vla: YES
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: NO
Checking if "GCC atomic builtins" compiles: YES
Checking if "GCC atomic builtins required -latomic" : links: YES
Checking if "GCC 64bit atomics" with dependency : links: YES
Library ws2_32 found: NO
Header "sys/sysmacros.h" has symbol "major" : YES
Header "sys/sysmacros.h" has symbol "minor" : YES
Header "sys/sysmacros.h" has symbol "makedev" : YES
Header "sys/mkdev.h" has symbol "major" : NO
Check usable header "sched.h" : YES
Checking for function "sched_getaffinity" : YES
Check usable header "xlocale.h" : NO
Check usable header "linux/futex.h" : YES
Check usable header "endian.h" : YES
Check usable header "dlfcn.h" : YES
Check usable header "sys/shm.h" : YES
Check usable header "cet.h" : YES
Check usable header "pthread_np.h" : NO
Check usable header "renderdoc_app.h" : NO
Check usable header "sys/inotify.h" : YES
Checking for function "strtof" : YES
Checking for function "mkostemp" : YES
Checking for function "memfd_create" : YES
Checking for function "random_r" : YES
Checking for function "flock" : YES
Checking for function "strtok_r" : YES
Checking for function "getrandom" : YES
Checking for function "qsort_s" : NO
Checking for function "posix_fallocate" : YES
Checking if "GNU qsort_r" : links: YES
Header "time.h" has symbol "struct timespec" : YES
Checking for function "thrd_create" : NO
Header "errno.h" has symbol "program_invocation_name" : YES
Header "math.h" has symbol "issignaling" : YES
Checking for function "posix_memalign" : YES
Checking whether type "struct dirent" has member "d_type" : YES
Checking if "strtod has locale support" : links: YES
Checking if "Bsymbolic" : links: YES
Checking if "version-script" : links: YES
Checking if "dynamic-list" : links: YES
Compiler for C supports link arguments -Wl,--build-id=sha1: YES
Checking for function "dlopen" : NO
Library dl found: YES
Checking for function "dladdr" with dependency -ldl: YES
Checking for function "dl_iterate_phdr" : YES
Checking for function "clock_gettime" : YES
Run-time dependency zlib found: YES 1.2.12
Run-time dependency libzstd found: YES 1.4.9
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES
Run-time dependency expat found: YES 2.4.4
Library m found: YES
Message: libdrm 2.4.110 needed because amdgpu has the highest requirement
Run-time dependency libdrm_intel found: YES 2.4.111
Run-time dependency libdrm_amdgpu found: YES 2.4.111
Run-time dependency libdrm_radeon found: YES 2.4.111
Run-time dependency libdrm_nouveau found: YES 2.4.111
Run-time dependency libdrm found: YES 2.4.111
Run-time dependency libudev found: YES 239
llvm-config found: YES (/path/to/llvm/16.0.6/bin/llvm-config) 18.0.0
Run-time dependency LLVM (modules: amdgpu(missing), asmparser, bitreader,
bitwriter, core, engine, executionengine, instcombine, ipo, mcdisassembler,
mcjit, native, scalaropts, transformutils, coroutines, lto) found: NO
(tried cmake and config-tool)
Looking for a fallback subproject for the dependency llvm (modules:
bitwriter, engine, mcdisassembler, mcjit, core, executionengine,
scalaropts, transformutils, instcombine, amdgpu, bitreader, ipo, asmparser,
native)
Building fallback subproject with default_library=shared

meson.build:1680:13: ERROR: Neither a subproject directory nor a llvm.wrap
file was found.

Is this a known issue? Pardon the directory obfuscation...

--000000000000784f400601907089
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Similar=C2=A0to the error mentioned in &quot;<a href=3D"ht=
tps://github.com/mesonbuild/meson/issues/11503">I have build llvm and clang=
 with source, set llvm-config path to environment variable, but when i trie=
d to build mesa, it cant detect llvm subModule</a>&quot; <font face=3D"mono=
space">meson setup</font> errors out with<font face=3D"monospace">=C2=A0mes=
on.build:1680:13: ERROR: Neither a subproject directory nor a llvm.wrap fil=
e was found.</font><br><div><br></div><div>meson --version<br>1.2.0<br></di=
v><div>Installed into Anaconda 2022-3.</div><div><br></div><div>I tried usi=
ng various permutations of:<br><font face=3D"monospace">-Dllvm=3Denabled -D=
shared-llvm=3Denabled -Dcmake_prefix_path=3D/path/to/llvm/16.0.6/bin<br>sam=
e error, here&#39;s the entire output.</font><br><br><font face=3D"monospac=
e">~/.local/bin/meson setup -Dllvm=3Denabled -Dshared-llvm=3Denabled -Dcmak=
e_prefix_path=3D/path/to/llvm/16.0.6/bin builddir/ --default-library shared=
 --native-file custom-llvm.ini<br>The Meson build system<br>Version: 1.2.0<=
br>Source dir: /path/to/me/mesa<br>Build dir: /path/to/me/mesa/builddir<br>=
Build type: native build<br>Project name: mesa<br>Project version: 23.3.0-d=
evel<br>C compiler for the host machine: cc (gcc 8.3.1 &quot;cc (GCC) 8.3.1=
 20191121 (Red Hat 8.3.1-5)&quot;)<br>C linker for the host machine: cc ld.=
bfd 2.30-119<br>C++ compiler for the host machine: c++ (gcc 13.0.1 &quot;c+=
+ (GCC) 13.0.1 20230412 (experimental)&quot;)<br>C++ linker for the host ma=
chine: c++ ld.bfd 2.30-119<br>Host machine cpu family: x86_64<br>Host machi=
ne cpu: x86_64<br>Checking if &quot;-mtls-dialect=3Dgnu2&quot; runs: YES<br=
>Checking if &quot;split TLSDESC&quot; : links: YES <br>Found pkg-config: /=
usr/bin/pkg-config (1.4.2)<br>Found CMake: /path/to/cmake/cmake-3.22.1-linu=
x-x86_64/bin/cmake (3.22.1)<br>WARNING: CMake Toolchain: Failed to determin=
e CMake compilers state<br>Run-time dependency vdpau found: NO (tried pkgco=
nfig and cmake)<br>Program glslangValidator found: YES (/usr/bin/glslangVal=
idator)<br>Run-time dependency libomxil-bellagio found: NO (tried pkgconfig=
 and cmake)<br>Run-time dependency libtizonia found: NO (tried pkgconfig an=
d cmake)<br>Run-time dependency libtizplatform found: NO (tried pkgconfig a=
nd cmake)<br>Run-time dependency tizilheaders found: NO (tried pkgconfig an=
d cmake)<br>Run-time dependency libva found: NO (tried pkgconfig and cmake)=
<br>Program python3 found: YES (/path/to/anaconda3-2022.05/bin/python3)<br>=
Fetching value of define &quot;ETIME&quot; : 62 <br>Checking for function &=
quot;bswap32&quot; : YES <br>Checking for function &quot;bswap64&quot; : YE=
S <br>Checking for function &quot;clz&quot; : YES <br>Checking for function=
 &quot;clzll&quot; : YES <br>Checking for function &quot;ctz&quot; : YES <b=
r>Checking for function &quot;expect&quot; : YES <br>Checking for function =
&quot;ffs&quot; : YES <br>Checking for function &quot;ffsll&quot; : YES <br=
>Checking for function &quot;popcount&quot; : YES <br>Checking for function=
 &quot;popcountll&quot; : YES <br>Checking for function &quot;unreachable&q=
uot; : YES <br>Checking for function &quot;types_compatible_p&quot; : NO <b=
r>Compiler for C supports function attribute const: YES <br>Compiler for C =
supports function attribute flatten: YES <br>Compiler for C supports functi=
on attribute malloc: YES <br>Compiler for C supports function attribute pur=
e: YES <br>Compiler for C supports function attribute unused: YES <br>Compi=
ler for C supports function attribute warn_unused_result: YES <br>Compiler =
for C supports function attribute weak: YES <br>Compiler for C supports fun=
ction attribute format: YES <br>Compiler for C supports function attribute =
packed: YES <br>Compiler for C supports function attribute returns_nonnull:=
 YES <br>Compiler for C supports function attribute alias: YES <br>Compiler=
 for C supports function attribute noreturn: YES <br>Compiler for C support=
s function attribute visibility:hidden: YES <br>Checking if &quot;__uint128=
_t&quot; compiles: YES <br>Checking for function &quot;reallocarray&quot; :=
 YES <br>Checking for function &quot;fmemopen&quot; : YES <br>Checking if &=
quot;gc-sections&quot; : links: YES <br>Compiler for C supports arguments -=
Werror=3Dimplicit-function-declaration: YES <br>Compiler for C supports arg=
uments -Werror=3Dmissing-prototypes: YES <br>Compiler for C supports argume=
nts -Werror=3Dreturn-type: YES <br>Compiler for C supports arguments -Werro=
r=3Dempty-body: YES <br>Compiler for C supports arguments -Werror=3Dincompa=
tible-pointer-types: YES <br>Compiler for C supports arguments -Werror=3Din=
t-conversion: YES <br>Compiler for C supports arguments -Wimplicit-fallthro=
ugh: YES <br>Compiler for C supports arguments -Wmisleading-indentation: YE=
S <br>Compiler for C supports arguments -Wno-missing-field-initializers: YE=
S <br>Compiler for C supports arguments -Wno-format-truncation: YES <br>Com=
piler for C supports arguments -Wno-nonnull-compare: YES <br>Compiler for C=
 supports arguments -fno-math-errno: YES <br>Compiler for C supports argume=
nts -fno-trapping-math: YES <br>Compiler for C supports arguments -Qunused-=
arguments: NO <br>Compiler for C supports arguments -fno-common: YES <br>Co=
mpiler for C supports arguments -Wno-microsoft-enum-value: NO <br>Compiler =
for C supports arguments -Wno-unused-function: YES <br>Compiler for C suppo=
rts arguments -Werror=3Dformat: YES <br>Compiler for C supports arguments -=
Wformat-security: YES <br>Compiler for C supports arguments -Werror=3Dthrea=
d-safety: NO <br>Compiler for C supports arguments -ffunction-sections: YES=
 <br>Compiler for C supports arguments -fdata-sections: YES <br>Compiler fo=
r C++ supports arguments -Werror=3Dreturn-type: YES <br>Compiler for C++ su=
pports arguments -Werror=3Dempty-body: YES <br>Compiler for C++ supports ar=
guments -Wmisleading-indentation: YES <br>Compiler for C++ supports argumen=
ts -Wno-non-virtual-dtor: YES <br>Compiler for C++ supports arguments -Wno-=
missing-field-initializers: YES <br>Compiler for C++ supports arguments -Wn=
o-format-truncation: YES <br>Compiler for C++ supports arguments -fno-math-=
errno: YES <br>Compiler for C++ supports arguments -fno-trapping-math: YES =
<br>Compiler for C++ supports arguments -Qunused-arguments: NO <br>Compiler=
 for C++ supports arguments -flifetime-dse=3D1: YES <br>Compiler for C++ su=
pports arguments -Wno-microsoft-enum-value: NO <br>Compiler for C++ support=
s arguments -Werror=3Dformat: YES <br>Compiler for C++ supports arguments -=
Wformat-security: YES <br>Compiler for C++ supports arguments -ffunction-se=
ctions: YES <br>Compiler for C++ supports arguments -fdata-sections: YES <b=
r>Compiler for C supports arguments -Wno-override-init: YES <br>Compiler fo=
r C supports arguments -Wno-initializer-overrides: NO <br>Compiler for C su=
pports arguments -Werror=3Dpointer-arith: YES <br>Compiler for C supports a=
rguments -Werror=3Dvla: YES <br>Compiler for C supports arguments -Werror=
=3Dgnu-empty-initializer: NO <br>Compiler for C++ supports arguments -Werro=
r=3Dpointer-arith: YES <br>Compiler for C++ supports arguments -Werror=3Dvl=
a: YES <br>Compiler for C++ supports arguments -Werror=3Dgnu-empty-initiali=
zer: NO <br>Checking if &quot;GCC atomic builtins&quot; compiles: YES <br>C=
hecking if &quot;GCC atomic builtins required -latomic&quot; : links: YES <=
br>Checking if &quot;GCC 64bit atomics&quot; with dependency : links: YES <=
br>Library ws2_32 found: NO<br>Header &quot;sys/sysmacros.h&quot; has symbo=
l &quot;major&quot; : YES <br>Header &quot;sys/sysmacros.h&quot; has symbol=
 &quot;minor&quot; : YES <br>Header &quot;sys/sysmacros.h&quot; has symbol =
&quot;makedev&quot; : YES <br>Header &quot;sys/mkdev.h&quot; has symbol &qu=
ot;major&quot; : NO <br>Check usable header &quot;sched.h&quot; : YES <br>C=
hecking for function &quot;sched_getaffinity&quot; : YES <br>Check usable h=
eader &quot;xlocale.h&quot; : NO <br>Check usable header &quot;linux/futex.=
h&quot; : YES <br>Check usable header &quot;endian.h&quot; : YES <br>Check =
usable header &quot;dlfcn.h&quot; : YES <br>Check usable header &quot;sys/s=
hm.h&quot; : YES <br>Check usable header &quot;cet.h&quot; : YES <br>Check =
usable header &quot;pthread_np.h&quot; : NO <br>Check usable header &quot;r=
enderdoc_app.h&quot; : NO <br>Check usable header &quot;sys/inotify.h&quot;=
 : YES <br>Checking for function &quot;strtof&quot; : YES <br>Checking for =
function &quot;mkostemp&quot; : YES <br>Checking for function &quot;memfd_c=
reate&quot; : YES <br>Checking for function &quot;random_r&quot; : YES <br>=
Checking for function &quot;flock&quot; : YES <br>Checking for function &qu=
ot;strtok_r&quot; : YES <br>Checking for function &quot;getrandom&quot; : Y=
ES <br>Checking for function &quot;qsort_s&quot; : NO <br>Checking for func=
tion &quot;posix_fallocate&quot; : YES <br>Checking if &quot;GNU qsort_r&qu=
ot; : links: YES <br>Header &quot;time.h&quot; has symbol &quot;struct time=
spec&quot; : YES <br>Checking for function &quot;thrd_create&quot; : NO <br=
>Header &quot;errno.h&quot; has symbol &quot;program_invocation_name&quot; =
: YES <br>Header &quot;math.h&quot; has symbol &quot;issignaling&quot; : YE=
S <br>Checking for function &quot;posix_memalign&quot; : YES <br>Checking w=
hether type &quot;struct dirent&quot; has member &quot;d_type&quot; : YES <=
br>Checking if &quot;strtod has locale support&quot; : links: YES <br>Check=
ing if &quot;Bsymbolic&quot; : links: YES <br>Checking if &quot;version-scr=
ipt&quot; : links: YES <br>Checking if &quot;dynamic-list&quot; : links: YE=
S <br>Compiler for C supports link arguments -Wl,--build-id=3Dsha1: YES <br=
>Checking for function &quot;dlopen&quot; : NO <br>Library dl found: YES<br=
>Checking for function &quot;dladdr&quot; with dependency -ldl: YES <br>Che=
cking for function &quot;dl_iterate_phdr&quot; : YES <br>Checking for funct=
ion &quot;clock_gettime&quot; : YES <br>Run-time dependency zlib found: YES=
 1.2.12<br>Run-time dependency libzstd found: YES 1.4.9<br>Run-time depende=
ncy threads found: YES<br>Checking for function &quot;pthread_setaffinity_n=
p&quot; with dependency threads: YES <br>Run-time dependency expat found: Y=
ES 2.4.4<br>Library m found: YES<br>Message: libdrm 2.4.110 needed because =
amdgpu has the highest requirement<br>Run-time dependency libdrm_intel foun=
d: YES 2.4.111<br>Run-time dependency libdrm_amdgpu found: YES 2.4.111<br>R=
un-time dependency libdrm_radeon found: YES 2.4.111<br>Run-time dependency =
libdrm_nouveau found: YES 2.4.111<br>Run-time dependency libdrm found: YES =
2.4.111<br>Run-time dependency libudev found: YES 239<br>llvm-config found:=
 YES (/path/to/llvm/16.0.6/bin/llvm-config) 18.0.0<br>Run-time dependency L=
LVM (modules: amdgpu(missing), asmparser, bitreader, bitwriter, core, engin=
e, executionengine, instcombine, ipo, mcdisassembler, mcjit, native, scalar=
opts, transformutils, coroutines, lto) found: NO (tried cmake and config-to=
ol)<br>Looking for a fallback subproject for the dependency llvm (modules: =
bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts=
, transformutils, instcombine, amdgpu, bitreader, ipo, asmparser, native)<b=
r>Building fallback subproject with default_library=3Dshared<br><br>meson.b=
uild:1680:13: ERROR: Neither a subproject directory nor a llvm.wrap file wa=
s found.</font><br></div><div><font face=3D"monospace"><br></font></div><di=
v><font face=3D"arial, sans-serif">Is this a known issue? Pardon the direct=
ory obfuscation...</font></div></div>

--000000000000784f400601907089--