Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to deploy application that depends on dynamic libraries?
    primarykey
    data
    text
    <p>I am developing an application that uses the GStreamer library. In order to ease deployment I would like to collect all the GStreamer libraries in a local bundle. For this I wrote a little script that does the following:</p> <ul> <li>recursively traverse dependencies (using <code>otool -L</code>)</li> <li>copy all dependencies to a local directory</li> <li>make all the dependency paths relative to @executable_path (using <code>install_name_tool</code>)</li> </ul> <p>(If you're interested you can have a look at the <a href="http://code.google.com/p/stacked-crooked/source/browse/trunk/Utilities/localize_dependencies.rb" rel="noreferrer">Ruby script</a>.)</p> <p>However, I'm now seeing runtime errors on the <code>gst_init</code> call:</p> <pre><code>(process:22843): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use g_type_init() prior to this function (process:22843): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed </code></pre> <p>These errors only occur if I use the localized libraries.</p> <p><br> Are there certain 'common pitfalls' when it comes to using install_name_tool? Does anyone have an idea what I could be doing wrong? If you need to know certain details then feel free to ask. </p> <p><b>Update</b><br> I changed a few things:</p> <ul> <li>For the dependent libraries I now only change the dylib paths and not the id (only use <code>install_name_tool -change</code> and not <code>install_name_tool -id</code>).</li> <li>For the main library I set the id value relative to the executable path (<code>@executable_name/components/Video.dylib</code>).</li> </ul> <p>These two changes make it work. However it is not yet clear to me why it works. I have some trouble understanding the meaning of the "id" property. It seems to be identifier in the form of a pathname. Why did changing it for the dependent libraries cause runtime errors? I'll try to find answers to those questions with some further experimentation...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload