Cairo make ignores sysroot.
Submitted by Ala..@...co.uk
Assigned to Chris Wilson @ickle
Description
I cloned Cairo from the git repository. Last commit was dd4706d0, "pdf: Fix wrong cairo_pdf_outline_flags_t item prefix", last tag was 1.15.14.
I am working on Ubuntu, compiling using MinGW.
I used the following command to configure:
./configure --prefix=${HOME}/Workspace/mingw/cairo --host=x86_64-w64-mingw32 --enable-xlib=no --enable-xlib-xrender=no --enable-xcb=no --enable-xlib-xcb=no --enable-xcb-shm=no --enable-png=yes --with-sysroot=/usr/x86_64-w64-mingw32
The compile fails as follows:
In file included from /usr/include/freetype2/ft2build.h:37:0,
from cairo-ft.h:46,
from cairo-ft-private.h:41,
from cairo-script-surface.c:88:
/usr/include/freetype2/freetype/config/ftheader.h:78:3: error: #error unknown multiarch location for ftheader.h
# error unknown multiarch location for ftheader.h
This error is generated from /usr/include/freetype2/freetype/config/ftheader.h but the compile SHOULD be using /usr/x86_64-w64-mingw32/include/freetype2/freetype/config/ftheader.h.
I have built all the dependencies using a similar configure line but without the "--with-sysroot" option and they all compiled fine and were evidently getting files from the right location as can be seen by the fact that header files that were on the build system and not on the target system were reported as missing.
If you want to reproduce this issue, I can save you some time with the dependencies. I have been making them available at https://gitlab.com/AGrowcott/Ubuntu-mingw-prebuilt-libs. Note that I built libpng16 rather than libpng12 though. I am going to have to edit your make files before I am finished I think.