Bug 242607 - graphics/mesa-dri: drop RUN_DEPENDS on devel/llvm*
Summary: graphics/mesa-dri: drop RUN_DEPENDS on devel/llvm*
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Keywords: patch
Depends on:
Reported: 2019-12-12 17:03 UTC by Jan Beich
Modified: 2020-07-11 20:07 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)

v1 (1.58 KB, patch)
2019-12-12 17:03 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2019-12-12 17:03:54 UTC
Created attachment 209897 [details]

llvm* package is large but mesa-dri only needs libLLVM and is stuck with obsolete version. So, let's reduce the install size via static linking.
Comment 1 Jan Beich freebsd_committer 2019-12-12 17:32:00 UTC
For 12.1 amd64 example, mesa-dri 19.0.8 built against llvm90 grows from 31 MiB to 109 MiB but drops 799 MiB large llvm90 dependency.

Runtime (at least, llvmpipe) seems to be fine. Tested within a pristine jail (connected to Sway on host) e.g.,

  $ pkg install firefox mesa-dri
Comment 2 Emmanuel Vadot freebsd_committer 2019-12-12 17:55:01 UTC
Wouldn't it be better to create a libllvm package that only install libllvm ? (and maybe conflict with llvm or something like that).
Comment 3 Jan Beich freebsd_committer 2019-12-12 18:05:18 UTC
For each devel/llvm* port? Until review D16457 lands packaging components separately requires slave ports.
Comment 4 Emmanuel Vadot freebsd_committer 2019-12-12 18:14:36 UTC
Yes indeed this is a good candidate for subpackages that we don't have yet.
I'm not a fan of this solution but maybe there is no better way of dealing with that before subpackages land.
Comment 5 Lars Engels freebsd_committer 2019-12-13 21:13:56 UTC
(In reply to Jan Beich from comment #1)

I tried your patch and Xorg and it works fine for me on 12.1-RELEASE-p1 with Intel HD Graphics 5500.
Comment 6 Niclas Zeising freebsd_committer 2019-12-17 15:24:02 UTC
I'm very skeptical to this change.  This would mean that for every change to llvm80 (in this case, but future versions as well) all mesa ports that statically link to llvm would need to be bumped as well, and keeping track of that would be problematic.

Looking upstream, the default is dynamic linking, which also means that static linking probably gets less testing, but I haven't asked around upstream.

It could be possible to create an option, defaulting it to off, for people who find the extra dependency on llvm bothersome.  They would then themselves have to keep track of any bumps to llvm and recompile mesa as needed.
Comment 7 Niclas Zeising freebsd_committer 2020-07-11 20:07:34 UTC
As I've stated before, I believe this is a bad change as this means we need to keep track of LLVM version bumps (even minor, maybe) and then bump mesa* at the same time.