<?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>179171</bug_id>
          
          <creation_ts>2017-11-02 07:18:09 -0700</creation_ts>
          <short_desc>[WPE][JHbuild] Gstreamer plugins that link with pango outside of the JHBuild</short_desc>
          <delta_ts>2018-01-31 08:31:06 -0800</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 Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=178918</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="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>cgarcia</cc>
    
    <cc>magomez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1367327</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-11-02 07:18:09 -0700</bug_when>
    <thetext>Starting the WPE minibrowser (dyz) from a clean build (of the JHBuild) I see this warnings


$ WAYLAND_DISPLAY=wayland-0 Tools/Scripts/run-minibrowser --wpe
Starting dyz 
xkbcommon: ERROR: couldn&apos;t find a Compose file for locale &quot;C&quot;
GLib-GIO-Message: Using the &apos;memory&apos; GSettings backend.  Your settings will not be saved or shared with other applications.


(gst-plugin-scanner:9478): GStreamer-WARNING **: Failed to load plugin &apos;/home/clopez/webkit/wpe/WebKitBuild/DependenciesWPE/Root/lib/gstreamer-1.0/libgstopencv.so&apos;: /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined symbol: hb_glib_get_unicode_funcs

(gst-plugin-scanner:9479): GStreamer-WARNING **: Failed to load plugin &apos;/home/clopez/webkit/wpe/WebKitBuild/DependenciesWPE/Root/lib/gstreamer-1.0/libgstrsvg.so&apos;: /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined symbol: hb_glib_get_unicode_funcs




The warnings won&apos;t appear on the second run, as GStreamer will blacklist this modules on the local registry after detecting this and won&apos;t try again to load them.
That&apos;s because we are not building pPngo on the JHBuild and its picking the system-wide one, causing this problem.


A very similar issue was reported on bug 178918.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367330</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-11-02 07:42:32 -0700</bug_when>
    <thetext>Drat. I think we need to roll out r224151 and then land my original patch in that issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367334</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-11-02 07:59:19 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; Drat. I think we need to roll out r224151 and then land my original patch in
&gt; that issue.

I also think that building pango on the jhbuild (even when not stricly needed) is less problematic that keep finding and disabling broken gstreamer modules...

Also.. doesn&apos;t GStreamer needs pango for subtitle rendering? I think WPE supports this. (Adding miguel to the CC).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367341</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-11-02 08:53:39 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #2)
&gt; I also think that building pango on the jhbuild (even when not stricly
&gt; needed) is less problematic that keep finding and disabling broken gstreamer
&gt; modules...

It&apos;s true, though, that pango is not the only potentially-problematic module we might have here.

We should not really be loading any system-installed GStreamer modules. JHBuild has the following code in environment.py that&apos;s presumably supposed to prevent this:

    # GST_PLUGIN_PATH
    gstplugindir = os.path.join(libdir , &apos;gstreamer-0.10&apos;)
    if os.path.exists(gstplugindir):
        addpath(&apos;GST_PLUGIN_PATH&apos;, gstplugindir)

    # GST_PLUGIN_PATH_1_0
    gstplugindir = os.path.join(libdir , &apos;gstreamer-1.0&apos;)
    if os.path.exists(gstplugindir):
        addpath(&apos;GST_PLUGIN_PATH_1_0&apos;, gstplugindir)

    # GST_REGISTRY
    gstregistry = os.path.join(prefix, &apos;_jhbuild&apos;, &apos;gstreamer-0.10.registry&apos;)
    os.environ[&apos;GST_REGISTRY&apos;] = gstregistry

    # GST_REGISTRY_1_0
    gstregistry = os.path.join(prefix, &apos;_jhbuild&apos;, &apos;gstreamer-1.0.registry&apos;)
    os.environ[&apos;GST_REGISTRY_1_0&apos;] = gstregistry

I&apos;m not sure why it doesn&apos;t work.

&gt; Also.. doesn&apos;t GStreamer needs pango for subtitle rendering? I think WPE
&gt; supports this. (Adding miguel to the CC).

