directfb on BLFS - Version 6.3

Ken Moffat zarniwhoop at ntlworld.com
Wed Oct 22 09:52:43 PDT 2008


qn Wed, Oct 22, 2008 at 09:33:23PM +0700, David Kuntadi wrote:
> On Wed, Oct 22, 2008 at 8:40 PM, Randy McMurchy
> <randy at linuxfromscratch.org> wrote:
> > You'll need to provide additional information about the error
> > message (what program invokes the error, perhaps additional
> > info from config.log, etc., etc.)
> 
> I am trying to install
> http://www.directfb.org/downloads/Core/DirectFB-1.2.6.tar.gz
> When I try
> 
> ./configure --prefix=/usr/local
> 
> It give me this warning (not an error): FreeType2 support is missing -
> many applications won't work correctly.
> 
> I think that is because FreeType2 is not installed. So, I install
> Freetype2 using below direction:
> 
> http://www.linuxfromscratch.org/blfs/view/stable/general/freetype2.html
> 
> But even after installing freetype2, I still got the same warning (
> FreeType2 support is missing - many applications won't work
> correctly). I suspect DirectFB-1.2.6. check FreeType2 on different
> location then lfs installing it, but I could not figure out where/how
> DirectFB-1.2.6. checking FreeType2 support.
> 
> Now I am not on lfs computer, tomorrow I will check if there is more
> information I could get.
> 
 At the moment I'm in the middle of documenting the dependencies on
my first attempt at updating my desktop scripts for current
versions, and I'm looking at a lot more detail than I ever used to
bother about.  Based on that experience, what you need to do is look
at the configure script.  I'll try and step you through how to go
about diagnosing this.  Some configure scripts are really easy and
straightforward to see what they are looking for, others are a bit
more complex.

 If you don't have the tarball unpacked, you can do this in 'view'
(use the tarball, then at the list of files '/configure' - if that
finds configure.in or configure.ac, hit '/' to repeat-find until
you have it, then 'enter' to view it (and eventually :q twice to
come out).  If you do have it unpacked, still use 'view' to search
through it because it's a little more powerful than 'less'.  No
doubt emacs can also be used, but I don't know the search-forward
and search-backward commands for that.

 Search for the *exact* message, something like
/FreeType2\ support\ is\ missing

 That should put you in a chunk of code reporting it.  A little way
before it, it will either be using pkg-config to find what it needs,
or it will be trying to link to a library (e.g. -lfreetype2 to link
to libfreetype2.so) and perhaps running test programs against the
headers.

 Scripts using pkg-config are often easier, you can see the call and
it will pass one or more names, optionally with a version, such as
'cairo >= 1.6.0 freetype2 fontconfig' - that example is from
firefox-3.0.3.  It means you need cairo.pc freetype2.pc and
fontconfig.pc on your PKG_CONFIG_PATH *and* the Version in cairo.pc
has to be greater than 1.8.0.

 Sometimes configure scripts get "clever" and assign version numbers
or even package names to variables e.g. fubar_REQUIRES.  For those,
you need to search backwards for the variable ('?fubar_REQUIRES=')
until you can find everything it contains.

 Your PKG_CONFIG_PATH starts as /usr/lib/pkgconfig.  If DirectFB is
using pkg-config, and you are building in /usr/local, something like

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

might do the trick, otherwise look at the output of configure -help
to see what you can use to point it to the CFLAGS and LIBS it needs
for freetype2.  Sometimes, you need to know the name of the internal
variable it is using, so that you can work out which CFLAGS and LIBS
to modify - worst case, that variable is listed as 'testing for
FUBAR' just before it begins the tests which generated the warning.

 If this is a package not uing pkg-config, you need to look at the
code fragments in the test programs.  Usually these look for headers
- are those headers being found ?  For /usr/local, you might need to
pass -I/usr/include/somedirectory in the CFLAGS.  Then look at the
library (e.g. -lfreetype2) - for this example, does libfreetype2.so
exist in /usr/lib ?  If it is elsewhere, passing -L/usr/local/lib
(possibly in LDFLAGS) night help.

 The other possibiity is that although you have freetype2, it is
missing some functionality - if you haven't solved it so far, look
at what the test code is doing, e.g. to find *other* .pc files
needed, or to find certain functions in the library.  In this case,
you have to hope that the configure script is commented to say why
it is testing for this - on "friendly" scripts you might even get a
message before the Warning telling you why it can't use a library.

 Good Luck!

ĸen

-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the blfs-support mailing list