<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hello,<br>
<br>
I'm on Windows XP and I'm using MingW, GCC and <a
href="https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/cross_compile_ffmpeg.sh">this
script</a> to compile LibCairo (amongst other dependencies to
eventually compile Tesseract).<br>
This is the function I'm using to compile Cairo:<br>
<br>
</font>
</font>
<div
style="font-size:10.0pt;font-family:Monospace;background:silver;">build_libcairo()
{<br>
download_and_unpack_file
<a class="moz-txt-link-freetext" href="https://www.cairographics.org/releases/cairo-1.14.10.tar.xz">https://www.cairographics.org/releases/cairo-1.14.10.tar.xz</a><br>
<font color="#0000ff">cd</font> cairo-1.14.10<br>
<font color="#0000ff">if</font> [[ ! <font color="#0000ff">-f</font>
Makefile.in.bak ]]; <font color="#0000ff">then</font>
<br>
<font color="#0000ff">sed</font> -i.bak <font
color="#008080">"/^SUBDIRS/s/src.*/src/"</font> Makefile.in <font
color="#008000"># Library only.</font>
<br>
<font color="#0000ff">fi</font>
<br>
<font color="#0000ff">export</font> PKG_CONFIG=<font
color="#008080">"pkg-config --static"</font> <font
color="#008000"># Automatically detect all FreeType's
dependencies.</font>
<br>
generic_configure<br>
do_make_and_make_install<br>
<font color="#0000ff">unset</font> PKG_CONFIG<br>
<font color="#0000ff">cd</font> ..<br>
} <font color="#008000"># ZLIB, LIBPNG, FREETYPE, FONTCONFIG,
pixman, GLIB (GOBJECT)</font>
</div>
<font size="-1"><font face="Helvetica, Arial, sans-serif"><br>
<span
style="font-size:10.0pt;font-family:Monospace;background:silver;">generic_configure</span>
translates to:<br>
<br>
<span
style="font-size:10.0pt;font-family:Monospace;background:silver;">./configure
--host=i686-w64-mingw32
--prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
--disable-shared
--enable-static</span></font><br>
<br>
So far so good. '<i>configure</i>' correctly detects all
dependencies and '<i>make</i>' starts compiling stuff in the '<i>src</i>'-directory.
Until:<br>
<br>
</font>
<div
style="font-size:10.0pt;font-family:Monospace;background:silver;">Generating
cairo.def<br>
<stdin>:47:1: <font color="#ff0000">error:</font>
unterminated comment<br>
make[3]: *** [Makefile:3083: cairo.def] Error 1<br>
make[3]: Leaving directory
'/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/win32/cairo-1.14.10/src'<br>
</div>
<font size="-1"><br>
<span
style="font-size:10.0pt;font-family:Monospace;background:silver;">Makefile:3083:
cairo.def</span> is exactly the same as line 66-77 of <a
href="https://cgit.freedesktop.org/cairo/tree/src/Makefile.am"><a class="moz-txt-link-freetext" href="https://cgit.freedesktop.org/cairo/tree/src/Makefile.am">https://cgit.freedesktop.org/cairo/tree/src/Makefile.am</a></a>.<br>
After removing the @ starting at line 68 and running the script
again it returned:<br>
<br>
</font>
<div
style="font-size:10.0pt;font-family:Monospace;background:silver;">Generating
cairo.def<br>
(echo EXPORTS; \<br>
(cd .; cat cairo.h cairo-deprecated.h
cairo-win32.h cairo-script.h cairo-ft.h cairo-ps.h
cairo-pdf.h cairo-svg.h || echo 'cairo_ERROR ()' ) | \<br>
/usr/bin/grep -E -v '^# *include' | \<br>
( cat cairo-features.h - | i686-w64-mingw32-gcc -E -D__cplusplus -
|| echo 'cairo_ERROR ()' ) | \<br>
/usr/bin/grep -E '^cairo_.* \(' | \<br>
sed -e 's/[ ].*//' | \<br>
sort; \<br>
echo LIBRARY libcairo-2.dll; \<br>
) >cairo.def<br>
<stdin>:47:1: <font color="#ff0000">error:</font>
unterminated comment</div>
<font size="-1"><br>
I'm still relatively new to all this, but what I don't understand
is the notion of "libcairo-2.dll" when I'm trying to create a
static library.<br>
But anyway, does anyone have a clue on what's going on here?<br>
<br>
-- Reino<br>
</font>
</body>
</html>