Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323351 - media-libs/fontconfig-2.8.0-r1: emerge fails with freetype/config file not found
Summary: media-libs/fontconfig-2.8.0-r1: emerge fails with freetype/config file not found
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 18:53 UTC by Hal Engel
Modified: 2010-06-24 15:23 UTC (History)
0 users

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


Attachments
build log (media-libs:fontconfig-2.8.0-r1:20100609-184523.log,213.47 KB, text/plain)
2010-06-09 18:55 UTC, Hal Engel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hal Engel 2010-06-09 18:53:14 UTC
I am having problems getting fontconfig to emerge. It is failihg with this:

In file included from ../fontconfig/fcfreetype.h:27,
                 from fcftint.h:26,
                 from fcfreetype.c:48:
/usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
In file included from fcftint.h:26,
                 from fcfreetype.c:48:
../fontconfig/fcfreetype.h:28:10: error: #include expects "FILENAME" or <FILENAME>
In file included from fcftint.h:26,
                 from fcfreetype.c:48:


The header file fcfreetype.h is located in /usr/include/freetype2/freetype/config but it appears that the fontconfig build is looking for it in /usr/include/freetype/config and it fails to find it. Is there a workaround to get this to work?

There are lots of things that need fontconfig to build so this is blocking getting things installed on my machine.


Reproducible: Always

Steps to Reproduce:
1. emerge fontconfig
2.
3.



Expected Results:  
It should find the freetype header since freetype is emerged.
Comment 1 Hal Engel 2010-06-09 18:55:46 UTC
Created attachment 234749 [details]
build log
Comment 2 Hal Engel 2010-06-09 18:56:09 UTC
# emerge --info           
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-pps x86_64)
=================================================================                                        
System uname: Linux-2.6.32-gentoo-pps-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4800+-with-gentoo-1.12.13
Timestamp of tree: Wed, 09 Jun 2010 17:00:01 +0000                                                             
app-shells/bash:     4.0_p37                                                                                   
dev-java/java-config: 2.1.10                                                                                   
dev-lang/python:     2.6.5-r2, 3.1.2-r3                                                                        
dev-util/cmake:      2.8.1                                                                                     
sys-apps/baselayout: 1.12.13                                                                                   
sys-apps/sandbox:    2.2                                                                                       
sys-devel/autoconf:  2.13, 2.65                                                                                
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1                                                        
sys-devel/binutils:  2.19.1-r1                                                                                 
sys-devel/gcc:       4.4.3-r2                                                                                  
sys-devel/gcc-config: 1.4.1                                                                                    
sys-devel/libtool:   2.2.6b                                                                                    
virtual/os-headers:  2.6.30-r1                                                                                 
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fno-strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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 /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -fno-strict-aliasing"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs --keep-going --load-average=8"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://mirror.espri.arizona.edu/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/pro-audio /usr/portage/local/layman/berkano /usr/portage/local/layman/java-overlay /usr/portage/local/layman/sunrise /usr/portage/local/layman/devnull /usr/portage/local/layman/kde-testing /usr/portage/local/layman/cloos"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi ada alsa amd64 avahi berkdb branding bzip2 cairo caps cdr cli consolekit cracklib crypt cups cxx dbus divx dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif gpm gtk hal htmlhandbook iconv imagemagic joystick jpeg jpeg2k kde lcms ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pango pcre pdf perl pmu png ppds pppd python qt qt3support qt4 readline reflection samba sdl session smp sndfile speex spell spl sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype unicode usb vcd vorbis x264 xcb xcomposite xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ice1724" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Rafał Mużyło 2010-06-11 02:34:42 UTC
> -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include
Care to explain this little bit ?
Comment 4 Hal Engel 2010-06-11 16:54:36 UTC
Interesting!  I had the cross compiler stuff installed to be able to do Windows builds.  I was never able to get it to work so I unmerged it a long time ago.  But looking at this right now I see that there are files for it sitting on my machine.  Specifically

$ locate i686-mingw32                                                                                   
/usr/libexec/gcc/i686-mingw32                                                                                            
/usr/libexec/gcc/i686-mingw32/dlltool                                                                                    
/usr/libexec/gcc/i686-mingw32/dllwrap                                                                                    
/usr/libexec/gcc/i686-mingw32/windres                                                                                    
/usr/local/portage/cross-i686-mingw32                                                                                    
/usr/local/portage/cross-i686-mingw32/binutils                                                                           
/usr/local/portage/cross-i686-mingw32/gcc                                                                                
/usr/local/portage/cross-i686-mingw32/w32api                                                                             
/usr/local/portage/cross-i686-mingw32/mingw-runtime                                                                      
/usr/local/portage/cross-i686-mingw32/gdb                                                                                
/usr/bin/i686-mingw32-dlltool                                                                                            
/usr/bin/i686-mingw32-dllwrap                                                                                            
/usr/bin/i686-mingw32-windres                                                                                            
/usr/bin/i686-mingw32-gcov                                                                                               
/usr/bin/i686-mingw32-gfortran                                                                                           
/var/cache/edb/dep/usr/local/portage/cross-i686-mingw32                                                                  
/var/cache/edb/dep/usr/i686-mingw32                                                                                      
/var/cache/edb/dep/usr/i686-mingw32/usr                                                                                  
/var/cache/edb/dep/usr/i686-mingw32/usr/portage

Notice that /usr/i686-mingw32/ does not exist.  Why would most builds find the correct path but this one fails?

Since crossdev was not currently installed I hand removed these directories.  Now emerge is failing and it appears that it was picking some stuff up in these directories.  Why?  I am now seeing this:

# emerge fontconfig
/usr/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory.

So it appears that this somehow broke the python installation but I am also seeing that gcc is no longer working. I am getting this when I run gcc:

/usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.4/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory

So it appears that my system is badly broken as python and gcc are no longer working which means that portage is now broken.  What do I need to do to clena this up?
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2010-06-11 18:21:19 UTC
(In reply to comment #4)
> # emerge fontconfig
> /usr/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0:
> cannot open shared object file: No such file or directory.

Try to find libpython2.6.so.1.0 on your system. Probably it's just environment you need to fix. But most likely that you need to to fresh reinstall from stage3... For additional help, please ask, on gentoo-user mailing or in forums.
Comment 6 Hal Engel 2010-06-16 22:04:01 UTC
I did a fresh install from stage3 the only thing I kept from the old system was /home since it has it's own partition.  But I am still getting the strange include paths IE.

-I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include

when I try to emerge fontconfig.   I am also getting similar library paths.   So this is not just a problem with the include path.  I have no idea where this is coming from. 

When I look more closely at the files in the root of the build tree I see this:

fontconfig-2.8.0 # grep mingw32 *
Makefile:FREETYPE_CFLAGS = -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include
Makefile:FREETYPE_LIBS = -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz
config.guess:   echo ${UNAME_MACHINE}-pc-mingw32
config.guess:           echo ${UNAME_MACHINE}-mingw32
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12101: gcc -o conftest -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include   conftest.c  -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz >&5
config.log:configure:12111: gcc -c -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include  conftest.c >&5
config.log:configure:12111: gcc -c -g -O2 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include  conftest.c >&5
config.log:FREETYPE_CFLAGS='-I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include'
config.log:FREETYPE_LIBS='-L/usr/i686-mingw32/usr/lib64 -lfreetype -lz'
config.status:S["FREETYPE_CFLAGS"]="-I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include"
config.status:S["FREETYPE_LIBS"]="-L/usr/i686-mingw32/usr/lib64 -lfreetype -lz"
config.sub:     mingw32)
config.sub:             os=-mingw32
config.sub:     mingw32ce)
config.sub:             os=-mingw32ce
config.sub:             os=-mingw32
config.sub:           | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
fontconfig.pc:Libs.private:  -lexpat -L/usr/i686-mingw32/usr/lib64 -lfreetype -lz


This appears to be only affecting the fontconfig build although there could be other builds that would be affected by this.  But I have emerged most of the stuff I use on this machine including xorg and kde4 with no problems so this is not an issue for the vast majority of builds.

This is preventing me from building mozilla-firefox since xulrunner needs fontconfig.
Comment 7 John Klehm 2010-06-24 04:41:58 UTC
(In reply to comment #6)
Check your .bashrc for a line with SYSROOT in it and comment it out.  Then relogin and everything should be fine.

freetype pulls an extra set of cflags using the SYSROOT environment variable.  If you've done crosscompiling it may just not be doing what you want for a system upgrade (if you're here and reading this.... pretty likely not doing what you want)

I figured this out by tracing the cflags through the makefile to freetype-config --cflags and then from the source of that script saw the SYSROOT environment variable... locate SYSROOT showed just one thing... in .bashrc :P

Cheers,
--John
Comment 8 Hal Engel 2010-06-24 15:23:09 UTC
Yes I figured this out a few days ago.  I found this by searching the forums and found that others had run into the same issue with freetype.  It appears that the change to how freetype handles the cflags is relatively new and happened in some fairly recent versions of freetype. 

Since I no longer have crossdev and related stuff installed I have removed all references to SYSROOT and emerges for things that were failing are now working.