[cairo-bugs] [Bug 106451] New: cross-compilation failed: configure by default adds native freetype to Makefile instead of --host's one

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 9 09:03:55 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=106451

            Bug ID: 106451
           Summary: cross-compilation failed: configure by default adds
                    native freetype to Makefile instead of --host's one
           Product: cairo
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: chris at chris-wilson.co.uk
          Reporter: feedly.chsk at gmail.com
        QA Contact: cairo-bugs at cairographics.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20180509/501c187d/attachment.html>


More information about the cairo-bugs mailing list