Package Base Details: mesa-minimal-git

Git Clone URL: https://aur.archlinux.org/mesa-minimal-git.git (read-only, click to copy)
Submitter: shoober420
Maintainer: Lone_Wolf
Last Packager: Lone_Wolf
Votes: 11
Popularity: 1.03
First Submitted: 2020-12-10 00:38 (UTC)
Last Updated: 2024-04-27 12:15 (UTC)

Pinned Comments

Lone_Wolf commented on 2023-05-22 12:07 (UTC) (edited on 2024-03-30 13:58 (UTC) by Lone_Wolf)

Build order

llvm-minimal-git
spirv-headers-git
spirv-tools-git
spirv-llvm-translator-minimal-git
libclc-minimal-git
glslang-minimal-git
mesa-minimal-git

glslang-minimal-git must be built after spirv-tools-git and before mesa-minimal-git

Build frequency

I aim to build everything (including the lib32 part) atleast once a week.

How often you build this is a personal choice, but once a month is in my opinion the absolute maximum .

In that timeframe mesa will have seen almost 1k commits, llvm/clang gets more.

Lone_Wolf commented on 2021-01-22 18:36 (UTC) (edited on 2021-01-22 18:39 (UTC) by Lone_Wolf)

Why does this package hard depend on llvm-minimal-git ?

  • performance

archlinux repo packages are build with -march=x86-64 -mtune=generic which works on lots of machines but makes limited use of modern processor capabilities. For many packages this has little impact, but with llvm my experience is different.

My local builds for llvm / mesa are done with -march=native and this has a noticeable effect on their performance.

How big the benefit of this is depends heavily on the exact hardware you use. Worse, the software setup also impacts this. The only way to find out if it benefits your system/software setup is to try it out yourself.

  • easier maintenance and troubleshooting

Since i started my first mesa trunk package late in 2010 I have maintained versions without any llvm, one llvm implementation, split versions, singular versions, versions supporting multiple llvm implementations , switch from libgl hacks libglvnd to allow mesa & nvidia to cooperate etc.

Depending on one llvm variant in a non-splitted singular version results in a simple PKGBUILD that is easy to maintain.

Troubleshooting is also much easier if maintainer uses the same llvm variant as users.

If people feel those reasons are not good enough to hard depend on llvm-minimal-git , maybe I should transfer ownership .

Lone_Wolf commented on 2021-01-09 15:02 (UTC)

Why does this exist ?

Basically mesa/mesa-git build almost everything they can build.

This package tries to build just enough so everyone can use it, but disables older and/or unused components.

Check https://bbs.archlinux.org/viewtopic.php?id=261629 for a discussion about this package.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

Nohan commented on 2023-02-20 12:46 (UTC)

Lone_Wolf I thank you so much, for the quick response and the help, also I did not know that "LTOFLAGS" existed so thanks for the tip ! Will rebuild everything with your suggestions.

Lone_Wolf commented on 2023-02-20 12:36 (UTC) (edited on 2023-02-20 12:37 (UTC) by Lone_Wolf)

Nohan, the errors point to a problem in the llvm-minimal-git binaries. You may not have noticed it, but the llvm-minimal-git package explicitly disables lto through the options array in PKGBUILD

I expect your adding of -flto=thin to CFLAGS overrides that. please remove it from CFLAGS.

makepkg.conf has a variable LTOFLAGS="-flto=auto" , you could try to set that to thin instead of auto and verify if that honors the !lto option in the PKGBUILD .

Note that there's a build failure with llvm trunk https://github.com/llvm/llvm-project/commit/b677d0753c0a771c6203607f5dbb56189193a14c and later, so you have to build against an older llvm-minimal-git . follow https://gitlab.freedesktop.org/mesa/mesa/-/issues/8297 to keep track of the issue.

Nohan commented on 2023-02-20 02:54 (UTC)

Hi, I'm trying to build this package, but it fails as well as the libclc-minimal-git package when trying to use the linker:

