Summary: | IGT command line tools load redundant GUI libraries | ||
---|---|---|---|
Product: | DRI | Reporter: | Eero Tamminen <eero.t.tamminen> |
Component: | IGT | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | minor | ||
Priority: | medium | ||
Version: | DRI git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Eero Tamminen
2019-03-26 13:11:01 UTC
(In reply to Eero Tamminen from comment #0) ... > X11 libraries, libglsl etc stuff brought in by libigt. Sorry, that wasn't libglsl, but libgls (GNU Scientific Library). Some food for thought: The old autotools build did not have this problem since it: - was creating a static libigt library - yet ^^ would lead to slightly longer build times and overall larger bundle - ^^ would only pull the required dependencies into the linking process For reference: $ objdump -x /usr/bin/intel_gpu_top | grep -w NEEDED NEEDED libpthread.so.0 NEEDED libc.so.6 If it were me I would: - static link - drop all the extra rpath from the meson build - if size is an issue - enable LTO The autotools build doesn't have this problem because in there intel-gpu-top is not linked against libigt.la, as nothing outside of tests/ should be. It looks like a bit of carelessness introduced the extra deps when writing the meson.build. (In reply to Chris Wilson from comment #3) > The autotools build doesn't have this problem because in there intel-gpu-top > is not linked against libigt.la, as nothing outside of tests/ should be. It > looks like a bit of carelessness introduced the extra deps when writing the > meson.build. Almost all the installed tools link it: $ for i in intel*; do echo $i; readelf -d $i|grep libigt; done /opt/install/bin/intel_aubdump readelf: Error: Not an ELF file - it has the wrong magic bytes at the start /opt/install/bin/intel_audio_dump 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_backlight 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_bios_dumper /opt/install/bin/intel_display_crc 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_display_poller 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_dp_compliance 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_dump_decode /opt/install/bin/intel_dump_gpu readelf: Error: Not an ELF file - it has the wrong magic bytes at the start /opt/install/bin/intel_error2aub /opt/install/bin/intel_error_decode 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_firmware_decode 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_forcewaked 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_framebuffer_dump /opt/install/bin/intel_gem_info 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel-gen4asm /opt/install/bin/intel-gen4disasm /opt/install/bin/intel_gpu_abrt readelf: Error: Not an ELF file - it has the wrong magic bytes at the start /opt/install/bin/intel_gpu_frequency 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_gpu_time 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_gpu_top 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_gtt 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_guc_logger 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_gvtg_test 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_infoframes 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_l3_parity 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_lid 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_opregion_decode /opt/install/bin/intel_panel_fitter 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_perf_counters 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_reg 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_reg_checker 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_residency 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_sanitize_gpu readelf: Error: Not an ELF file - it has the wrong magic bytes at the start /opt/install/bin/intel_stepping 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_vbt_decode 0x0000000000000001 (NEEDED) Shared library: [libigt.so] /opt/install/bin/intel_watermark 0x0000000000000001 (NEEDED) Shared library: [libigt.so] One down, the rest left to an adventurous sole. commit a350b9f9f606296b1599c3617c8530a8985709e2 (HEAD, upstream/master) Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Mar 26 13:26:26 2019 +0000 tools/intel-gpu-top: Only link against igt_perf.la Fix the meson build to not link intel-gpu-top against the whole test infrastructure; it's a tool not a test! Reported-by: Eero Tamminen <eero.t.tamminen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110249 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> But first, it would be wise for Eero to confirm that does the trick, $ ldd build/tools/intel_gpu_top linux-vdso.so.1 (0x00007ffdf29f9000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f64a15b2000) /lib64/ld-linux-x86-64.so.2 (0x00007f64a179d000) intel_gpu_top works fine now. Large difference in ldd output, and it's still small: $ size intel_gpu_top text data bss dec hex filename 21102 1204 304 22610 5852 /opt/install/bin/intel_gpu_top For this bug to be considered fixed, I think the rest of tools should be also fixed although I personally care only about the intel_gpu_top... Following tools still link libigt: ------------------------- for i in intel*; do echo $i; readelf -d $i | grep libigt; done 2>/dev/null | awk ' /^intel/ { name=$1 } /NEEDED.*libigt.so/ { print "-", name } ' ------------------------ - intel_audio_dump - intel_backlight - intel_display_crc - intel_display_poller - intel_dp_compliance - intel_error_decode - intel_firmware_decode - intel_forcewaked - intel_gem_info - intel_gpu_frequency - intel_gpu_time - intel_gtt - intel_guc_logger - intel_gvtg_test - intel_infoframes - intel_l3_parity - intel_lid - intel_panel_fitter - intel_perf_counters - intel_reg - intel_reg_checker - intel_residency - intel_stepping - intel_vbt_decode - intel_watermark -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/16. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.