Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493718 - dev-python/pillow-2.1.0 fails to build, fatal error: freetype/fterrors.h: No such file or directory
Summary: dev-python/pillow-2.1.0 fails to build, fatal error: freetype/fterrors.h: No ...
Status: RESOLVED DUPLICATE of bug 493548
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-09 06:37 UTC by Andrew Jeffery
Modified: 2013-12-09 15:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for valid header include path for differing freetype versions (file_493718.txt,433 bytes, patch)
2013-12-09 06:37 UTC, Andrew Jeffery
Details | Diff
Patch for valid header include path for differing freetype versions (file_493718.txt,431 bytes, patch)
2013-12-09 06:53 UTC, Andrew Jeffery
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Jeffery 2013-12-09 06:37:05 UTC
Created attachment 364974 [details, diff]
Patch for valid header include path for differing freetype versions

Attempting to set PYTHON_TARGETS="python2_7 python3_3" and upgrading my system, I encountered a the following build failure in dev-python/pillow-2.1.0:

...
building 'PIL._imagingft' extension
x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=native -fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include -I/usr/include/python3.3 -c _imagingft.c -o /var/tmp/portage/dev-python/pillow-2.1.0/work
/Pillow-2.1.0-python3_3/build/temp.linux-x86_64-3.3/_imagingft.o
_imagingft.c:62:31: fatal error: freetype/fterrors.h: No such file or directory
 #include <freetype/fterrors.h>
                               ^
compilation terminated.
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
...

Freetype version:

$ equery list freetype
 * Searching for freetype ...
[IP-] [  ] media-libs/freetype-2.5.1:2

Looking at _imagingft.c it seems some freetype includes are guarded based on the version, as headers may appear in different locations. However, the one on line 62 is not guarded and it looks like this leads to issues when freetype >= 2.1 is installed. Using the user-defined patches, I applied the attached patch and the subsequent emerge succeeded. It's probably not the correct solution, but it is perhaps a direction that could be taken.

emerge --info '=dev-python/pillow-2.1.0::gentoo':

Portage 2.2.7 (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.2, glibc-2.17, 3.12.0+ x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.12.0+-x86_64-Intel-R-_Core-TM-_i7_CPU_L_640_@_2.13GHz-with-gentoo-2.2
KiB Mem:     3841224 total,    314856 free
KiB Swap:    9759480 total,   9418272 free
Timestamp of tree: Sun, 08 Dec 2013 13:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.1-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sunrise zugaina steam-overlay amboar-overlay
Installed sets: @fonts
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.3 AdobeFlash-11.x Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo"
LANG="en_AU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/zugaina /var/lib/layman/steam /home/ajeffery/Gentoo/overlay"
SYNC="rsync://aamor/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cleartype cli colord consolekit corefonts cracklib crypt cscope cups custom-optimization cxx dbus dhclient dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fontconfig fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg lcms libnotify libsecret lzma mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline samba sdl session socialweb spell sqlite sse sse2 ssl startup-notification svg systemd tcpd threads tiff truetype type1 udev udisks unicode upower usb vim-syntax vorbis wifi wxwidgets x264 xcb xinerama xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_AU en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-python/pillow-2.1.0 was built with the following:
USE="jpeg lcms tiff truetype zlib -doc -examples -scanner -tk -webp" PYTHON_TARGETS="python2_7 python3_3 -python2_6 -python3_2"
Comment 1 Andrew Jeffery 2013-12-09 06:53:14 UTC
Created attachment 364980 [details, diff]
Patch for valid header include path for differing freetype versions

Disregard the patch attached to the original report, it contains a copy/paste error that includes freetype.h again rather than fterrors.h in the !2.1 case. Seems no matter how many times I review a post before submitting there's always an issue!
Comment 2 Michael Mair-Keimberger (iamnr3) 2013-12-09 06:57:14 UTC
This seems to be a duplicate of bug 493548.
Did you tried to resync your tree because the fix were just committed a few hours before...?
Comment 3 Andrew Jeffery 2013-12-09 12:30:25 UTC
Agree that it looks like a duplicate - sorry about that. Interestingly, I'm sure bug 493548 didn't turn up in any of my searches prior to filing, which seems odd; I searched for pillow-2.1.0 issues. I did sync my tree before emerging, but this still wasn't current as my portage configuration points to an rsync server internal to my home network, which is synced nightly. My bad on that part, will make sure I grab the latest from an official portage mirror before filing next time.
Comment 4 Rafał Mużyło 2013-12-09 15:03:35 UTC

*** This bug has been marked as a duplicate of bug 493548 ***