Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

pango fails -- Symbol not found: _cairo_quartz_font_face_create_for_cgfont #14639

Closed
nickdowell opened this issue Sep 2, 2012 · 10 comments
Closed
Labels

Comments

@nickdowell
Copy link

Pango library built by homebrew cannot be used by any application due to a runtime linking error.

$ brew test pango
Testing pango
==> /usr/local/Cellar/pango/1.30.1/bin/pango-view -t test-image --waterfall --rotate=10 --annotate=1 --header -q -o output.png
dyld: lazy symbol binding failed: Symbol not found: _cairo_quartz_font_face_create_for_cgfont
  Referenced from: /usr/local/Cellar/pango/1.30.1/lib/libpangocairo-1.0.0.dylib
  Expected in: flat namespace

dyld: Symbol not found: _cairo_quartz_font_face_create_for_cgfont
  Referenced from: /usr/local/Cellar/pango/1.30.1/lib/libpangocairo-1.0.0.dylib
  Expected in: flat namespace

Error: pango: failed

System configuration:

$ brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 05db03fddc059f6e61663fff20b9c129a4db64bf
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.1-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: 2.7.3 in /opt/X11
System Ruby: 1.8.7-358
Which Perl:   /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby:   /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Full installation log:

$ brew install pango
==> Installing pango dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.27.1.mountainlion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.27.1.mountainlion.bottle.tar.gz
/usr/local/Cellar/pkg-config/0.27.1: 9 files, 624K
==> Installing pango dependency: xz
==> Downloading http://tukaani.org/xz/xz-5.0.4.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/xz/5.0.4
==> make install
/usr/local/Cellar/xz/5.0.4: 56 files, 1.5M, built in 29 seconds
==> Installing pango dependency: gettext
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.18.1.1.mountainlion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.18.1.1.mountainlion.bottle.tar.gz
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

OS X provides the BSD gettext library and some software gets confused if both are in the library path.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/gettext/lib
    CPPFLAGS: -I/usr/local/opt/gettext/include

==> Summary
/usr/local/Cellar/gettext/0.18.1.1: 366 files, 12M
==> Installing pango dependency: libffi
==> Downloading http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.11.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libffi/3.0.11
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libffi/lib

==> Summary
/usr/local/Cellar/libffi/3.0.11: 13 files, 276K, built in 15 seconds
==> Installing pango dependency: glib
==> Downloading ftp://ftp.gnome.org/pub/gnome/sources/glib/2.32/glib-2.32.4.tar.xz
######################################################################## 100.0%
######################################################################## 100.0%==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
patching file glib/gunicollate.c
patching file glib/gtimezone.c
patching file aclocal.m4
Hunk #1 succeeded at 1512 (offset 2 lines).
patching file config.h.in
Hunk #1 succeeded at 762 (offset 5 lines).
patching file configure
Hunk #1 succeeded at 683 (offset 20 lines).
Hunk #2 succeeded at 27568 (offset 19 lines).
patching file configure.ac
Hunk #1 succeeded at 2561 (offset 5 lines).
patching file gio/gdbusprivate.c
Hunk #1 succeeded at 2094 (offset 41 lines).
Hunk #2 succeeded at 2104 (offset 41 lines).
patching file gio/xdgmime/xdgmime.c
==> ./configure --disable-maintainer-mode --disable-dtrace --prefix=/usr/local/Cellar/glib/2.32.4 --localstatedir=/usr/local/var
==> make
==> make install
/usr/local/Cellar/glib/2.32.4: 417 files, 15M, built in 2.9 minutes
==> Installing pango dependency: freetype
==> Downloading http://downloads.sf.net/project/freetype/freetype2/2.4.10/freetype-2.4.10.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/freetype/2.4.10
==> make install
/usr/local/Cellar/freetype/2.4.10: 56 files, 2.4M, built in 20 seconds
==> Installing pango dependency: fontconfig
==> Downloading http://fontconfig.org/release/fontconfig-2.10.1.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/fontconfig/2.10.1
==> make install
/usr/local/Cellar/fontconfig/2.10.1: 448 files, 5.4M, built in 40 seconds
==> Installing pango dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.5.12.mountainlion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libpng-1.5.12.mountainlion.bottle.tar.gz
/usr/local/Cellar/libpng/1.5.12: 14 files, 1.0M
==> Installing pango dependency: pixman
==> Downloading http://cairographics.org/releases/pixman-0.26.2.tar.gz
######################################################################## 100.0%
==> ./configure --disable-gtk --prefix=/usr/local/Cellar/pixman/0.26.2 --disable-mmx
==> make install
/usr/local/Cellar/pixman/0.26.2: 10 files, 1.1M, built in 29 seconds
==> Installing pango dependency: cairo
==> Downloading http://cairographics.org/releases/cairo-1.12.2.tar.xz
######################################################################## 100.0%
==> Patching
patching file configure
==> ./configure --prefix=/usr/local/Cellar/cairo/1.12.2 --with-x
==> make install
/usr/local/Cellar/cairo/1.12.2: 104 files, 6.8M, built in 2.3 minutes
==> Installing pango
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.1.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/pango/1.30.1 --enable-man --with-html-dir=/usr/local/Cellar/pango/1.30.1/share/doc --disable-introspection --with-x
==> make
==> make install
/usr/local/Cellar/pango/1.30.1: 132 files, 4.0M, built in 42 seconds
@wfrisby
Copy link

wfrisby commented Sep 2, 2012

I have the same error with 10.8.1.

My brew config file:

HOMEBREW_VERSION: 0.9.3
HEAD: f3f30340d78a43ea3e36f99e031a7c18efcb2e71
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.1-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: 2.7.3 in /opt/X11
System Ruby: 1.8.7-358
Which Perl:   /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Which Ruby:   /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

@johncharrell
Copy link

Same issue here...

HOMEBREW_VERSION: 0.9.3
HEAD: dbc9523d300609841bb1537206945a3e36fdafce
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.8.1-x86_64
Xcode: 4.4.1
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: 2.7.3 in /opt/X11
System Ruby: 1.8.7-358
Which Perl:   /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Which Ruby:   /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

@2bits
Copy link
Contributor

2bits commented Sep 3, 2012

@mxcl pango when built with superenv links against the wrong cairo

@ everyone else, brew install --env=std pango will fix this issue.
(The test needs to be rewritten because of how pango-view doesn't like the -q option anymore.)

@johncharrell
Copy link

I am not sure if this is pango or not... After installing pango with --env=std I was able to finally open gnuradio-companion, but no text was visible. Should I be looking at pango or another package?

@mxcl
Copy link
Contributor

mxcl commented Sep 3, 2012

What's "the wrong cairo"? The X11 cairo or the wrong keg?

@mxcl
Copy link
Contributor

mxcl commented Sep 3, 2012

Need output from: otool -L /usr/local/Cellar/pango/1.30.1/lib/libpangocairo-1.0.0.dylib

And ls /usr/local/Cellar/cairo

And ls -la /usr/local/opt/cairo

@nickdowell
Copy link
Author

$ otool -L /usr/local/Cellar/pango/1.30.1/lib/libpangocairo-1.0.0.dylib
/usr/local/Cellar/pango/1.30.1/lib/libpangocairo-1.0.0.dylib:
    /usr/local/lib/libpangocairo-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 45.0.0)
    /usr/local/Cellar/pango/1.30.1/lib/libpango-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)
    /opt/X11/lib/libcairo.2.dylib (compatibility version 11203.0.0, current version 11203.2.0)
    /usr/local/Cellar/pango/1.30.1/lib/libpangoft2-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)
    /usr/local/lib/libgobject-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/lib/libgmodule-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/lib/libglib-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /opt/X11/lib/libfreetype.6.dylib (compatibility version 15.0.0, current version 15.1.0)
    /opt/X11/lib/libfontconfig.1.dylib (compatibility version 7.0.0, current version 7.0.0)
    /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 275.14.0)

$ ls /usr/local/Cellar/cairo
1.12.2

$ ls -la /usr/local/opt/cairo
lrwxr-xr-x  1 nick  admin  22  2 Sep 14:03 /usr/local/opt/cairo -> ../Cellar/cairo/1.12.2

@mxcl
Copy link
Contributor

mxcl commented Sep 3, 2012

Cannot reproduce:

$ otool -L opt/pango/lib/libpangocairo-1.0.dylib 
opt/pango/lib/libpangocairo-1.0.dylib:
    /usr/local/lib/libpangocairo-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 45.0.0)
    /usr/local/Cellar/pango/1.30.1/lib/libpango-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)

    /usr/local/lib/libcairo.2.dylib (compatibility version 11203.0.0, current version 11203.2.0)

    /usr/local/Cellar/pango/1.30.1/lib/libpangoft2-1.0.0.dylib (compatibility version 3001.0.0, current version 3001.1.0)
    /usr/local/lib/libgobject-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/lib/libgmodule-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/lib/libglib-2.0.0.dylib (compatibility version 3201.0.0, current version 3201.4.0)
    /usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /usr/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
    /usr/local/lib/libfontconfig.1.dylib (compatibility version 8.0.0, current version 8.2.0)
    /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 275.14.0)

And yes, I have XQuartz installed.

If someone with the problem could recompile pango like so: HOMEBREW_LOG=1 brew install pango -v and then gist ~/Library/Logs/Homebrew/cc.log. Then we can try to understand why and how the X11 paths are getting ahead of the homebrew paths.

Notably this would always happen with std-env when not installed to /usr/local. Superenv attempts to prevent this kind of thing. Not sure how it is failing, I just reviewed the code and it's very careful. Only thing I can think of is cairo's pc file is introducing another link path into the mix and superenv is failing to remove it again.

@2bits
Copy link
Contributor

2bits commented Sep 3, 2012

@mxcl
Copy link
Contributor

mxcl commented Sep 3, 2012

Thanks, easy fix coming up.

@mxcl mxcl closed this as completed in 330a623 Sep 3, 2012
Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 11, 2012
Amateur mistake where I forgot that the system library path is read AFTER the -L library path, so /usr/local/lib was after /opt/X11/lib and the wrong cairo was used.

This only affects CLT /usr/local installs with XQuartz installed.

Fixes Homebrew#14639.
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
Amateur mistake where I forgot that the system library path is read AFTER the -L library path, so /usr/local/lib was after /opt/X11/lib and the wrong cairo was used.

This only affects CLT /usr/local installs with XQuartz installed.

Fixes Homebrew#14639.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants