<?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>241483</bug_id>
          
          <creation_ts>2022-06-09 13:24:17 -0700</creation_ts>
          <short_desc>[CMake] Fix GStreamer include path when cross compiling</short_desc>
          <delta_ts>2022-06-27 16:57:13 -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>CMake</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Pablo Saavedra">psaavedra</reporter>
          <assigned_to name="Pablo Saavedra">psaavedra</assigned_to>
          <cc>aperez</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1875087</commentid>
    <comment_count>0</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2022-06-09 13:24:17 -0700</bug_when>
    <thetext>Set the full path of the gstreamer components using find_path().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875088</commentid>
    <comment_count>1</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2022-06-09 13:27:36 -0700</bug_when>
    <thetext>The cmake rule for set the include dir for the gstreamer components assumes a non cross toolchain environment. That results in poison system directories when WebKit is built using such kind of toolchains: 

... -isystem /usr/include/gstreamer-1.0 -isystem /tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/gstreamer-1.0 


e.g:

cc1plus: warning: include location &quot;/usr/include/gstreamer-1.0&quot; is unsafe for cross-compilation [-Wpoison-system-directories]


cc1plus: error: include location &quot;/usr/include/gstreamer-1.0&quot; is unsafe for cross-compilation [-Werror=poison-system-directories]


&quot;MOC_INCLUDES&quot; :
[
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/lib/glib-2.0/include&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/libsoup-2.4&quot;,
    &quot;/usr/include/gstreamer-1.0&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/gstreamer-1.0&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/orc-0.4&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/wpewebkit-2.36.3&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/cairo&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/freetype2&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/harfbuzz&quot;,
    &quot;/tmp/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.36.3-r0/recipe-sysroot/usr/include/wpe-1.0&quot;,
]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875090</commentid>
    <comment_count>2</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2022-06-09 13:33:30 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/1428</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875189</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2022-06-10 00:15:13 -0700</bug_when>
    <thetext>We&apos;ve been cross-compiling this for years in Yocto. Did they change something recently?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875722</commentid>
    <comment_count>4</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2022-06-14 01:44:17 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #3)
&gt; We&apos;ve been cross-compiling this for years in Yocto. Did they change
&gt; something recently?

I haven&apos;t identified the specific change but this started to fail in kirkstone Yocto release. For example, the build still works. The reason why this is happening now is because the command line for cc to build the QT plugin uses -Werror=poison-system-directories.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875750</commentid>
    <comment_count>5</comment_count>
    <who name="Pablo Saavedra">psaavedra</who>
    <bug_when>2022-06-14 05:06:35 -0700</bug_when>
    <thetext>(In reply to Pablo Saavedra from comment #4)
&gt; (In reply to Philippe Normand from comment #3)
&gt; &gt; We&apos;ve been cross-compiling this for years in Yocto. Did they change
&gt; &gt; something recently?
&gt; 
&gt; I haven&apos;t identified the specific change but this started to fail in
&gt; kirkstone Yocto release. For example, the build still works. The reason why
&gt; this is happening now is because the command line for cc to build the QT
&gt; plugin uses -Werror=poison-system-directories.


That `-Werror=poison-system-directories` option was already there for a while (2020) in Yocto. What  changed is the includes  (-I) are being resolved. In honister they are being resolved fine. Now I have doubts if this change in the behavior is consequence of a update in cmake ,  in binutils  or similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878628</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-06-27 16:57:11 -0700</bug_when>
    <thetext>Committed 251895@main (25efd1478b48): &lt;https://commits.webkit.org/251895@main&gt;

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

    </bug>

</bugzilla>