Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 660648 - media-libs/mesa-18.1.3 [vulkan] fails to build on musl
Summary: media-libs/mesa-18.1.3 [vulkan] fails to build on musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2018-07-07 19:55 UTC by Nicholas Fish
Modified: 2018-07-08 11:36 UTC (History)
2 users (show)

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


Attachments
compressed build log (mesa-18.1.3-build.log.gz,84.05 KB, application/gzip)
2018-07-07 19:55 UTC, Nicholas Fish
Details
modified musl pthread patch (mesa-18-musl-pthread.patch,2.35 KB, patch)
2018-07-07 20:03 UTC, Nicholas Fish
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Fish 2018-07-07 19:55:19 UTC
Created attachment 538716 [details]
compressed build log

Please assign to musl@gentoo.org

Attempting to emerge mesa-18.1.3 with vulkan enabled from musl overlay on musl-based system with RadeonSI/AMDGPU results in:

/var/tmp/portage/media-libs/mesa-18.1.3/work/mesa-18.1.3/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h:52:2: error: unknown type name 'pthread_mutex_t'

Output of emerge -au1 mesa

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     U  ] media-libs/mesa-18.1.3::musl [18.1.2::ennui] USE="classic d3d9 dri3 egl gallium gbm gles1 gles2 llvm pax_kernel pic vaapi vdpau vulkan wayland xa xvmc -bindist -debug (-nptl) -opencl (-openmax
) -osmesa (-selinux) -unwind -valgrind" VIDEO_CARDS="radeon radeonsi (-freedreno) -i915 (-i965) (-imx) -intel -nouveau -r100 -r200 -r300 -r600 (-vc4) -virgl (-vivante) (-vmware)" 0 KiB
Comment 1 Nicholas Fish 2018-07-07 20:03:17 UTC
Created attachment 538732 [details, diff]
modified musl pthread patch

Building with this patch enables building mesa with Vulkan support against musl, which adds a pthread header file include. Note that this already fixed in mesa git (see https://cgit.freedesktop.org/mesa/mesa/commit/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h?id=1a1f2b134c4bdb502659724e232a9e009287fe58).

diff -u mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h{.orig,}
--- mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h.orig  2018-05-21 12:18:17.572276918 +0200
+++ mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h       2018-05-21 12:18:27.223270274 +0200
@@ -28,6 +28,7 @@
 #ifndef RADV_AMDGPU_WINSYS_H
 #define RADV_AMDGPU_WINSYS_H
 
+#include <pthread.h>
 #include "radv_radeon_winsys.h"
 #include "ac_gpu_info.h"
 #include "addrlib/addrinterface.h"
Comment 2 Jory A. Pratt gentoo-dev 2018-07-08 08:54:16 UTC
(In reply to Nicholas Fish from comment #1)
> Created attachment 538732 [details, diff] [details, diff]
> modified musl pthread patch
> 
> Building with this patch enables building mesa with Vulkan support against
> musl, which adds a pthread header file include. Note that this already fixed
> in mesa git (see
> https://cgit.freedesktop.org/mesa/mesa/commit/src/amd/vulkan/winsys/amdgpu/
> radv_amdgpu_winsys.h?id=1a1f2b134c4bdb502659724e232a9e009287fe58).
> 
> diff -u mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h{.orig,}
> --- mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h.orig 
> 2018-05-21 12:18:17.572276918 +0200
> +++ mesa-18.1.0/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h      
> 2018-05-21 12:18:27.223270274 +0200
> @@ -28,6 +28,7 @@
>  #ifndef RADV_AMDGPU_WINSYS_H
>  #define RADV_AMDGPU_WINSYS_H
>  
> +#include <pthread.h>
>  #include "radv_radeon_winsys.h"
>  #include "ac_gpu_info.h"
>  #include "addrlib/addrinterface.h"

This patch will fix a single rendition, there is more patching needed that should be handled at same time.
Comment 3 Jory A. Pratt gentoo-dev 2018-07-08 09:02:59 UTC
I have actually pushed the complete patch which will fix all missing includes to the musl overlay.
Comment 4 Nicholas Fish 2018-07-08 11:36:36 UTC
Confirmed fixed. Thanks!