Re: Building Mesa with LLVM in $HOME/opt

Jackman <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <CAADorGKpbUbhGY5cKCmt13x5bzo0ZR9cu=pGmrvWz6Vr+mwHfg@mail.gmail.com>
Thank you for your suggestions!

After digging around, trying to find the mechanism (method) the Meson was
actually using to find the dependencies, I was stuck, unable to determine
what 'config-tool' meant. After reading the documentation, I concluded that
I could manipulate 'cmake' or 'llvm-config' methods, something I
understood. On my first attempt at a fix, I decided to just comment out the
method altogether, using Meson's default 'auto' method:

dep_llvm = null_dep
with_llvm = false
if _llvm != 'false'
  dep_llvm = dependency(
    'llvm',
    version : _llvm_version,
    modules : llvm_modules,
    optional_modules : llvm_optional_modules,
    required : (
      with_amd_vk or with_gallium_radeonsi or with_gallium_swr or
      with_gallium_opencl or _llvm == 'true'
    ),
    static : not _shared_llvm,
#    method : _llvm_method,
    fallback : ['llvm', 'dep_llvm'],
  )
  with_llvm = dep_llvm.found()
endif


Now, I am sure that there was very good reason to use 'config-tool', but I
just don't know what it means. In the context of my system with my putting
LLVM in my $HOME/opt folder, 'auto' seems to work just fine.

Right now I'm re-compiling LLVM with RTTI enabled because now it's
complaining about that.

I'm happy to talk to developers that know more about Meson in order to
create a PR/patch for this kind of thing. I'd also be happy to test other
conditions (OSX, Windows, etc.) as long as I know what I'm looking for.

Anyway, thank you again! It takes a lot of discipline and commitment to
offer help to newcomers on a mailing list.

Have a great week and stay healthy!

Andrew Jackman
[email protected]


On Sun, Apr 26, 2020 at 6:56 PM Ken Moffat <[email protected]> wrote:

> On Sun, Apr 26, 2020 at 05:59:04PM +0300, Ruslan Kabatsayev wrote:
> > Hi,
> >
> > On Sun, 26 Apr 2020 at 07:36, Jackman <[email protected]> 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.
> > >
> [...]
> > >
> > > 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).
> >
>
> Just to expand on that: in BLFS we added BPF for v4lutils.  The
> AMDGPU target has been needed (for amdgpu, which the OP is trying to
> enable) for a long time.  But we don't build any more than llvm,
> clang and compiler-rt so it is possible that one of the other parts
> of llvm might need another target.
>
> For mesa itself, we have some explanation of the options - maybe
> useful to reduce how much gets built.  I think we removed the new
> iris target earlier, because of segfaults, or else we are going to
> (not relevant to amdgpu, nor to previous versions of mesa).
>
> OTOH, if someone is building all of it then perhaps the full set of
> drivers might be what they want - for me, building more than I need
> wastes time and space, but YMMV.
>
> ĸen
> --
> He could send for Ptraci, his favourite handmaiden. She was special.
> Her singing always cheered him up. Life seemed so much brighter when
> she stopped.   -- Pyramids
> _______________________________________________
> mesa-users mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-users
>

_______________________________________________
mesa-users mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.