Bug 53128 - Compilation fails to 'DBL_EPSILON undeclared'
Summary: Compilation fails to 'DBL_EPSILON undeclared'
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.2
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-04 19:15 UTC by Marko Lindqvist
Modified: 2018-08-25 13:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Marko Lindqvist 2012-08-04 19:15:32 UTC
cairo-matrix.c:1172 errors due to undeclared DBL_EPSILON.

I'm tryin to cross-compile from linux to Mingw. This compiler and environment is not much tested - I first assumed that problem is in the environment, but quick grepping for "DBL_EPSILON" in cairo tree suggests that there's no configure check or anything to workaround the situation when system headers do not define it.
Comment 1 YuGiOhJCJ 2014-08-20 12:34:49 UTC
Same problem here while cross-compiling cairo-1.12.16.

I am on a Linux 32 bit operating system (Slackware 14.1) and I have a cross-compiler based on:
- binutils-2.24.51
- gcc-4.9.1
- mingwrt-3.20.2
- w32api-3.17.2

Here is how to reproduce:
$ PKG_CONFIG_PATH="/usr/i686-pc-mingw32/lib/pkgconfig"
$ ./configure --prefix=/usr/i686-pc-mingw32 --host=i686-pc-mingw32 --disable-lto --disable-gtk-doc --disable-test-surfaces --disable-gcov --disable-xlib --disable-xlib-xrender --disable-xcb --disable-quartz --disable-quartz-font --disable-quartz-image --disable-os2 --disable-beos --disable-directfb --disable-atomic --enable-win32 --enable-win32-font --enable-png --enable-ft --enable-ps --enable-pdf --enable-svg --disable-pthread
$ make
[...]
  CC     cairo-matrix.lo
cairo-matrix.c: In function '_cairo_matrix_to_pixman_matrix_offset':
cairo-matrix.c:1172:24: error: 'DBL_EPSILON' undeclared (first use in this function)
       if (fabs (den) < DBL_EPSILON)
                        ^
cairo-matrix.c:1172:24: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [cairo-matrix.lo] Error 1
make[3]: Leaving directory `/tmp/build/cairo-1.12.16/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/build/cairo-1.12.16/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/build/cairo-1.12.16'
make: *** [all] Error 2

Any idea to solve this problem?
Comment 2 Adrian Johnson 2014-08-20 13:30:32 UTC
Cross compiling works fine with mingw-64. The script at http://rodrigo.dualnot.com/en/mingw-cross-compiler/ works perfectly on Ubuntu 14.04.
Comment 3 GitLab Migration User 2018-08-25 13:41:17 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/138.


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.