<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK][Mac] gobject-introspection uses wrong shared-library path"
   href="https://bugs.webkit.org/show_bug.cgi?id=152183">152183</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK][Mac] gobject-introspection uses wrong shared-library path
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X 10.11
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Gtk
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Tom.Schoonjans&#64;me.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

I am the maintainer of the webkitgtk formula for Homebrew. I noticed today that the gobject-introspection typelib files provided by webkitgtk do not work.

I discovered this while running a simple test with gjs, which imports the Webkit2 typelib and results in the following run-time error:

** (gjs:89955): WARNING **: Failed to load shared library '/tmp/webkitgtk20151211-60021-ktyz48/webkitgtk-2.10.4/lib/libwebkit2gtk-4.0.37.dylib' referenced by the typelib: dlopen(/tmp/webkitgtk20151211-60021-ktyz48/webkitgtk-2.10.4/lib/libwebkit2gtk-4.0.37.dylib, 9): image not found

Clearly what happened here is that the build path was used by g-ir-scanner instead of the installation prefix. I confirmed this by inspecting both gir and typelib files

An extract from WebKit2-4.0.gir:

  &lt;namespace name=&quot;WebKit2&quot;
             version=&quot;4.0&quot;
             shared-library=&quot;/tmp/webkitgtk20151211-60021-ktyz48/webkitgtk-2.10.4/lib/libwebkit2gtk-4.0.37.dylib,/tmp/webkitgtk20151211-60021-ktyz48/webkitgtk-2.10.4/lib/libjavascriptcoregtk-4.0.18.dylib&quot;
             c:identifier-prefixes=&quot;WebKit&quot;
             c:symbol-prefixes=&quot;webkit&quot;&gt;</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>