Bug 43917 - pango requires that freetype build before cairo
Summary: pango requires that freetype build before cairo
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-17 18:19 UTC by James
Modified: 2011-12-21 22:25 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James 2011-12-17 18:19:11 UTC
Hello All,

On MacOS 10.6.8, with very little installed, I have the symptom at the bottom of this post, in pango.  I think that the relevant like is the error about cairo-ft.h being missing.  From reading on the internet, I think -ft means freetype.  Freetype is not yet built at the point where all of this fails.

My best guess about what's required is that cairo needs to depend on freetype, so that freetype is available, and the cairo configure will export cairo-ft.

I have not yet worked out how to instruct the build system to do this.  I am open to either advice about the build system, or a competent person to just fix it.

Regards,
James.

============

  CC     libpangocairo_1_0_la-pangocairo-fcfont.lo
/bin/sh ../libtool --silent --tag=CC   --mode=compile /Users/jamescone/buildTrees/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Pango\" -DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE -DSYSCONFDIR=\"/Users/jamescone/buildTrees/libreOffice/core/pango/./unxmacxi.pro/misc/etc\" -DLIBDIR=\"/Users/jamescone/buildTrees/libreOffice/core/pango/./unxmacxi.pro/misc/lib\" -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc/external/glib-2.0  -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc/cairo -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -xobjective-c -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc/external -I/Users/jamescone/buildTrees/libreOffice/core/solver/unxmacxi.pro/inc/external/glib-2.0 -Wall -c -o libpangocairo_1_0_la-pangocairo-fcfont.lo `test -f 'pangocairo-fcfont.c' || echo './'`pangocairo-fcfont.c
pangocairo-fcfont.c:24:22: error: cairo-ft.h: No such file or directory
pangocairo-fcfont.c: In function 'pango_cairo_fc_font_create_font_face':
pangocairo-fcfont.c:63: warning: implicit declaration of function 'cairo_ft_font_face_create_for_pattern'
pangocairo-fcfont.c:63: warning: return makes pointer from integer without a cast
pangocairo-fcfont.c: In function 'pango_cairo_fc_font_lock_face':
pangocairo-fcfont.c:122: warning: implicit declaration of function 'cairo_ft_scaled_font_lock_face'
pangocairo-fcfont.c:122: warning: return makes pointer from integer without a cast
pangocairo-fcfont.c: In function 'pango_cairo_fc_font_unlock_face':
pangocairo-fcfont.c:134: warning: implicit declaration of function 'cairo_ft_scaled_font_unlock_face'
make[4]: *** [libpangocairo_1_0_la-pangocairo-fcfont.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Comment 1 James 2011-12-18 00:26:57 UTC
I cannot see how it is implemented, so I am not very confident, but this may be the required change:

$ (cd core/cairo; git diff)
diff --git a/cairo/prj/build.lst b/cairo/prj/build.lst
index 5827e76..4d93203 100644
--- a/cairo/prj/build.lst
+++ b/cairo/prj/build.lst
@@ -1,4 +1,4 @@
-lcairo cairo   : ZLIB:zlib libpng soltools NULL
+lcairo cairo   : ZLIB:zlib libpng soltools freetype NULL
 lcairo cairo                       usr1        -       all     lcairo_mkout NUL
 lcairo cairo\pixman                nmake       -       all     lcairo_pixman NU
 lcairo cairo\cairo                 nmake       -       all     lcairo_cairo lca

<snip>
Comment 2 James 2011-12-18 11:40:09 UTC
No, it's not that simple.

freetype is failing to build, because it hasn't done a download:

dmake:  Error: -- `./unxmacxi.pro/misc/dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.unpack' not found, and can't be made

and there seems to be a system freetype:

$ man -k freetype
FcFreeTypeCharIndex(3)   - map Unicode to glyph id
FcFreeTypeCharSet(3)     - compute unicode coverage
FcFreeTypeCharSetAndSpacing(3) - compute unicode coverage and spacing type
FcFreeTypeQuery(3)       - compute pattern from font file (and index)
FcFreeTypeQueryFace(3)   - compute pattern from FT_Face
Xft(3)                   - X FreeType interface library
$

which we probably should be using instead.
Comment 3 James 2011-12-19 01:45:48 UTC
Nope; I think it's still getting worse.

My best guess is that MacOS libreoffice is in the middle of transitioning from freetype to quartz fonts.  Unfortunately, this passes through cairo and is visible in pango, and the required extensions to pango haven't been written yet.

This is above my pay-grade, and I'm going to move to origin/libreoffice-3-5 and see if I have better luck.
Comment 4 Christian Lohmaier 2011-12-20 04:34:30 UTC
" -I/opt/local/include/freetype2 "

This is not standard Mac OSX / XCode stuff. Thus you got a "polluted" environment with stuff from macports/fink/darwinports/whatever.

Building is only supported with "plain" Mac OSX & XCode (with the exception of the mozilla dependencies and make and unzip for 10.4/XCode 2.5 based systems).

Building against macports/find/whatever is explicitly not supported. However patches are welcome to shield the environment against accidentally using those components.

But an issue against this is pointless (unless you want to provide patches yourself). Thus worksfrome. Feel free to send appropriate patches to the mailinglist/join irc to discuss the topic in greater detail.
Comment 5 James 2011-12-21 22:25:15 UTC
This is a comment for the benefit of the next person with the problem.

The "pollution" requires that there is a system pkg-config and a system freetype.

Pango uses pkg-config to find freetype and assumes, wrongly, that cairo was built with freetype.

There is a patch in the queue, to hide the system pkg-config, if any, from pango, which should make this symptom go away.