Bug 111121

Summary: Meson build (ninja) loops infinitely when --native-file is used to specify llvm version
Product: Mesa Reporter: Shmerl <shtetldik>
Component: OtherAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Shmerl 2019-07-12 22:19:57 UTC
Recently, Mesa master build started behaving weirdly for me, when I specify llvm config explicitly using --native-file option for Meson.

The way I do it is like this:

   local native_config
   local llvm_ver=9
   read -r -d '' native_config <<EOF
[binaries]
llvm-config = "/usr/bin/llvm-config-${llvm_ver}"
EOF

...
LC_ALL=C.UTF-8 meson "$src_dir" \
...
--native-file=<(echo "$native_config") \
...

It used to work fine until now, but now it configures OK, but when I run:

      LC_ALL=C.UTF-8 ninja

It starts looping without end, always doing:

[0/1] Regenerating build files.

Is it a ninja bug or I'm doing something wrong?

That's what I have for meson/ninja (from Debian testing):

meson --version
0.51.1
ninja --version
1.8.2
Comment 1 oschowa 2019-07-12 22:23:09 UTC
That's a meson bug only present in 0.51 and already fixed on master:
https://github.com/mesonbuild/meson/issues/5505

It also only happens when the native file is not a real file.
Comment 2 Shmerl 2019-07-12 22:29:29 UTC
(In reply to oschowa from comment #1)
> That's a meson bug only present in 0.51 and already fixed on master:
> https://github.com/mesonbuild/meson/issues/5505
> 
> It also only happens when the native file is not a real file.

Yep, that's exactly it, thanks for pointing it out! A bit annoying I'd need to work around it for now by creating an explicit temporary native config file instead of using a redirected implicit one.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.