From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Sebastian Brzezinka" <sebastian.brzezinka@intel.com>
Cc: <igt-dev@lists.freedesktop.org>,
<kamil.konieczny@linux.intel.com>, <krzysztof.karas@intel.com>,
<krzysztof.niemiec@intel.com>
Subject: Re: [PATCH i-g-t 00/25] tools: remove unnecessary shared library
Date: Thu, 25 Jun 2026 18:30:26 -0700 [thread overview]
Message-ID: <877bnmozpp.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <DJHZZX3NBXVR.2GWSSH9B7LDLL@intel.com>
On Thu, 25 Jun 2026 01:47:13 -0700, Sebastian Brzezinka wrote:
>
Hi Sebastian,
> On Wed Jun 24, 2026 at 6:33 PM CEST, Ashutosh Dixit wrote:
> > On Wed, 24 Jun 2026 01:47:07 -0700, Sebastian Brzezinka wrote:
> >>
> >> Standalone tools linked libigt.so as a side effect, pulling in cairo,
> >> pixman and libX11 even without framebuffer use.
> >>
> >> Following intel_gpu_top's approach, each tool now links only the static
> >> sub-libraries it needs. Five new ones are introduced:
> >>
> >> lib_igt_tools_stub, lib_igt_drm_stub, lib_igt_halffloat,
> >> lib_i915_decode, lib_igt_reg_tools.
> >
> > So I am trying to figure out what is the "real" reason for doing this.
> The motivation for this was explained in 2019, freedesktop bug
> #110249, by Eero Tamminen:
>
> "It's annoying to need to install these redundant dependencies on
> e.g. headless media transcoding server if one just wants to use
> intel_gpu_top to monitor GPU utilization."
>
> Chris Wilson fixed intel_gpu_top back then and said "One down, the rest
> left to an adventurous sole." This series finishes that job. Tools should
> only link what they actually use. That's basic. intel_stepping does
> not need Cairo. intel_backlight does not need ALSA. Yet today they
> both pull in 30+ libraries through libigt.so. This series fixes that.
> I shouldn't have to explain why a tool that reads a register shouldn't
> depend on a graphics rendering library.
>
> > If tomorrow the tool uses a function which is not present in the tiny
> > library but in the big library, what are we going to do? So, isn't it
> > better to link against one big library, rather than tiny libraries?
> >
> If a tool needs new functionality in the future, we add it to the
> appropriate sub-library or add a new dependency. That's a one-line meson
> change, done intentionally, with a clear reason.
>
> That's better than the alternative: preemptively linking everything
> against a library that drags in Cairo, ALSA, X11 and 35 other things
> "just in case" someone someday needs something from it.
>
> > Since it should use dynamic linking, it is not that the size of the
> > executable will change one way or the other.
> >
> The point is not executable size. The point is runtime dependencies
> what needs to be installed on the system for the tool to run at all.
>
> With libigt.so as a dynamic dependency, you cannot run intel_stepping
> on a headless server without first installing Cairo, X11, ALSA, freetype
> and 35 other libraries that the tool has absolutely no use for.
>
> After this series, you just run the tool. Nothing extra needed.
OK, because you are linking statically I think.
>
> > So what is driving this change? Maybe I am missing something.
> I appreciate the question, sorry for not including the link in the cover
> letter. This issue was raised by the community back in 2019 and is well
> documented here: https://bugs.freedesktop.org/show_bug.cgi?id=110249
Thanks for the detailed explanations, the series is:
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2026-06-26 1:30 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 8:47 [PATCH i-g-t 00/25] tools: remove unnecessary shared library Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 01/25] tools: igt_stats: drop libigt.so, link against minimal sub-libraries Sebastian Brzezinka
2026-06-25 6:11 ` Krzysztof Karas
2026-06-25 9:02 ` Sebastian Brzezinka
2026-06-26 5:55 ` Krzysztof Karas
2026-06-24 8:47 ` [PATCH i-g-t 02/25] tools: intel_firmware_decode: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 03/25] lib: extend igt_tools_stub with additional stubs needed by tools Sebastian Brzezinka
2026-06-25 6:27 ` Krzysztof Karas
2026-06-24 8:47 ` [PATCH i-g-t 04/25] lib: introduce lib_igt_drm_stub for tools needing driver detection Sebastian Brzezinka
2026-06-25 7:56 ` Krzysztof Karas
2026-06-24 8:47 ` [PATCH i-g-t 05/25] lib: introduce lib_igt_halffloat static sub-library for tools Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 06/25] lib: introduce lib_i915_decode " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 07/25] lib: introduce lib_igt_reg_tools " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 08/25] tools: intel_gpu_frequency: drop libigt.so, link against minimal sub-libraries Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 09/25] lib/i915: intel_decode: replace igt.h with minimal headers Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 10/25] tools: intel_stepping: drop libigt.so, link against minimal sub-libraries Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 11/25] tools: intel_gtt: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 12/25] tools: intel_error_decode: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 13/25] tools: intel_vbt_decode: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 14/25] tools: intel_backlight: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 15/25] tools: intel_lid: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 16/25] tools: intel_gpu_time: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 17/25] tools: intel_audio_dump: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 18/25] tools: intel_forcewaked: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 19/25] tools: intel_guc_logger: " Sebastian Brzezinka
2026-06-25 11:37 ` Krzysztof Karas
2026-06-24 8:47 ` [PATCH i-g-t 20/25] tools: intel_infoframes: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 21/25] tools: intel_panel_fitter: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 22/25] tools: intel_watermark: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 23/25] tools: intel_display_poller: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 24/25] tools: intel_gvtg_test: " Sebastian Brzezinka
2026-06-24 8:47 ` [PATCH i-g-t 25/25] tools: lsgpu: " Sebastian Brzezinka
2026-06-24 10:35 ` ✓ i915.CI.BAT: success for tools: remove unnecessary shared library Patchwork
2026-06-24 10:39 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-24 12:10 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-24 16:33 ` [PATCH i-g-t 00/25] " Dixit, Ashutosh
2026-06-25 8:47 ` Sebastian Brzezinka
2026-06-26 1:30 ` Dixit, Ashutosh [this message]
2026-06-24 18:33 ` ✗ i915.CI.Full: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bnmozpp.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
--cc=sebastian.brzezinka@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox