Skip to content
Snippets Groups Projects

Build -system-info and -check-locale with relative DT_RPATH

Merged Simon McVittie requested to merge wip/t17169 into master
All threads resolved!

This ensures that they can find the non-ubiquitous json-glib library, and the steam-runtime-tools library, even if relocated into a non-standard prefix like the LD_LIBRARY_PATH Steam Runtime.

We can't just use a relative version of the standard library directory as our RPATH, because if we did that, we would load glibc from the same place. This causes crashes in pressure-vessel, where ld.so and the rest of glibc are often taken from the host system via /overrides/lib, and the glibc in /lib and /usr/lib is incompatible with ld.so. Instead, use a private library directory and populate it with relative symlinks to our non-glibc dependencies; we assume the host version of glibc is new enough that this is OK.

Using DT_RPATH in preference to DT_RUNPATH means we take all our direct and indirect dependencies from the same place. This is important when libjson-glib (which won't ordinarily have a RUNPATH or RPATH) pulls in GIO as an indirect dependency of check-locale, which doesn't directly depend on GIO. The GIO library we get must match the versions of GLib and GObject we're using.

This also bypasses LD_LIBRARY_PATH.


This is a redo of !78 (merged), fixing the regression that it caused (I reverted the commit rather than leave it broken).

Binaries: https://build.internal.steamos.cloud/package/show/home:smcv:branches:steamrt:scout:main:t17169/steam-runtime-tools

Latest test-build: https://images.internal.steamos.cloud/playground/steamrt-scout/t17169/

This regression suggests that in addition to https://phabricator.collabora.com/T17426 we need to have an automated test that is run from (/playground)/scout/build and exercises pressure-vessel-wrap wrapped around steam-runtime-system-info. This would probably need to be done in a qemu virtual machine via autopkgtest, because bwrap inside Docker will be a pain to achieve, but the first step towards that would be to make a mostly-automated test that can be run on a developer's system with a documented setup.

/cc @denittis @jpwhiting

Edited by Simon McVittie

Merge request reports

Pipeline #1991 passed

Pipeline passed for c3a06cce on wip/t17169

Merged by Simon McVittieSimon McVittie 5 years ago (Nov 19, 2019 8:37pm UTC)

Loading

Pipeline #2013 passed

Pipeline passed for 30924655 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Simon McVittie added 1 commit

    added 1 commit

    • 1166401d - Build -system-info and -check-locale with relative DT_RPATH

    Compare with previous version

  • Simon McVittie changed the description

    changed the description

  • Simon McVittie added 1 commit

    added 1 commit

    • c3a06cce - Build -system-info and -check-locale with relative DT_RPATH

    Compare with previous version

  • Simon McVittie unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Simon McVittie mentioned in merge request steamrt!37 (merged)

    mentioned in merge request steamrt!37 (merged)

  • When using steam-native or just STEAM_RUNTIME=0, s-r-t is unable to find *-vkinfo/*-wflinfo and also *-check-locale.

    Steps to reproduce:

    This is the output:

    [...]
    Steam Linux Runtime Information:
    {
      "can-write-uinput" : true,
      "steam-installation" : {
        "path" : "/home/ryuzaki/.local/share/Steam",
        "data_path" : "/home/ryuzaki/.local/share/Steam",
        "issues" : [
        ]
      },
      "runtime" : {
        "path" : null,
        "version" : null,
        "issues" : [
          "disabled"
        ]
      },
      "os-release" : {
        "id" : "arch",
        "name" : "Arch Linux",
        "pretty_name" : "Arch Linux",
        "build_id" : "rolling"
      },
      "architectures" : {
        "i386-linux-gnu" : {
          "can-run" : false,
          "graphics-details" : {
            "x11/vulkan" : {
              "messages" : "timeout: failed to run command ‘i386-linux-gnu-vulkaninfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "issues" : [
                "cannot-load"
              ]
            },
            "glx/gl" : {
              "messages" : "timeout: failed to run command ‘i386-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            },
            "egl_x11/gl" : {
              "messages" : "timeout: failed to run command ‘i386-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            },
            "egl_x11/glesv2" : {
              "messages" : "timeout: failed to run command ‘i386-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            }
          }
        },
        "x86_64-linux-gnu" : {
          "can-run" : false,
          "graphics-details" : {
            "x11/vulkan" : {
              "messages" : "timeout: failed to run command ‘x86_64-linux-gnu-vulkaninfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "issues" : [
                "cannot-load"
              ]
            },
            "glx/gl" : {
              "messages" : "timeout: failed to run command ‘x86_64-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            },
            "egl_x11/gl" : {
              "messages" : "timeout: failed to run command ‘x86_64-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            },
            "egl_x11/glesv2" : {
              "messages" : "timeout: failed to run command ‘x86_64-linux-gnu-wflinfo’: No such file or directory\n",
              "renderer" : null,
              "version" : null,
              "library-vendor" : "unknown",
              "issues" : [
                "cannot-load"
              ]
            }
          }
        }
      },
      "locale-issues" : [
        "default-missing",
        "c-utf8-missing",
        "en-us-utf8-missing",
        "i18n-supported-missing"
      ],
      "locales" : {
        "<default>" : {
          "error-domain" : "srt-locale-error-quark",
          "error-code" : 1,
          "error" : "Unable to check whether locale \"\" works: /home/ryuzaki/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/../lib/x86_64-linux-gnu/steam-runtime-tools-0/libexec/steam-runtime-tools-0/x86_64-linux-gnu-check-locale not found"
        },
        "C" : {
          "error-domain" : "srt-locale-error-quark",
          "error-code" : 1,
          "error" : "Unable to check whether locale \"C\" works: /home/ryuzaki/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/../lib/x86_64-linux-gnu/steam-runtime-tools-0/libexec/steam-runtime-tools-0/x86_64-linux-gnu-check-locale not found"
        },
        "C.UTF-8" : {
          "error-domain" : "srt-locale-error-quark",
          "error-code" : 1,
          "error" : "Unable to check whether locale \"C.UTF-8\" works: /home/ryuzaki/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/../lib/x86_64-linux-gnu/steam-runtime-tools-0/libexec/steam-runtime-tools-0/x86_64-linux-gnu-check-locale not found"
        },
        "en_US.UTF-8" : {
          "error-domain" : "srt-locale-error-quark",
          "error-code" : 1,
          "error" : "Unable to check whether locale \"en_US.UTF-8\" works: /home/ryuzaki/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/../lib/x86_64-linux-gnu/steam-runtime-tools-0/libexec/steam-runtime-tools-0/x86_64-linux-gnu-check-locale not found"
        }
      },
      "egl" : {
        "icds" : [
          {
            "json_path" : "/usr/share/glvnd/egl_vendor.d/50_mesa.json",
            "library_path" : "libEGL_mesa.so.0"
          }
        ]
      },
      "vulkan" : {
        "icds" : [
          {
            "json_path" : "/usr/share/vulkan/icd.d/radeon_icd.x86_64.json",
            "library_path" : "/usr/lib/libvulkan_radeon.so",
            "api_version" : "1.1.107"
          },
          {
            "json_path" : "/usr/share/vulkan/icd.d/radeon_icd.i686.json",
            "library_path" : "/usr/lib32/libvulkan_radeon.so",
            "api_version" : "1.1.107"
          }
        ]
      }
    }
    
    CClientJobGatherRuntimeInformation: container read output failed
  • Simon McVittie changed the description

    changed the description

  • Ludovico de Nittis resolved all threads

    resolved all threads

  • Looks good to me.

  • Simon McVittie mentioned in commit 30924655

    mentioned in commit 30924655

  • Simon McVittie mentioned in merge request !88 (merged)

    mentioned in merge request !88 (merged)

Please register or sign in to reply
Loading