Other meson.build:809:12: ERROR: Dependency "libclc" not found, tried pkgconfig and cmake while I'm trying to build Mesa

Hello.

I'm running FreeBSD 14.1 right now and I suspect that the Mesa libs that I have installed on the system are bugged or maybe I have some misconfiguration,because when I do :

Code:
# glxinfo | grep Mesa

I get the error :

Code:
X Error of failed request:  BadValue (integer parameter out of range for operation)

Anyway,this is the context in which the error happens :

I have 3 GPUS :

Code:
1)

00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]

2)

01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB]
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller

3)

02:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti]
02:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller
02:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller
02:00.3 Serial bus controller: NVIDIA Corporation TU102 USB Type-C UCSI Controller

I'm not using any xorg.conf.

Code:
nano /etc/rc.conf :

kld_list="nvidia-modeset nvidia-drm linux i915kms ext2fs"

nano /boot/loader.conf :

pptdevs="1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3 4/0/0"
hw.nvidiadrm.modeset=1

This is where the problem is :

Code:
[marietto@marietto ~]==> glxinfo | grep Mesa

X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  151 (GLX)
Minor opcode of failed request:  24 (X_GLXCreateNewContext)
Value in failed request:  0x0
Serial number of failed request:  50
Current serial number in output stream:  51

I've installed the following packages :

Code:
# pkg install xf86-video-intel nvidia-drm-kmod drm-kmod nvidia-driver

I've also tried to check if I had the same error by removing the xf86-video-intel and using the i915kms driver with Xorg :

Code:
# pkg remove xf86-video-intel
# nano /etc/X11/xorg.conf

Section "Device"
Identifier  "Intel Graphics"
Driver      "i915kms"
EndSection

But I've got the same error. Maybe it is a Mesa bug.

What's one consequence of this "bug" ? this one :

Code:
==> scrcpy --tcpip=192.168.1.3:5555

scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: Connecting to 192.168.1.3:5555...
INFO: Connected to 192.168.1.3:5555
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 34.1 MB/s (71200 bytes in 0.002s)
[server] INFO: Device: [samsung] samsung SM-N9005 (Android 9)
[server] WARN: Audio disabled: it is not supported before Android 11

X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  152 (GLX)
Minor opcode of failed request:  3 (X_GLXCreateContext)
Value in failed request:  0x0
Serial number of failed request:  147
Current serial number in output stream:  148

What to do to fix that error ?

Surfing the net,I found this tutorial,that maybe will help me :

https://eleni.mutantstargoat.com/hikiko/mesa-on-freebsd/

Unfortunately I've frozen myself trying to setup meson :

I am using the following environment variables:

Code:
export PATH=$PATH:$HOME/code/mesastuff/install/bin
export LD_LIBRARY_PATH=$HOME/code/mesastuff/install/lib:$HOME/code/mesastuff/install/lib/dri
export LD_RUN_PATH=$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/code/mesastuff/install/share
export LIBGL_DRIVERS_PATH=$HOME/code/mesastuff/install/lib/dri
export PATH=$PATH:$HOME/code/mesastuff/install/bin
export LD_LIBRARY_PATH=$HOME/code/mesastuff/install/lib:$HOME/code/mesastuff/install/lib/dri
export LD_RUN_PATH=$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/code/mesastuff/install/share
export LIBGL_DRIVERS_PATH=$HOME/code/mesastuff/install/lib/dri
export CC=gcc
export CXX=g++

[marietto@marietto /usr/home/marietto/code/mesastuff/code/drm]==> meson setup build                          

https://pastebin.ubuntu.com/p/kC7HP38YHx/

Now I tried to compile mesa :

Code:
[marietto@marietto /usr/home/marietto/code/mesastuff/code/mesa]==> sudo pkg search libclc
Password:

libclc-llvm15-15.0.7           Required library functions for OpenCL C programming language
libclc-llvm16-16.0.6           Required library functions for OpenCL C programming language
libclc-llvm17-17.0.6           Required library functions for OpenCL C programming language
libclc-llvm18-18.1.8           Required library functions for OpenCL C programming language

[marietto@marietto /usr/home/marietto/code/mesastuff/code/mesa]==> sudo pkg install libclc-llvm17
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    libclc-llvm17: 17.0.6

Number of packages to be installed: 1

The process will require 77 MiB more space.
10 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching libclc-llvm17-17.0.6.pkg: 100%   10 MiB   2.1MB/s    00:05
Checking integrity... done (0 conflicting)
[1/1] Installing libclc-llvm17-17.0.6...
[1/1] Extracting libclc-llvm17-17.0.6: 100%

marietto@marietto /usr/home/marietto/code/mesastuff/code/mesa]==> meson setup build          

The Meson build system
Version: 1.5.2
Source dir: /usr/home/marietto/code/mesastuff/code/mesa
Build dir: /usr/home/marietto/code/mesastuff/code/mesa/build
Build type: native build
Project name: mesa
Project version: 24.3.0-devel
C compiler for the host machine: gcc (gcc 13.3.0 "gcc (FreeBSD Ports Collection) 13.3.0")
C linker for the host machine: gcc ld.bfd 2.43.1
C++ compiler for the host machine: g++ (gcc 13.3.0 "g++ (FreeBSD Ports Collection) 13.3.0")
C++ linker for the host machine: g++ ld.bfd 2.43.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Checking for size of "void*" : 8
Checking if "-mtls-dialect=gnu2" runs: YES
Checking if "split TLSDESC" : links: YES
Found pkg-config: YES (/usr/local/bin/pkg-config) 2.3.0
Run-time dependency libglvnd found: YES 1.7.0
Run-time dependency vdpau found: YES 1.5
Program glslangValidator found: YES (/usr/local/bin/glslangValidator)
Run-time dependency libva found: YES 1.22.0
Header "va/va.h" has symbol "VASurfaceAttribDRMFormatModifiers" with dependency libva: YES
meson.build:782: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
Rust compiler for the host machine: rustc -C linker=gcc (rustc 1.81.0)
Rust linker for the host machine: rustc -C linker=gcc ld.bfd 2.43.1
Program bindgen found: YES (/usr/local/bin/bindgen)
Found CMake: /usr/local/bin/cmake (3.30.4)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency libclc found: NO (tried pkgconfig and cmake)

meson.build:809:12: ERROR: Dependency "libclc" not found, tried pkgconfig and cmake
 
Back
Top