<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - cario fails to compile with gcc 4.9"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=77060">77060</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cario fails to compile with gcc 4.9
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yunlian@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>1.12.14
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When using gcc 4.9, I got the following errors.

This is because for gcc 4.9 When using a linker plugin, compiling with the
-flto option now generates slim objects files (.o) which only contain
intermediate language representation for LTO. Use -ffat-lto-objects to create
files which contain additionally the object code.
So a quick fix is to add '-ffat-lto-objects' when -flto is used.

  CCLD   cairo-sphinx
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_matrix_init_identity'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_matrix_init'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_scaled_font_reference'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_pattern_reference'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_font_face_reference'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_reference'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_scaled_font_destroy'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_pattern_destroy'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_font_face_destroy'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_font_options_set_antialias'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: error: undefined
reference to 'cairo_font_options_set_subpixel_order'
../../util/cairo-script/.libs/libcairo-script-interpreter.so: esphinx.c:979:
error: undefined reference to 'cairo_surface_create_similar'
sphinx.c:981: error: undefined reference to 'cairo_surface_get_type'
sphinx.c:984: error: undefined reference to 'cairo_boilerplate_xmalloc'
sphinx.c:987: error: undefined reference to 'cairo_surface_set_user_data'
sphinx.c:874: error: undefined reference to 'cairo_surface_get_type'
sphinx.c:881: error: undefined reference to 'cairo_surface_get_user_data'
sphinx.c:875: error: undefined reference to 'cairo_image_surface_get_width'
sphinx.c:876: error: undefined reference to 'cairo_image_surface_get_height'
sphinx.c:877: error: undefined reference to 'cairo_image_surface_get_format'
sphinx.c:890: error: undefined reference to 'cairo_create'
sphinx.c:891: error: undefined reference to 'cairo_clip_extents'</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>