Bug 46299 - Invalid .def file generated (breaks compilation on win32 using modern binutils)
Summary: Invalid .def file generated (breaks compilation on win32 using modern binutils)
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.3
Hardware: Other Windows (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-19 13:28 UTC by Erik van Pienbroek
Modified: 2018-08-25 13:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Erik van Pienbroek 2012-02-19 13:28:09 UTC
Recent versions of binutils (feb 2012) got more strict with regards to the processing of .def files. At the moment cairo automatically generates a .def file like this:
EXPORTS
cairo_append_path
cairo_arc
cairo_arc_negative
<snip>
LIBRARY libcairo-2.dll

This used to work in older versions of binutils, but according to Kai Tietz (one of the mingw-w64 developers) this .def file is incorrect. The documentation at http://msdn.microsoft.com/en-us/library/d91k01sh%28v=vs.80%29.aspx states that .def files must start with the LIBRARY statement following by the EXPORTS statement. 

I'm not entirely sure how this can be fixed in cairo properly. There are two places where .def files are generated. The first is in src/Makefile.am (where the EXPORTS and LIBRARY statements are also added). However, the output from this script is then also processed by the script src/check-def.sh. This check-def.sh script adds another EXPORTS line and contains a hack to retrieve the last line (that would be the LIBRARY line) of the initial .def file.
Comment 1 Erik van Pienbroek 2012-02-19 14:48:20 UTC
binutils and libtool bugs are also filed:
binutils: http://sourceware.org/bugzilla/show_bug.cgi?id=13710
libtool: https://savannah.gnu.org/support/index.php?107959
Comment 2 GitLab Migration User 2018-08-25 13:41:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/137.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.