You are not logged in.

#1 2022-09-02 16:19:45

donaastor
Member
Registered: 2022-03-14
Posts: 52

pacman - How to install both local and packages from repo at once?

I am installing arch andI want to install mesa-git from AUR. mesa-git requires libglvnd, but libglvnd also requires mesa, which is provided by mesa-git. I don't have any AUR helper yet, I am building straight from AUR. If I install dependencies first, then I will have mesa installed which will conflict with mesa-git. I am installing mesa-git with this command:

pacman -U --noconfirm --needed "${pkg_name}"

But dependencies are installed with -S:

pacman -S libglvnd ...

So how do I tell pacman to isntall them at the same time so that it can resolve dependencies cycles on its own?

Offline

#2 2022-09-02 16:56:13

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

It seems that installing mesa-git requires libva as a make dependency. Then 'pacman -S libva' triggers libglvnd which triggers mesa?? After installing these 3 (and more) dependencies, 'pacman -Qii mesa' says that it is required by libglvnd, and 'pacman -Qii libglvnd' says that it is required by libva, but 'pacman -Qii libva' doesn't mention libglvnd in its dependencies???

Last edited by donaastor (2022-09-02 17:18:12)

Offline

#3 2022-09-02 17:11:46

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,359
Website

Re: pacman - How to install both local and packages from repo at once?


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2022-09-02 17:13:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,288
Website

Re: pacman - How to install both local and packages from repo at once?

And ... what's the problem?  What indication is there of mesa being "broken" or for there being an sort of problem whatsoever for that matter?  There is a circular dependency with these packages - that is awkward at times, but it is allowed and not at all indicative of a problem.  As for libva not listing either of the others as a direct dependency it does depend on libgl which is provided by libglvnd.

It sounds like you are having trouble building an AUR package - this should be your focus.  Tell us about that problem.  Installing mesa-git does not require libva as a make dependency, though building mesa-git might.  Mesa is not broken.

Last edited by Trilby (2022-09-02 17:15:58)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-09-02 17:17:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,288
Website

Re: pacman - How to install both local and packages from repo at once?

You can install mesa and the other build deps, then build mesa-git, then install mesa-git which will remove mesa in the same transaction.

But why do you have two threads on this same issue (this one was presented in a much more useful way).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2022-09-02 17:19:40

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

Trilby wrote:

It sounds like you are having trouble building an AUR package - this should be your focus.  Tell us about that problem.  Installing mesa-git does not require libva as a make dependency, though building mesa-git might.  Mesa is not broken.

Ok, sorry. I fixed the title, let me reformulate my question:

How do I build mesa-git from AUR and install it without installing mesa?

Offline

#7 2022-09-02 17:25:59

progandy
Member
Registered: 2012-05-17
Posts: 5,023

Re: pacman - How to install both local and packages from repo at once?

linux from scratch can be a good resource for such things, e.g.

https://www.linuxfromscratch.org/blfs/view/svn/x/mesa.html wrote:

libva-2.15.0 (to provide VA-API support for some gallium drivers, note that there is a circular dependency. You must build libva first without EGL and GLX support, install this package, and rebuild libva)

So build+install libva-headless first, then build+install mesa(-git) and then install the normal libva.
Edit: Another option might be to install libva with --assume-installed=libgl

Last edited by progandy (2022-09-02 17:28:51)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2022-09-02 17:39:57

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

progandy wrote:

So build+install libva-headless first, then build+install mesa(-git) and then install the normal libva.
Edit: Another option might be to install libva with --assume-installed=libgl

Wow! Thank you for this tip!
I am not yet sure how you ended up with these procedures from the link, but I see what you are saying, partially:
In your first method, can you please provide me with another detail on how does installing libva overwrites the entry in the system which tells which package exactly provides libva? Because both libva-headless and libva provide libva. Is something being overwritten? Does your second suggested method does the same or something similar?

Offline

#9 2022-09-02 17:41:14

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,894
Website

Re: pacman - How to install both local and packages from repo at once?

Mod note: Merging the two topics on this and moving to AUR Issues

Last edited by WorMzy (2022-09-02 17:42:22)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2022-09-02 17:43:22

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

WorMzy wrote:

Mod note: Merging the two topics on this and moving to AUR Issues

Sorry for the mess...

Offline

#11 2022-09-02 19:24:57

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

progandy wrote:

So build+install libva-headless first, then build+install mesa(-git) and then install the normal libva.
Edit: Another option might be to install libva with --assume-installed=libgl

Neither method works, I tried. It requires libglvnd...

Offline

#12 2022-09-02 21:45:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,288
Website

Re: pacman - How to install both local and packages from repo at once?