Another reason to revert r224151, then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367349</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-11-02 09:01:41 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #2)
&gt; Also.. doesn&apos;t GStreamer needs pango for subtitle rendering? I think WPE
&gt; supports this. (Adding miguel to the CC).

I might be wrong, but I think that&apos;s ENABLE_VIDEO_TRACK, which is PRIVATE and OFF upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394585</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-01-30 09:40:02 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; (In reply to Carlos Alberto Lopez Perez from comment #2)
&gt; &gt; Also.. doesn&apos;t GStreamer needs pango for subtitle rendering? I think WPE
&gt; &gt; supports this. (Adding miguel to the CC).
&gt; 
&gt; I might be wrong, but I think that&apos;s ENABLE_VIDEO_TRACK, which is PRIVATE
&gt; and OFF upstream.

It&apos;s PRIVATE and *ON* upstream.
Yes pango is required for subtitles rendering.
Yes pango should be built in jhbuild.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394617</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-01-30 10:43:48 -0800</bug_when>
    <thetext>So the problem is:

(In reply to Michael Catanzaro from comment #3)
&gt; We should not really be loading any system-installed GStreamer modules.
&gt; JHBuild has the following code in environment.py that&apos;s presumably supposed
&gt; to prevent this:
&gt; 
&gt;     # GST_PLUGIN_PATH
&gt;     gstplugindir = os.path.join(libdir , &apos;gstreamer-0.10&apos;)
&gt;     if os.path.exists(gstplugindir):
&gt;         addpath(&apos;GST_PLUGIN_PATH&apos;, gstplugindir)
&gt; 
&gt;     # GST_PLUGIN_PATH_1_0
&gt;     gstplugindir = os.path.join(libdir , &apos;gstreamer-1.0&apos;)
&gt;     if os.path.exists(gstplugindir):
&gt;         addpath(&apos;GST_PLUGIN_PATH_1_0&apos;, gstplugindir)
&gt; 
&gt;     # GST_REGISTRY
&gt;     gstregistry = os.path.join(prefix, &apos;_jhbuild&apos;, &apos;gstreamer-0.10.registry&apos;)
&gt;     os.environ[&apos;GST_REGISTRY&apos;] = gstregistry
&gt; 
&gt;     # GST_REGISTRY_1_0
&gt;     gstregistry = os.path.join(prefix, &apos;_jhbuild&apos;, &apos;gstreamer-1.0.registry&apos;)
&gt;     os.environ[&apos;GST_REGISTRY_1_0&apos;] = gstregistry
&gt; 
&gt; I&apos;m not sure why it doesn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394984</commentid>
    <comment_count>7</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-01-31 07:30:54 -0800</bug_when>
    <thetext>No this isn&apos;t a $GST* env var issue. The plugins that fail to load where built by jhbuild: DependenciesWPE/Root/lib/gstreamer-1.0/libgstrsvg.so

But they depend on a library not part of the jhbuild: libpangoft2-1.0.so. Seems like enabling harfbuzz in jhbuild would fix this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394988</commentid>
    <comment_count>8</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-01-31 08:00:37 -0800</bug_when>
    <thetext>This seems related to https://trac.webkit.org/changeset/227900/webkit
Maybe update your build and check again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1395000</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-01-31 08:31:06 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #7)
&gt; No this isn&apos;t a $GST* env var issue. The plugins that fail to load where
&gt; built by jhbuild: DependenciesWPE/Root/lib/gstreamer-1.0/libgstrsvg.so
&gt; 
&gt; But they depend on a library not part of the jhbuild: libpangoft2-1.0.so.
&gt; Seems like enabling harfbuzz in jhbuild would fix this?

Does the --with-glib=yes flag control whether libpangoft2-1.0.so is built?

Note: harfbuzz in the GTK+ JHBuild moduleset does not use --with-glib=yes and does not have an explicit dependency on GLib. We&apos;re playing with fire there.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>