#1032851 mesa: FTBFS in dirty env if clang-14 is installed

#1032851#5
Date:
2023-03-12 20:11:10 UTC
From:
To:
Hi,

when clang-14 but not clang-15 is installed while building mesa 23.0.0
on Sid (debuild -us -uc -i -b), the build fails about 60% in related to
bindgen and rusticl. (See further down for logged errors.)
If clang-15 is installed, the build succeeds regardless of clang-14 being
present or not. If no clang is installed at all, the build succeeds too.
In Sid clang-14 is currently the default for "clang", in experimental
it is already clang-15.

Given it also works with no clang (like when building the official
package) adding a dependency on clang-15 is probably not desirable
and I’m not sure what to do about it.
If nothing else, I hope this report can at least help
others figure out why they can't backport mesa.

Cheers
Oneric

#1032851#10
Date:
2023-03-13 07:36:40 UTC
From:
To:
Oneric kirjoitti 12.3.2023 klo 22.11:

Mesa already build-depends on several packages from llvm-15, so adding
one more shouldn't matter much.

#1032851#15
Date:
2023-03-13 14:57:14 UTC
From:
To:
On ubuntu jammy it breaks even with clang-15 installed, if
libclang1-14 is also installed, see:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8470

#1032851#20
Date:
2023-03-13 17:54:24 UTC
From:
To:
libclang1-14 doesn't appear to make a difference for me on Sid.
  bindgen:  0.60.1-2+b2
  libclang1-14:  1:14.0.6-12
  clang-15, libclang1-15:  now 1:15.0.7-3, previously I used 1:15.0.7-2

On Bookworm it also builds without issues when clang-15 is present
  bindgen:  0.60.1-2+b2
  clang-14, libclang1-14:  1:14.0.6-12
  clang-15, libclang1-15:  1:15.0.6-4+b1

On Bullseye no llvm-15 is available and other dependencies
are too old as well for building mesa 23.0.0.

However, I see you tried to build a git commit of mesa after 23.0.0,
while I’m building the 23.0.0 Debian source package. To check, I ran a
more minimal build of current git (4d03bf0f9d6f4380df0bbc0dc668b596223f8926)
on Sid it still compiled successfully with only two non-fatal warning
about not finding rustfmt. Once rustfmt (1.63.0+dfsg1-2) was installed
I encountered no build warnings at all. Config options:

  meson setup build -Dvulkan-drivers="['amd']" \
    -Dvulkan-layers="['device-select','intel-nullhw','overlay']" \
    -Dgallium-drivers="['radeonsi','zink']" -Dgallium-rusticl=true \
    -Dllvm=enabled

So afaict having clang-15 installed avoids the problem on all relevant
Debian releases. Perhaps the bug you’re seeing on Ubuntu Jammy is due
to the used bindgen 0.59.1-2ubuntu0.1 being slightly older?

Cheers
Oneric