Is your goal to never have mesa installed at all?  How important is that goal?

Essentially you need to bootstrap the build - you may as well take advantage of the existing precompiled binary mesa package versus jumping through all the hoops of a de-novo bootstrap.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2022-09-02 21:48:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,422

Re: pacman - How to install both local and packages from repo at once?

donaastor wrote:

pacman -U --noconfirm --needed "${pkg_name}"

DO NOT use --noconfirm with mesa-git, I also recommend against installing it by script (especially on the first install)


Conflicts: 	libva-mesa-driver, mesa, mesa-libgl, mesa-vdpau, opencl-mesa, vulkan-intel, vulkan-mesa-layer, vulkan-radeon, vulkan-swrast
Provides: 	libva-mesa-driver, mesa, mesa-libgl, mesa-vdpau, opencl-mesa, vulkan-intel, vulkan-mesa-layer, vulkan-radeon, vulkan-swrast , opencl-driver, opengl-driver, vulkan-driver

As you can see mesa-git conflicts with AND provides everything in mesa pkgbase.

Assuming you have built mesa-git succesfully and you run pacman -U  mesa-git 22.3.0_devel.157974.50e6a80b5ea5.d41d8cd98f00b204e9800998ecf8427e-1 (version will be different) , pacman will ask you to confirm each conflicting package for removal .
Just confirm all those listed in conflicts and pacman will install mesa-git .


SideNote : if you have lib32-mesa installed, remove that before trying to install mesa-git .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2022-09-02 23:04:33

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

Trilby wrote:

Is your goal to never have mesa installed at all?  How important is that goal?

Lone_Wolf wrote:

DO NOT use --noconfirm with mesa-git, I also recommend against installing it by script (especially on the first install)

Hey guys. Trilby, yes, I don't want to have mesa installed at all. Because, sorry Wolf, I want to make a script that supports linux no-bloat philosophy. Installing an unnecessary package just so I would remove it right after is a thing straigth from the linux hell. I have forced a solution on this:

pacman -S --noconfirm --needed libva --assume-installed=libgl
pacman -Sdd --noconfirm libglvnd
(building) mesa-git

I might add a few bash lines to install all other dependencies of libglvnd that aren't mesa before the second line, but for now it isn't needed.
Do you have any reason to still avoid this?

Offline

#15 2022-09-02 23:08:08

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

Lone_Wolf wrote:

DO NOT use --noconfirm with mesa-git, I also recommend against installing it by script (especially on the first install)

May I know why there is such a strong suggestion against it?

Offline

#16 2022-09-02 23:18:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,288
Website

Re: pacman - How to install both local and packages from repo at once?

If you are going to use -Sdd for libglvnd then you may as well do that first, then just install libva normally (there should be no need for the --assume-installed=libgl).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#17 2022-09-03 01:02:39

donaastor
Member
Registered: 2022-03-14
Posts: 52

Re: pacman - How to install both local and packages from repo at once?

Trilby wrote:

If you are going to use -Sdd for libglvnd then you may as well do that first, then just install libva normally (there should be no need for the --assume-installed=libgl).

Ok, that might actually work better, thank you, but I won't try it now because this works, and I went on my path because there is a common dependency for both libva and libglvnd which is libxext. pacman -Sdd wouldn't install that, so that would be two dependencies missing at one point.

Offline

#18 2022-09-03 12:12:15

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,422

Re: pacman - How to install both local and packages from repo at once?

While I have done my best to make it easy to switch from mesa to mesa-git (reverse is trickier), it still is simple  to mess that up and end with a broken system.
Executing the switch manually does reduce the chance of that happening and (I hope) increases understanding of how the system works.

As some posters already mentioned there's a bootstrapping issue for building mesa on archlinux .

If mesa (any version) is built with -D glvnd=true \ GLVND has to be present at buildtime .
GLVND on archlinux has a hard dependency on mesa and on opengl-driver .

Testing proved that mesa build itself doesn't use anything from an installed mesa, it just needs the glvnd libraries .
I haven't investigated what libglvnd actually requires from mesa / opengl-driver but the binaries work with all mesa builds that include glvnd support.


There are several methods to solve such bootstrapping issues, mine was to allow the repo version of mesa to be present the first time.

The simplest way to avoid having mesa present during build is probably :

create a mesa-dummy without any binaries.
It needs to provide mesa and opengl-driver , but not conflict with anything .
The mesa-git package then should list it before libglvnd in makedepends .


Note to self : libglvnd should really be a makedepend AND runtime depend of  mesa-minimal-git.
adjust mesa-,minimal-git and verify how mesa-git uses it.

Last edited by Lone_Wolf (2022-09-03 12:13:36)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB