freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Problem building 2.0.8 -- bug and fix(?)


From: Alexios Zavras
Subject: [Devel] Problem building 2.0.8 -- bug and fix(?)
Date: Sat, 16 Feb 2002 11:28:04 +0200
User-agent: Mutt/1.2.5i

[This goes to address@hidden, to which I have not subscribed.
 Due to lack of time, I doubt I can contribute much;
 but I really would like to submit a bug...
 If this is inappropriate, let me know and I'll subscribe before mailing :-)]

Trying to build freetype-2.0.8, after "./configure --prefix=/usr/local"
"make" fails on the first file that attempts to compile.
The output (slightly formatted and paths trimmed), followed by an explanation:
> gcc -pedantic -ansi -c -Wall -O3 -I/usr/local/include
>     address@hidden/builds/unix address@hidden/include
>     @freetype-2.0.8/builds/unix/ftsystem.c  -fPIC -DPIC
>     -o @freetype-2.0.8/objs/ftsystem.o
> In file included from @freetype-2.0.8/include/freetype/ftrender.h:24,
>        from @freetype-2.0.8/include/freetype/internal/ftobjs.h:31,
>        from @freetype-2.0.8/builds/unix/ftsystem.c:26:
> @freetype-2.0.8/include/freetype/ftmodule.h:70: parse error before `module'
> ... [lots of other errors deleted]

The offending line uses "FT_Module" which, at that point is undefined.
It seems that it gets defined in ./include/freetype/freetype.h
but this file is not included at any point before ftmodule.h.

Why ?!?  The file ftmodule.h, in its beginning actually has
> #include FT_FREETYPE_H
Unfortunately, the system had a version of freetype-1.3
installed in /usr/local, from previous times.
Due to the order of -I switches in the compilation command,
the file /usr/local/include/freetype/freetype.h was being included
instead of the correct @/include/freetype/freetype.h.
BTW, the "-I/usr/local/include" in the compilation command
came from the CFLAGS environment variable that "configure" uses.

I consider this a bug, and I can offer two alternative "solutions":
a) change the code to include files through relative pathnames
    (since you really do not want any "freetype.h" but a specific one)
b) [much simpler :-)] specify in the compilation commands
    your preference for include files.
I haven't studied all the makefiles, but it initially seems
that simply changing a single line in ./builds/freetype.mk, from
> FT_CFLAGS  = $(CFLAGS) $(INCLUDE_FLAGS)
to
< FT_CFLAGS  = $(INCLUDE_FLAGS) $(CFLAGS)
does the trick.  At least it worked in my case.

Please consider applying this (or any other equivalent) fix.

That's all -- sorry for the length of this message,
but I was writing it while finding out things...
Take care,
-- 
-- zvr --
--  +---------------------------+       Alexios Zavras (-zvr-)
    | H eytyxia den exei enoxes |       address@hidden
    +-----------------------zvr-+



reply via email to

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