Bug 280071 - graphics/mesa-dri fails to configure with radv=off
Summary: graphics/mesa-dri fails to configure with radv=off
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-01 12:34 UTC by Anton Saietskii
Modified: 2024-07-01 16:57 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
poudriere build failure log (24.75 KB, text/plain)
2024-07-01 12:34 UTC, Anton Saietskii
no flags Details
v0 (1.04 KB, patch)
2024-07-01 12:44 UTC, Anton Saietskii
vsasjason: maintainer-approval?
Details | Diff
poudriere build success log (w/ patch applied) (51.59 KB, application/x-xz)
2024-07-01 12:46 UTC, Anton Saietskii
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2024-07-01 12:34:04 UTC
Created attachment 251813 [details]
poudriere build failure log

After commit #efb0c89e59bd2768d97c23ad1efe9c37e33b11fb, I was truly hoping to finally get rid of AMD-related stuff in mesa & llvm. Unfortunately, this went unsuccessful:

Checking if "-mtls-dialect=gnu2" runs: DID NOT COMPILE
Dependency vdpau skipped: feature gallium-vdpau disabled
Program glslangValidator found: NO

meson.build:618:15: ERROR: Program 'glslangValidator' not found or not executable

A full log can be found at /wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-24.0.9/_build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
===>  Script "configure" failed unexpectedly.

As soon as I enabled radv back -- mesa configured and built fine.
Comment 1 Anton Saietskii 2024-07-01 12:44:04 UTC
Created attachment 251814 [details]
v0

Restored '.if ${ARCH}' block where glslang was previously, moved dependency there and mesa build fine now, though I'm unsure if we need this dependency inside '.if' or unconditionally.
Comment 2 Anton Saietskii 2024-07-01 12:46:55 UTC
Created attachment 251815 [details]
poudriere build success log (w/ patch applied)
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2024-07-01 12:50:50 UTC
Looks like it's also needed for Vulkan, so the dependency on glslangValidator needs to be added there too.
Comment 4 Emmanuel Vadot freebsd_committer freebsd_triage 2024-07-01 12:52:26 UTC
For the intel driver I mean.
Comment 5 Emmanuel Vadot freebsd_committer freebsd_triage 2024-07-01 12:53:41 UTC
Can you test with :
diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index 6d62a6bd913e..4e939ca8be67 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -50,6 +50,7 @@ ${_gd}_VARS+=         GALLIUM_DRIVERS+=${_gd}
 OPTIONS_GROUP_VULKAN=  anv radv swrast_vk
 VULKAN_DESC=           Vulkan drivers
 anv_DESC=              Intel GPU Gen9 and newer Vulkan support
+anv_BUILD_DEPENDS=     glslangValidator:graphics/glslang
 radv_DESC=             AMD/ATI Southern Islands and newer Vulkan support
 radv_BUILD_DEPENDS=    glslangValidator:graphics/glslang
 swrast_vk_DESC=                Software Rasterizer Vulkan support

Only did a make configure, no build
Comment 6 Anton Saietskii 2024-07-01 13:01:53 UTC
(In reply to Emmanuel Vadot from comment #5)

It will build successfully, I can surely say that without even running poudriere again (as I did build with glslang in '.if' block already). I guess real question here is what other port options may depend on glslang.
Comment 8 Anton Saietskii 2024-07-01 13:06:42 UTC
(In reply to Anton Saietskii from comment #6)

... even _without_ running...

And yes, I can confirm it builds fine with your patch as well.
Comment 9 Emmanuel Vadot freebsd_committer freebsd_triage 2024-07-01 13:15:12 UTC
Ok I'll commit it later then.

Note that the llvm dep is still there, this is still a todo to remove it when it's not needed.
Comment 10 Anton Saietskii 2024-07-01 13:21:58 UTC
(In reply to Emmanuel Vadot from comment #9)

It's required by firefox and some other stuff anyway, so not a big deal. Main thing is mesa builds with BE_AMDGPU=off in llvm now, which is exactly what I wanted to achieve.

Thanks for a prompt PR review!
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-07-01 14:28:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8799860c84676240e2f2875025d2e4f7fcb5d5c9

commit 8799860c84676240e2f2875025d2e4f7fcb5d5c9
Author:     Emmanuel Vadot <manu@freebsd.org>
AuthorDate: 2024-07-01 12:53:41 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-07-01 14:26:04 +0000

    graphics/mesa-devel: unbreak radv=OFF VKLAYERS=off after f36f3675dc48

    meson.build:626:15: ERROR: Program 'glslangValidator' not found or not executable

    https://gitlab.freedesktop.org/mesa/mesa/-/commit/41a929d94ca5
    https://gitlab.freedesktop.org/mesa/mesa/-/commit/829d74b2f2db

    PR:             280071
    Reported by:    Anton Saietskii

 graphics/mesa-devel/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 12 Jan Beich freebsd_committer freebsd_triage 2024-07-01 14:50:10 UTC
https://lists.freebsd.org/archives/freebsd-ports/2021-November/000941.html may help in future but I haven't tested if it catches this particular case.
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-07-01 16:57:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=142029e5602984f6c4e4399d692bef028d94e609

commit 142029e5602984f6c4e4399d692bef028d94e609
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2024-07-01 16:54:22 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-07-01 16:54:22 +0000

    graphics/mesa-dri: unbreak radv=OFF

    The Intel Vulkan driver also needs it.

    Fixes:          efb0c89e59bd ("graphics/mesa-dri: Convert gallium and vulkan driver to port options")
    PR:             280071
    Sponsored by:   Beckhoff Automation GmbH & Co. KG

 graphics/mesa-dri/Makefile | 1 +
 1 file changed, 1 insertion(+)