[Mesa-users] Building Mesa with LLVM in $HOME/opt

Ruslan Kabatsayev b7.10110111 at gmail.com
Sun Apr 26 14:59:04 UTC 2020


Hi,

On Sun, 26 Apr 2020 at 07:36, Jackman <kd7nyq at gmail.com> wrote:
>
> Good evening! I hope you are all doing well.
>
> My goal is simply to get OpenCL 1.2+ working on my MXLinux (Debian Buster derivative) machine with an AMD GPU.
>
> I have successfully built and installed LLVM into $HOME/opt with the following commands:
>
> tar -xf llvm-project-10.0.0.tar.xz
> cd llvm-project-10.0.0
> mkdir build
> cd build
> cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/opt -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;polly' ../llvm
> make
> make install
>
> $HOME/opt/bin is in my path.
>
> When I invoke llvm-config, everything seems reasonable to my naive understanding:
>
> dorito :: code/llvm-project-10.0.0/build » llvm-config --prefix
> /home/jackman/opt
> dorito :: code/llvm-project-10.0.0/build » llvm-config --obj-root
> /home/jackman/opt
> dorito :: code/llvm-project-10.0.0/build » llvm-config --includedir
> /home/jackman/opt/include
>
> When I try to build Mesa, however, I am still getting this error:
>
> Message: libdrm 2.4.100 needed because amdgpu has the highest requirement
> Run-time dependency libdrm_intel found: YES 2.4.101
> Run-time dependency libdrm_amdgpu found: YES 2.4.101
> Run-time dependency libdrm_radeon found: YES 2.4.101
> Run-time dependency libdrm_nouveau found: YES 2.4.101
> Run-time dependency libdrm found: YES 2.4.101
> llvm-config found: YES (/home/jackman/opt/bin/llvm-config) 10.0.0
> Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, bitwriter, engine, ipo, mcdisassembler, mcjit, native, coroutines) found: NO (tried config-tool)

This hints that LLVM is not fully functional. In particular, if you
look at the section for LLVM in BLFS[1], you'll find the following
cmake option is used there:

-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF"

You may want to enable these targets too. Then at least the amdgpu
module from the list should be found (not sure if the other modules
listed have also not been found).

> Looking for a fallback subproject for the dependency llvm
>
> meson.build:1389:2: ERROR: Subproject directory not found and llvm.wrap file not found
>
> The full log is attached.
>
> I really just don't understand enough about LLVM or Mesa to understand what's missing here.
>
> Thank you for any help.
>
> Andrew Jackman
> kd7nyq at gmail.com
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-users

[1]: http://www.linuxfromscratch.org/blfs/view/svn/general/llvm.html

Regards,
Ruslan


More information about the mesa-users mailing list