Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473534 - app-text/mupdf-1.2 - In file included from pdf/pdf_font.c:4:0: /usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
Summary: app-text/mupdf-1.2 - In file included from pdf/pdf_font.c:4:0: /usr/include/f...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-17 01:30 UTC by Bernardo Costa
Modified: 2013-06-25 19:55 UTC (History)
0 users

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


Attachments
Build log (build.log,10.24 KB, text/plain)
2013-06-17 01:38 UTC, Bernardo Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Costa 2013-06-17 01:30:50 UTC
After needing a @preserved-rebuild due to upgrading to media-libs/openjpeg-1.5.1, mupdf compilation fails with the following message:

In file included from pdf/pdf_font.c:4:0:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory


Reproducible: Always

Steps to Reproduce:
1. emerge -va1 mupdf

Actual Results:  
Compilation error

Expected Results:  
Have the program installed

I searched a bit in the Makefile (and other files) and it turns out that compiling using

make -j4 XCFLAGS="-fpic -I/usr/include/freetype2" XLIBS="-lX11 -lXext"

is sufficient for producing an executable that reads PDFs correctly. The previous command line was just

make -j4 XCFLAGS=-fpic

so first this corrects for the include search path (I don't understand why it fails to do it in Makethird:108)
Comment 1 Bernardo Costa 2013-06-17 01:32:59 UTC
Portage 2.2.0_alpha179 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.9.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.9.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-3720QM_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:    16250588 total,   5018052 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sat, 15 Jun 2013 10:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5, 3.2.5, 3.3.2
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.2
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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="-march=native -O2 -pipe"
DISTDIR="/gentoodistfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ http://gentoo.c3sl.ufpr.br/"
LANG="en_US.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 avx berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gmp gpm iconv ipv6 jpeg lzma mmx mmxext modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 sse3 sse4_1 ssl ssse3 tcpd truetype udev unicode xcb 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 ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau intel" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

app-text/mupdf-1.2 was built with the following:
USE="X (multilib) -vanilla" ABI_X86="64"
Comment 2 Bernardo Costa 2013-06-17 01:38:15 UTC
Created attachment 351162 [details]
Build log
Comment 3 Michael Weber (RETIRED) gentoo-dev 2013-06-23 19:28:47 UTC
Hello,

Makethird lines 50-109 try to compile freetype (makeing the path valid) or use a system one, depending of the presence of thirdparties/freetype/README.

In the latest version (1.9 of the mupdf-1.2.ebuild [1], thirdparties get removed in line 37. The version was committed Jun 12 at 14:30, and your tree timestamp shows "Sat, 15 Jun 2013 10:00:01 +0000", and you sync from rsync.g.o, odd.
Can you please take a look at the directory /usr/portage/app-text/mupdf/mupdf-1.2.ebuild file and verify the CVS header showing revision 1.9.

If not please resync your portage tree (emerge --sync) and test again.

I think the correspondig rsync run wasn't complete.

Michael.

[1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/mupdf/mupdf-1.2.ebuild?view=log
[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/mupdf/ChangeLog?view=log
Comment 4 Bernardo Costa 2013-06-23 19:49:21 UTC
(In reply to Michael Weber from comment #3)
> Hello,
> 
> Makethird lines 50-109 try to compile freetype (makeing the path valid) or
> use a system one, depending of the presence of thirdparties/freetype/README.
> 
> In the latest version (1.9 of the mupdf-1.2.ebuild [1], thirdparties get
> removed in line 37. The version was committed Jun 12 at 14:30, and your tree
> timestamp shows "Sat, 15 Jun 2013 10:00:01 +0000", and you sync from
> rsync.g.o, odd.
> Can you please take a look at the directory
> /usr/portage/app-text/mupdf/mupdf-1.2.ebuild file and verify the CVS header
> showing revision 1.9.

It does show revision 1.9:

# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.2.ebuild,v 1.9 2013/06/12 14:30:19 xmw Exp $

And I also have

"rm -rf thirdparty || die"

in line 37 of mupdf-1.2.ebuild.
Comment 5 Bernardo Costa 2013-06-23 20:20:40 UTC
I found it. Somehow an environment variable messed up being

OS="linux-gnu"

instead of

OS="Linux"

which made the if's in Makerules never happen.

I still have to figure out where this came from, a grep in my $HOME and /root did not show anything setting that variable reliably.

Sorry for the mess.
Comment 6 Michael Weber (RETIRED) gentoo-dev 2013-06-25 19:55:34 UTC
(In reply to Bernardo Costa from comment #5)
> I found it. Somehow an environment variable messed up being
> 
> OS="linux-gnu"

> Sorry for the mess.
No problem, 

is the variable set in the shell environment?
  env | grep ^OS
is it defined in the per ebuild file trees /etc/portage/make.conf,
/etc/portage/env/... or /etc/portage/package.env/...

I assume the output of `uname` on your machine is Linux, right?

Maybe I should replace the ?= in line 3 of Makerules with :=, not sure.