Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932779 - media-libs/mesa-24.1: missing libunwind dependency when nvk is enabled
Summary: media-libs/mesa-24.1: missing libunwind dependency when nvk is enabled
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal trivial (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-05-26 09:46 UTC by Alexandr German
Modified: 2024-06-05 20:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mesa 24.1.0-rc1 build failure (mesa.fail.build.log.xz,32.95 KB, application/x-xz)
2024-05-26 13:16 UTC, Alexandr German
Details
mesa-24.1.0-r1 build fail j1 (mesa.fail.j1.build.log.xz,30.62 KB, application/x-xz)
2024-05-26 13:33 UTC, Alexandr German
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr German 2024-05-26 09:46:11 UTC
With ~amd64 and unmasked nvk flag, building the mesa package fails trying to resolve libunwind when linking NVK related .so file. Installing sys-libs/libunwind fixes the problem.
Comment 1 immolo 2024-05-26 12:31:41 UTC
Could you attach the log of it failing so we can see the issue please.
Comment 2 Alexandr German 2024-05-26 13:16:02 UTC
Created attachment 894440 [details]
mesa 24.1.0-rc1 build failure

Shorthands of two relevant lines are:
[945/1665] x86_64-pc-linux-musl-g++  -o src/nouveau/vulkan/libvulkan_nouveau.so ... -lunwind -lunwind ...
FAILED: src/nouveau/vulkan/libvulkan_nouveau.so
Comment 3 Alexandr German 2024-05-26 13:33:02 UTC
Created attachment 894442 [details]
mesa-24.1.0-r1 build fail j1

Same as before, but MAKEOPTS="-j1"
Comment 4 Matt Turner gentoo-dev 2024-05-31 18:48:31 UTC
I looked and didn't see any obvious usage of libunwind in nvk. Maybe it's from one of the rust dependencies?
Comment 5 Gonçalo Negrier Duarte 2024-05-31 19:35:56 UTC
(In reply to Matt Turner from comment #4)
> I looked and didn't see any obvious usage of libunwind in nvk. Maybe it's
> from one of the rust dependencies?

Using `qlist -e media-libs/mesa:0 | xargs scanelf -BF '%n'` I notice that libunwind.so.1 library are needed for /usr/lib64/libvulkan_nouveau.so

Sorry I didn't run the command when doing my tests and complete forget that `sys-libs/llvm-libunwind` is included on the LLVM profile.

To fix it you might just need to add this to nvk RDEPENDS:

|| ( sys-libs/llvm-libunwind sys-libs/libunwind )

It very strange why the src/nouveau/vulkan/meson.build doesn't include dep_libunwind as part of the nvk dependencies: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/nouveau/vulkan/meson.build?ref_type=heads#L74
Comment 6 Matt Turner gentoo-dev 2024-06-05 19:39:31 UTC
I tried to reproduce the issue locally and I could not.

Could this somehow be related to musl, which I see you are using?

Gonçalo: were you able to reproduce the issue? Were you able to see some shared objects installed by mesa linked with libunwind even with USE=-unwind?
Comment 7 Gonçalo Negrier Duarte 2024-06-05 20:23:04 UTC
(In reply to Matt Turner from comment #6)
> I tried to reproduce the issue locally and I could not.
> 
> Could this somehow be related to musl, which I see you are using?
> 
> Gonçalo: were you able to reproduce the issue? Were you able to see some
> shared objects installed by mesa linked with libunwind even with USE=-unwind?

I don't have USE=-unwind enable, so It confirm that at least in the llvm profile and musl sys-libs/libunwind is required
Comment 8 Gonçalo Negrier Duarte 2024-06-05 20:26:25 UTC
(In reply to Gonçalo Negrier Duarte from comment #7)
> (In reply to Matt Turner from comment #6)
> > I tried to reproduce the issue locally and I could not.
> > 
> > Could this somehow be related to musl, which I see you are using?
> > 
> > Gonçalo: were you able to reproduce the issue? Were you able to see some
> > shared objects installed by mesa linked with libunwind even with USE=-unwind?
> 
> I don't have USE=-unwind enable, so It confirm that at least in the llvm
> profile and musl sys-libs/libunwind is required

little correction I have USE=-unwind set rather, my useflags:
media-libs/mesa-24.1.1::gentoo USE="X d3d9 llvm lm-sensors opencl (opengl) osmesa proprietary-codecs vaapi vdpau vulkan wayland zstd -debug (-selinux) -test -unwind -valgrind -vulkan-overlay -xa " ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" LLVM_SLOT="(18) -15 -16 -17" VIDEO_CARDS="nouveau (nvk) radeonsi -d3d12 (-freedreno) -intel -lavapipe (-lima) (-panfrost) -r300 -r600 -radeon (-v3d) (-vc4) -virgl (-vivante) -vmware zink"