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

Re: need help with an xpdf bug



On Tue, Jan 08, 2002 at 11:27:55PM +1100, Hamish Moffatt wrote:
> 
> Hi bug hunters,
> 
> I need your help with bug #123565 in xpdf. Almost 1 month ago it was
> reported that it wouldn't build. I couldn't reproduce it then,
> but now I can. Bug#124314 mentions this too.
> 
> xpdf fails to compile with an error in one of the libfreetype6-dev
> include files. However that library hasn't changed since November 11,
> and I've build xpdf since then with that version (2.0.5-2).
> 
> It looks like ft_module.h is missing some critical type definitions
> to me. I can't see how it ever worked.
> 
> Any thoughts?

OK, this is probably a bug in libfreetype6-dev.

The problem is that libfreetype6-dev puts headers in
/usr/include/freetype2/freetype when they were intended to go in
/usr/include/freetype. The headers use #include <freetype/foo> to get
each other. libttf-dev includes /usr/include/freetype/ stuff as well,
but presumably at a different version, and gcc is finding the wrong
one.

The command used to compile is this:

c++ -g -O2 -DHAVE_DIRENT_H=1 -DHAVE_REWINDDIR=1 -DHAVE_POPEN=1
-DHAVE_MKSTEMP=1 -DHAVE_X11_XPM_H=1 -DHAVE_T1LIB_H=1
-DHAVE_FREETYPE_FREETYPE_H=1 -DJAPANESE_SUPPORT -DCHINESE_GB_SUPPORT
-DCHINESE_CNS_SUPPORT -DUSE_GZIP -DAPPDEFDIR='"/etc/X11/app-defaults"'
-DFREETYPE2 -I./../goo -I./../ltk -I.  -I/usr/X11R6/include
-I/usr/include -I/usr/include/freetype2
^^^^^^^^^^^^^^
Note this (stupid) parameter
-DSYSTEM_XPDFRC=\"/etc/xpdfrc\" -c FTFont.cc

Eliminating -I/usr/include from this fixes the problem at this
level. I'm not sure how to modify the build system to handle this
offhand, and neither am I sure that it is desireable.

libfreetype6-dev should modify the headers so that they always get the
correct files, IMO. This would be a case of 
s!#include <freetype/!#include <freetype2/freetype/!. I suggest you
reassign the bug. freetype-config cannot handle this, because it does
not prevent earlier -I options from overriding.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ | Dept. of Computing,
 `. `'                          | Imperial College,
   `-             -><-          | London, UK

Attachment: pgpnwPVLIqMr2.pgp
Description: PGP signature


Reply to: