Frogging-Family/mesa-git

ERROR: Dependency "clang" not found, tried cmake

nutta-git opened this issue · 6 comments

both clang and cmake are installed on the system
meson-log.txt

OS: Arch Linux
Found this on gitlab,
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3873

current solution:
revert commit a5227465c13ae74651a932a82aeae65683f4a063 when compiling mesa

Getting the same thing here.

So it's a meson issue. Who'd have thought…


As mentioned, saving https://gitlab.freedesktop.org/mesa/mesa/-/commit/a5227465c13ae74651a932a82aeae65683f4a063.diff as mesa-userpatches/a5227465c13ae74651a932a82aeae65683f4a063.mymesarevert fixes the build.

@ObserverOfTime
I tired doing what you have said and have meet with some issues.
ln: failed to create symbolic link '/home/corn/src/mesa-git/a5227465c13ae74651a932a82aeae65683f4a063.mymesarevert': File exists
Steps I took:
cd into the mesa-userpatches directory.
next, wget https://gitlab.freedesktop.org/mesa/mesa/-/commit/a5227465c13ae74651a932a82aeae65683f4a063.diff
then, mv a5227465c13ae74651a932a82aeae65683f4a063.diff a5227465c13ae74651a932a82aeae65683f4a063.mymesarevert
after which I inserted a5227465c13ae74651a932a82aeae65683f4a063.mymesarevert to _community_patches in customization.cfg

Are these the steps you took? if not, would you mind sharing the instruction on how to?

Easier to patch meson.build in the PKGBUILD's prepare:

 PKGBUILD | 2 ++
 1 file changed, 2 insertions(+)

diff --git i/PKGBUILD w/PKGBUILD
index 28206f1..863b221 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -269,6 +269,8 @@ prepare() {
       rm -f "$_where"/$_pr.mymesapatch
     done
 
+    sed -i "s/required : get_option('microsoft-clc'),/required : false,/p" meson.build
+
     cd "$srcdir"
 
     # although removing _build folder in build() function feels more natural,

@benoit-pierre
Thank you! That worked!

side notes:
for me it was between line 274 and 278 in PKGBUILD.

You shouldn't add it to _community_patches because it's not a community patch.


Here's a better patch for the PKGBUILD:

@@ -396,8 +396,9 @@ build () {
        -D shared-glapi=${_enabled_} \
        -D opengl=true \
        -D zstd=${_enabled_} \
+       -D microsoft-clc=${_disabled_} \
        -D valgrind=${_enabled_} $_no_lto $_additional_meson_flags

     meson configure _build64
 
     # quoted from https://www.mesa3d.org/meson.html
@@ -459,6 +460,7 @@ build () {
           -D osmesa=gallium \
           -D shared-glapi=${_enabled_} \
           -D zstd=${_enabled_} \
+          -D microsoft-clc=${_disabled_} \
           -D valgrind=${_disabled_} $_no_lto $_additional_meson_flags
        
       meson configure _build32

Adding -Dmicrosoft-clc=disabled to _additional_meson_flags also works.