On libclc:


-- The CXX compiler identification is Clang 17.0.0
-- The C compiler identification is Clang 17.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:63 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/nohan/.cache/paru/clone/libclc-minimal-git/src/_build/CMakeFiles/CMakeScratch/TryCompile-ZjIESG

    Run Build Command(s):/usr/bin/ninja cmTC_3276e && [1/2] Building CXX object CMakeFiles/cmTC_3276e.dir/testCXXCompiler.cxx.o
    [2/2] Linking CXX executable cmTC_3276e
    FAILED: cmTC_3276e 
    : && /usr/bin/clang++ -march=native -mtune=native -O3 -pipe -fno-plt -flto=thin -flto -Wl,-O2,--sort-common,--as-needed,-fuse-ld=lld,-z,relro,-z,now,-s -flto CMakeFiles/cmTC_3276e.dir/testCXXCompiler.cxx.o -o cmTC_3276e   && :
    /usr/bin/ld : erreur fatale : LLVM gold plugin has failed to create LTO module: Unknown attribute kind (86) (Producer: 'LLVM17.0.0' Reader: 'LLVM 15.0.7')
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

And it's the same on mesa

I've built llvm-libs-minimal-git, llvm-minimal-git without any problem and by using the linker aswell. I can turn off lto for libclc so that it can build succesfully, but mesa-minimal-git uses lto by default.

ld -v returns "GNU gold (GNU Binutils 2.40) 1.16"

My makeflags are:

CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -flto=thin" CXXFLAGS="$CFLAGS" LDFLAGS="-Wl,-O2,--sort-common,--as-needed,-fuse-ld=gold,-z,relro,-z,now,-s"

And it fails with and without ccache enabled or by using -fuse=lld or -fuse=gold.

xenu commented on 2023-02-01 14:22 (UTC)

No problem. Thank you for your work. Aside from the llvm 17 trunk issue there is also an issue with latest rust stable (1.67.0) and thin archives. A Fix is already merged but there is no release yet (milestone 1.69) I had to downgrade/switch to rust 1.66.1 to work around this.

Lone_Wolf commented on 2023-01-31 13:53 (UTC)

Thanks for the alert , xenu .

Locally I have removed the dri-drivers option and will upload a new version soon.

One caveat : there's a build failure in mesa trunk when building against llvm 17 trunk .

see https://gitlab.freedesktop.org/mesa/mesa/-/issues/8183

Lone_Wolf commented on 2022-11-02 11:47 (UTC)

I am considering adding rusticl opencl support to this package, possibly removing clover opencl .

Thoughts ?

0xSigi commented on 2022-10-21 13:24 (UTC)

It works now as of version Mesa 22.3.0_devel.160894.df3fdbdeb50-1 (all previous ones failed with the same error message as pasted into the gist).

Lone_Wolf commented on 2022-10-12 20:39 (UTC)

I am away from my desktop for about a week, can't help until then.

0xSigi commented on 2022-10-12 19:11 (UTC)

Hi, few days back I've reported issues building lib32-mesa-minimal-git with vdapu enabled, right now I tried to build mesa-minimal-git (clean new system, just build, pulling latest PKGBUILD) and am getting same issue where it complaints that dependency vdpau cannot be found.. I've uploaded the log to a gist, here: https://gist.github.com/27ced989ea9f8362c217df0333e5ae2e

I'd appreciate some help as I am getting even more puzzled now, why it worked ~5 days ago and now suddenly crashes.. I tried building it "the standard" way via makepkg and also using aurutils to build with and without a chroot, the log is from clean chroot freshly build just for this test..

Lone_Wolf commented on 2022-10-06 10:08 (UTC)

thx for the alert, xenu.

  • gallium-xvmc removed . will look at lib32-mesa-minimnal-git soon.

Although The issues that forced me to disable lto build are still open in mesa bugtracker, I don't encounter them anymore.

LTO build is re-enabled, let me know if you get issues.