<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - cross-compilation failed: configure by default adds native freetype to Makefile instead of --host's one"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106451">106451</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cross-compilation failed: configure by default adds native freetype to Makefile instead of --host's one
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Reporter</th>
<td>feedly.chsk@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>cairo-bugs@cairographics.org
</td>
</tr></table>
<p>
<div>
<pre>cairo 1.14.12 (latest versions' numbers could not be selected (are absent in
list) in bug input form)
Trying to cross-build on Debian 9.4 with its MinGW-w64, and last versions of
libz, libpixman, libpng built and installed (in mingw).
./configure --host=i686-w64-mingw32 --prefix=/usr/local/i686-w64-mingw32
Output fragments:
checking for cairo's FreeType font backend feature...
checking for FREETYPE... no
checking for freetype-config... /usr/bin/freetype-config
checking freetype2 libtool version... 18.3.12 - OK
checking whether cairo's FreeType font backend feature could be enabled... yes
checking for cairo's Fontconfig font backend feature...
checking for FONTCONFIG... no
The following font backends:
User: yes (always builtin)
FreeType: yes
Fontconfig: no (requires fontconfig >= 2.2.95)
Win32: yes
So far configure has found native freetype-config and turn freetype backend on
automatically. There are vars in generated Makefile:
$ grep -i freet Makefile
CAIRO_CFLAGS = -D_REENTRANT -I/usr/local/i686-w64-mingw32/include/pixman-1
-I/usr/local/i686-w64-mingw32/include/libpng16
-I/usr/i686-w64-mingw32/include -Wall -Wextra -Wmissing-declarations
-Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings
-Wsign-compare -Wpacked -Wswitch-enum -Wmissing-format-attribute
-Wvolatile-register-var -Wstrict-aliasing=2 -Winit-self
-Wunsafe-loop-optimizations -Wno-missing-field-initializers
-Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline
-fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2
-Wno-unused-but-set-variable -I/usr/include/freetype2
CAIRO_LIBS = -lpthread -L/usr/local/i686-w64-mingw32/lib -lpixman-1
-L/usr/local/i686-w64-mingw32/lib -L/usr/i686-w64-mingw32/lib -lpng16 -lz
-lgdi32 -lmsimg32 -lz -lz -L/usr/lib/x86_64-linux-gnu -lfreetype
CAIRO_NONPKGCONFIG_CFLAGS = -I/usr/include/freetype2
CAIRO_NONPKGCONFIG_LIBS = -lz -lz -L/usr/lib/x86_64-linux-gnu
-lfreetype
FREETYPE_CFLAGS =
FREETYPE_CONFIG = /usr/bin/freetype-config
FREETYPE_LIBS =
As you can see configure mixes:
1) i686-w64-mingw32 include paths and lib paths of pixman, libpng, libz, etc
with
2) localhost's x86_64-linux-gnu paths of freetype include, lib and
freetype-config.
Next make fails of course:
Generating cairo.def
CCLD libcairo.la
/usr/lib/x86_64-linux-gnu/libfreetype.so: file not recognized: File format not
recognized
collect2: error: ld returned 1 exit status
Appending --enable-ft=no to configure arguments resolves issue through
disabling freetype.
What is expected by me? I expect crossbuilding with default args --host and
--prefix should succeed. If no usable freetype installation found then freetype
part has to be automatically disabled by configure. Warnings are to be printed
at the summary table at the end of configure's console ouput.</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>