Skip to content
Snippets Groups Projects

Canonicalize the library path returned by dladdr

Merged Antonio Larrosa requested to merge antlarr/gstreamer:fix-relocated-path into main

On systems using UsrMerge (like openSUSE or Fedora), /lib64 is a symlink to /usr/lib64. So dladdr is returning the path to the gstreamer library in /lib64 in priv_gst_get_relocated_libgstreamer. Later gst_plugin_loader_spawn tries to build the path to the gst-plugin-scanner helper from /lib64 and ends up trying to use /lib64/../libexec/gstreamer-1.0/gst-plugin-scanner which doesn't exist.

By canonicalizing the path with a call to realpath, gst-plugin-scanner is found correctly under /usr/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner

Fixes: #2877 (closed)

Edited by Antonio Larrosa

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in issue #3352 (closed)

  • Antonio Larrosa added 2 commits

    added 2 commits

    • 205ae757 - Use pathconf to avoid using PATH_MAX
    • 6a651fab - Canonicalize the library path returned by dladdr

    Compare with previous version

  • Antonio Larrosa added 1 commit

    added 1 commit

    • 642589af - Obtain path_max in a standard way, fix indent and use g_free

    Compare with previous version

  • Antonio Larrosa resolved all threads

    resolved all threads

  • Looks good to me except for those minor things. Can you fix and then squash it all into a single commit?

    Thanks!

  • Sebastian Dröge approved this merge request

    approved this merge request

  • Antonio Larrosa added 1 commit

    added 1 commit

    • 8d17e447 - Canonicalize the library path returned by dladdr

    Compare with previous version

  • Antonio Larrosa resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading