ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Problems installing the Fontconfig package


From: Stuart Hughes
Subject: Re: [Ltib] Problems installing the Fontconfig package
Date: Sun, 07 Aug 2011 16:02:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

Hi Douglas,

I've checked in an update to fontconfig.spec into CVS.  It should be
okay out of the box now.

Regards, Stuart

On 04/08/11 08:58, Stuart Hughes wrote:
> Hi Douglas,
> 
> Glad it's fixed.  When I get some time, I'll update the fontconfig.spec
> file as I think this change won't cause any regressions and will help
> those with environments that could pick up the wrong freetype.
> 
> Regards, Stuart
> 
> On 03/08/11 21:16, Douglas Peterson wrote:
>> I found the problem!
>>
>> Check this snippet out from the link command line (seen below)
>>
>> -Wl,/home/build/ltib/rootfs/usr”/lib
>>
>> Notice that odd quotation mark?
>>
>> It turns out that somewhere in my copying and pasting, some weird
>> quotation marks ended up in the fontconfig.spec file. It is still
>> necessary to add the line:
>>
>> --with-freetype-config="$DEV_IMAGE/usr/bin/freetype-config
>> --prefix=$DEV_IMAGE/usr"
>>
>> Into it, but you have to use the correct quotation marks!!
>>
>> The include path injection was not necessary.
>>
>> Thank you all for your patience,
>> Douglas
>>
>>
>>
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden On Behalf
>> Of Douglas Peterson
>> Sent: Wednesday, August 03, 2011 1:03 PM
>> To: address@hidden
>> Subject: Re: [Ltib] Problems installing the Fontconfig package
>>
>> I've managed to coerce the correct include path into the build process
>> by further altering "ltib/dist/lfs-5.1/fontconfig/fontconfig.spec" so
>> that the %build section looks like this:
>>
>> %Build
>> # we don't have docbook-utils in the distribution
>> ac_cv_prog_HASDOCBOOK=no \
>> ac_cv_prog_CC_FOR_BUILD="${BUILDCC} -I$DEV_IMAGE/usr/include/freetype2" \
>> ac_cv_prog_CC="gcc -I$DEV_IMAGE/usr/include/freetype2" \
>> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
>>              --with-arch=$GNUTARCH --sysconfdir=%{_sysconfdir} \
>>             
>> --with-freetype-config=”$DEV_IMAGE/usr/bin/freetype-config
>> --prefix=$DEV_IMAGE/usr”
>> make
>>
>> I have no idea whether or not that's the correct way to do this.
>> However, compilation succeeds and linking fails:
>>
>> gcc -I/home/build/ltib/rootfs/usr/include/freetype2 -g -O2 -o
>> .libs/fc-cache fc-cache.o  -L/home/build/ltib/rootfs/usr/lib -lxml2
>> ../src/.libs/libfontconfig.so -Wl,--rpath
>> -Wl,/home/build/ltib/rootfs/usr”/lib
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Init_FreeType'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Get_Sfnt_Name'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Load_Glyph'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Done_Face'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Get_Char_Index'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Get_Sfnt_Table'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Select_Charmap'
>> ../src/.libs/libfontconfig.so: undefined reference to
>> `FT_Load_Sfnt_Table'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Done_FreeType'
>> ../src/.libs/libfontconfig.so: undefined reference to
>> `FT_Get_Sfnt_Name_Count'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_Get_First_Char'
>> ../src/.libs/libfontconfig.so: undefined reference to `FT_New_Face'
>> collect2: ld returned 1 exit status
>>
>>
>> I've got a separate linking issue that looks just like this, though
>> it's not part of the LTIB build. Since I'm stuck there, I'm just as
>> stuck moving this LTIB build along.
>>
>> Douglas
>>
>>
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden On Behalf
>> Of Douglas Peterson
>> Sent: Wednesday, August 03, 2011 12:32 PM
>> To: address@hidden
>> Subject: Re: [Ltib] Problems installing the Fontconfig package
>>
>> I managed to download from Bitshrine. So I started with
>>
>> sudo rm -rf ltib
>> cvs ...
>>
>> To make sure I was clean. I selected Freescale MPC837xE MDS
>> development board (config/platform/mpc837xemds), Kernel 2.6.23-1. I
>> added the Cairo and Boost packages.
>>
>> VERSION          : 10.1.1
>> CVS_VERSION      : $Revision: 1.75 $ (Savannah)
>> PLATFORM         : mpc837xemds
>> GNUTARCH         : powerpc
>> TOOLCHAIN        : tc-fsl-x86lnx-e300c3-4.1.78-1.i386.rpm
>> TOOLCHAIN_CFLAGS : -mcpu=e300c3
>>
>> I let it build until it error'd out on
>>
>> configure: error: Cairo requires at least one font backend.
>>           Please install freetype and fontconfig, then try again:
>>           http://freetype.org/    http://fontconfig.org/
>>
>> Selecting Cairo auto-selected both Fontconfig and Freetype, so that's
>> a build order issue. No problem:
>>
>> ./ltib -p freetype
>>
>> Success
>>
>> ./ltib -p fontconfig
>>
>> Failure:
>> checking for LIBXML2... configure: error: Package requirements
>> (libxml-2.0>= 2.6) were not met:
>> No package 'libxml-2.0' found
>>
>> That's odd, since I know the host's LIBXML2 is good, maybe that
>> package must be installed?
>>
>> ./ltib -p libxml2
>>
>> Success
>>
>> ./ltib -p fontconfig
>>
>> Failure:
>> /usr/lib/i386-linux-gnu/libfreetype.so: could not read symbols: File
>> in wrong format
>>
>>
>> So we're back here again. Let's try the solution proposed (far) below.
>>
>> I added
>>   --with-freetype-config=”$DEV_IMAGE/usr/bin/freetype-config
>> –-prefix=$DEV_IMAGE/usr”
>>
>> to the ./configure line found in
>> "ltib/dist/lfs-5.1/fontconfig/fontconfig.spec" as suggested by frogman
>> (http://forums.freescale.com/t5/i-MX-Microprocessors/Ltib-link-error-with-fontconfig-on-Ubuntu-host/m-p/80853/highlight/false#M3409).
>>
>>
>> ./ltib -p fontconfig
>>
>> Failure:
>> In file included from ../fontconfig/fcfreetype.h:27:0,
>>                   from ../src/fcint.h:50,
>>                   from fc-case.c:25:
>> /usr/include/ft2build.h:56:38: fatal error:
>> freetype/config/ftheader.h: No such file or directory
>>
>>
>> Same errors I was getting before. So the problem is with that
>> particular toolchain?
>>
>> Douglas
>>
>>
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden On Behalf
>> Of Douglas Peterson
>> Sent: Wednesday, August 03, 2011 10:05 AM
>> To: Stuart Hughes
>> Cc: address@hidden
>> Subject: Re: [Ltib] Problems installing the Fontconfig package
>>
>> Also the Kernel being targeted is linux-2.6.29.6.
>>
>> Though I cannot, for the life of me, figure out how defconfig,
>> defconfig.dev, and main.lkc (in this custom platform) specify which
>> kernel package gets downloaded by LTIB (linux-2.6.29.6.tar.bz2 in this
>> case).
>>
>> Douglas
>>
>>
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden On Behalf
>> Of Douglas Peterson
>> Sent: Wednesday, August 03, 2011 9:39 AM
>> To: Stuart Hughes
>> Cc: address@hidden
>> Subject: Re: [Ltib] Problems installing the Fontconfig package
>>
>> Host is Ubuntu 11.04.
>> Target is custom (MPC8308).
>>
>> Based on running
>> grep -r --include=defconfig* 'tc-fsl-x86lnx-e300c3-4.1.78-1.i386.rpm' ./
>> from the ~/ltib/config/platform directory, there are two platforms in
>> the CVS distribution that use the same toolchain:
>>
>> Freescale MPC837xE MDS development board (config/platform/mpc837xemds)
>> Freescale MPC512x based boards (config/platform/mpc5121ads)
>>
>> I've been trying to build one of them, but can't seem to download
>> files today
>> "Testing network connectivity for gpp
>> No network download connection available"
>>
>> I think only the U-Boot files are different (needing to be
>> downloaded), but am not sure as I can't get past the first.
>>
>> Can someone who already has one of those platforms fully downloaded
>> confirm that Fontconfig builds? And while you're at it can you check
>> Boost and Cairo (Cairo being the reason I need Fontconfig)?
>>
>> Thank you,
>> Douglas
>>
>>
>>
>>
>> From: Stuart Hughes [mailto:address@hidden
>> Sent: Wednesday, August 03, 2011 12:58 AM
>> To: Douglas Peterson
>> Cc: address@hidden
>> Subject: Re: [Ltib] Problems installing the Fontconfig package
>>
>> Hi Douglas,
>>
>> Sorry I've not been able to reply so far, I have almost no time these
>> days.
>>
>> Going back to the start, this is package is known to build out of the
>> box using LTIB from the current Savannah.  I just tried for an imx27
>> target on an Ubuntu 10.10 host.
>> • What host are you building on?
>> • What target are you building for?
>> Can you got back to a vanilla LTIB (no changes) and then:
>> • Make sure your rootfs contains no .la files (do a find rootfs -name
>> \*.la)
>> • re-try the build and post the error output
>> Regards, Stuart
>>  
>> On 03/08/11 01:36, Douglas Peterson wrote:
>> I think I've gotten a little bit further on this problem.
>>
>> Fontconfig seems to be made up of several sub-directories:
>>
>> fc-case
>> fc-lang
>> fc-glyphname
>> fc-arch
>> src
>>
>>
>> The original fontconfig.spec file originally contained the following
>> %build section:
>>
>> %Build
>> # we don't have docbook-utils in the distribution
>> ac_cv_prog_HASDOCBOOK=no \
>> ac_cv_prog_CC_FOR_BUILD="${BUILDCC}" \
>> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
>>              --with-arch=$GNUTARCH --sysconfdir=%{_sysconfdir}
>> make
>>
>> I first altered it to add the --with-freetype-config and --prefix like
>> so:
>>
>> %Build
>> # we don't have docbook-utils in the distribution
>> ac_cv_prog_HASDOCBOOK=no \
>> ac_cv_prog_CC_FOR_BUILD="${BUILDCC}" \
>> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
>>              --with-arch=$GNUTARCH --sysconfdir=%{_sysconfdir} \
>>             
>> --with-freetype-config=”$DEV_IMAGE/usr/bin/freetype-config
>> --prefix=$DEV_IMAGE/usr”
>> make
>>
>> Then I altered it to force the -I switch on ac_cv_prog_CC_FOR_BUILD
>> like so:
>>
>> %Build
>> # we don't have docbook-utils in the distribution
>> ac_cv_prog_HASDOCBOOK=no \
>> ac_cv_prog_CC_FOR_BUILD="${BUILDCC} -I$DEV_IMAGE/usr/include/freetype2
>> -I$DEV_IMAGE/usr/include" \
>> ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
>>              --with-arch=$GNUTARCH --sysconfdir=%{_sysconfdir} \
>>             
>> --with-freetype-config=”$DEV_IMAGE/usr/bin/freetype-config
>> --prefix=$DEV_IMAGE/usr”
>> make
>>
>>
>> This seems to produce a partial success. The subdirectories (fc-case,
>> fc-lang, fc-glyphname, fc-dist) each compile, but when it gets to src,
>> it switches tools. The compiler executed for the fc-XXX is
>>
>> ccache /usr/bin/gcc
>>
>> For src it becomes
>>
>> /bin/bash ../libtool --tag=CC --mode=compile gcc
>>
>> So how do I get this 'libtool' to add some include directories?
>>
>> Douglas
>>
>>
>>
>>
>> On 28/07/11 19:17, Douglas Peterson wrote:
>> First I encountered the error that the Freetype package was not
>> installed. According to Stuart Hughes
>> (http://lists.gnu.org/archive/html/ltib/2010-12/msg00127.html) this is
>> because the "package checks" leak out to the host. The solution was to
>> install libfreetype6-dev on the host.
>>
>> Then I encounted this error: libfreetype.so: could not read symbols:
>> File in wrong format.
>>
>> I added
>>   --with-freetype-config=”$DEV_IMAGE/usr/bin/freetype-config
>> –prefix=$DEV_IMAGE/usr”
>>
>> to the ./configure line found in
>> "ltib/dist/lfs-5.1/fontconfig/fontconfig.spec" as suggested by frogman
>> (http://forums.freescale.com/t5/i-MX-Microprocessors/Ltib-link-error-with-fontconfig-on-Ubuntu-host/m-p/80853/highlight/false#M3409).
>>
>>
>> Now I have the error: freetype/config/ftheader.h: No such file or
>> directory.
>>
>> Looking closely at the error message:
>>
>> + make
>> make  all-recursive
>> make[1]: Entering directory `/home/build/ltib/rpm/BUILD/fontconfig-2.4.2'
>> Making all in fontconfig
>> make[2]: Entering directory
>> `/home/build/ltib/rpm/BUILD/fontconfig-2.4.2/fontconfig'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory
>> `/home/build/ltib/rpm/BUILD/fontconfig-2.4.2/fontconfig'
>> Making all in fc-case
>> make[2]: Entering directory
>> `/home/build/ltib/rpm/BUILD/fontconfig-2.4.2/fc-case'
>> make  all-am
>> make[3]: Entering directory
>> `/home/build/ltib/rpm/BUILD/fontconfig-2.4.2/fc-case'
>> if ccache /usr/bin/gcc -B/usr/bin// -DHAVE_CONFIG_H -I. -I. -I..
>> -I../src -I.. -I/home/build/ltib/rootfs/usr/include/freetype2
>> -I/home/build/ltib/rootfs/usr/include -Wall -Wpointer-arith
>> -Wstrict-prototypes     -Wmissing-prototypes
>> -Wmissing-declarations     -Wnested-externs -fno-strict-aliasing    -g
>> -O2 -MT fc-case.o -MD -MP -MF ".deps/fc-case.Tpo" -c -o fc-case.o
>> fc-case.c; \
>>     then mv -f ".deps/fc-case.Tpo" ".deps/fc-case.Po"; else rm -f
>> ".deps/fc-case.Tpo"; exit 1; fi
>> In file included from ../fontconfig/fcfreetype.h:27:0,
>>                   from ../src/fcint.h:50,
>>                   from fc-case.c:25:
>> /usr/include/ft2build.h:56:38: fatal error:
>> freetype/config/ftheader.h: No such file or directory
>>
>>
>> You can see in the compiler command-line that
>> -I/home/build/ltib/rootfs/usr/include/freetype2 is added and from that
>> directory freetype/config/ftheader.h does exist.
>>
>> I have deleted the ltib/rpm/BUILD/fontconfig-2.4.2 directory prior to
>> compiling each time I try to build it.
>>
>> I don't know where to go from here to fix this.
>>
>> Douglas
> 
> 
> _______________________________________________
> LTIB home page: http://ltib.org
> 
> Ltib mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/ltib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]