<?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>130009</bug_id>
          
          <creation_ts>2014-03-10 01:55:23 -0700</creation_ts>
          <short_desc>[GTK] Cannot build with cmake+ninja and icecc</short_desc>
          <delta_ts>2017-03-11 11:00:45 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>988833</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-03-10 01:55:23 -0700</bug_when>
    <thetext>$ CC=&quot;icecc clang&quot; CXX=&quot;icecc clang++&quot; Tools/Scripts/build-webkit --gtk --makeargs=-j16
[...]
FAILED: cd /home/devel/WebKit/WebKitBuild/Release/Source/WebCore &amp;&amp; /usr/bin/perl -I/home/devel/WebKit/Source/WebCore/bindings/scripts /home/devel/WebKit/Source/WebCore/dom/make_names.pl --preprocessor &quot;/usr/bin/icecc -E -x c++&quot; --outputDir /home/devel/WebKit/WebKitBuild/Release/DerivedSources/WebCore --attrs /home/devel/WebKit/Source/WebCore/svg/svgattrs.in --tags /home/devel/WebKit/Source/WebCore/svg/svgtags.in --factory --wrapperFactory &quot;--extraDefines= ENABLE_FILTERS=1 ENABLE_SVG_FONTS=1&quot;

If you see, the --preprocessor option uses &quot;icecc -E&quot; instead of &quot;icecc clang++ -E&quot;.

This is because in CMakeCache.txt:

   CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/icecc
   CMAKE_CXX_COMPILER_ARG1:STRING= clang++

And in Source/cmake/OptionsCommon.cmake:

   set(CODE_GENERATOR_PREPROCESSOR &quot;${CMAKE_CXX_COMPILER} -E -P -x c++&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068584</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-12 02:52:57 -0800</bug_when>
    <thetext>Can you try with the procedure I documented at https://trac.webkit.org/wiki/WebKitGTK/SpeedUpBuild#Usingiceccwithclang ?

It works fine for me (after r179943), using icecc+ccache+clang.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068585</commentid>
    <comment_count>2</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2015-02-12 03:51:55 -0800</bug_when>
    <thetext>Yes, there are workarounds. Also e.g.

$ ln -s /usr/bin/icecc /tmp/clang
$ ln -s /usr/bin/icecc /tmp/clang++
$ CC=/tmp/clang CXX=/tmp/clang++ Tools/Scripts/build-webkit ...

I opened the bug in case there was an easier way to do it, before we switched to cmake a simple CC=&quot;icecc clang&quot; was enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068627</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-12 08:53:52 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Yes, there are workarounds. Also e.g.
&gt; 
&gt; $ ln -s /usr/bin/icecc /tmp/clang
&gt; $ ln -s /usr/bin/icecc /tmp/clang++
&gt; $ CC=/tmp/clang CXX=/tmp/clang++ Tools/Scripts/build-webkit ...
&gt; 
&gt; I opened the bug in case there was an easier way to do it, before we
&gt; switched to cmake a simple CC=&quot;icecc clang&quot; was enough.

I guess the problem is with invoking the CC compiler as a program with arguments (program=icecc, argument=clang) rather than just a program (by doing the trick of using symlinks and changing the PATH).

I don&apos;t know if this is a bug of WebKitGTK+ or is in CMake itself. I always used the symlink+path way.

Also, if you want to use icecc+ccache together, I don&apos;t see how that will work with the CC=&quot;icecc clang&quot; method.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068855</commentid>
    <comment_count>4</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2015-02-12 23:05:16 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I guess the problem is with invoking the CC compiler as a program
&gt; with arguments (program=icecc, argument=clang) rather than just a
&gt; program

Exactly.

&gt; Also, if you want to use icecc+ccache together, I don&apos;t see how that
&gt; will work with the CC=&quot;icecc clang&quot; method.

I didn&apos;t want to use ccache myself, but it would be possible with the
same method using the CCACHE_PREFIX variable.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>