<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>247985</bug_id>
          
          <creation_ts>2022-11-16 10:26:54 -0800</creation_ts>
          <short_desc>[GTK][WPE] Fix relocation issues running the MiniBrowser or the layout tests when the path on disk changes</short_desc>
          <delta_ts>2023-08-02 18:49:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=259759</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1912913</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2022-11-16 10:26:54 -0800</bug_when>
    <thetext>When WebKit is built the path of the repository (where you have the checkout) is stored in the binaries in different ways:

 - The path to the WebKit libraries is stored as an rpath on the ELF binaries
 - The CMake system also defines some constant strings to the build like WEBKIT_EXEC_PATH and WEBKIT_INJECTED_BUNDLE_PATH that end going into the binaries as default values.
   This default values can be overriden at run-time via environment variables, but the current tooling is not doing that.

This means that if you build WebKit in a directory and then move the directory to a different path (without rebuilding) you are going to find errors and crashes:

Example of error:
                 Release/bin/MiniBrowser: error while loading shared libraries: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory


This is not an issue with the flatpak build, because the flatpak build maps the buildirectory to /app so the path doesn&apos;t change in that case even if you move the directory.

But it is an issue for builds not using flatpak. Specifically I found this on a bots that I&apos;m working on where the builder builds on a different path than the tester (and the tester downloads the build product from the builder, doesn&apos;t build it)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912918</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2022-11-16 11:09:17 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/6557</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913222</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-17 10:13:02 -0800</bug_when>
    <thetext>Committed 256795@main (79f5dfafe126): &lt;https://commits.webkit.org/256795@main&gt;

Reviewed commits have been landed. Closing PR #6557 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>