freetype
[Top][All Lists]
Advanced

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

Re: [ft] freetype build failing when flow-tools is present


From: Ryan Schmidt
Subject: Re: [ft] freetype build failing when flow-tools is present
Date: Sun, 29 Mar 2009 04:51:57 -0500

On Mar 22, 2009, at 08:10, Werner LEMBERG wrote:

Any clues why freetype is failing to build.

No.

ftstream.h:488:

error: syntax error before 'FT_Stream_ReadFields'

The point of failure is completely mysterious. [snip]

Note this is not the first error encountered. It is the first error displayed by MacPorts, because MacPorts only shows the last 30-40 lines or so of the build command's output. The complete output is available here:

http://trac.macports.org/attachment/ticket/18232/freetype_fail.txt

The first error, which occurs almost immediately after running make, is:

/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_print_f reetype/work/freetype-2.3.9/include/freetype/fttypes.h:172: error: syntax error before 'FT_Tag'


Line 172 of include/freetype/fttypes.h reads:


  typedef FT_UInt32  FT_Tag;



On Mar 22, 2009, at 16:41, Werner LEMBERG wrote:

In case the problem can be identified, please report it here also for
reference.

We figured it out.

For the long story, read the ticket:

http://trac.macports.org/ticket/18232

The short version is that MacPorts adds some variables to the environment, including:

CPPFLAGS=-I${prefix}/include
LDFLAGS=-L${prefix}/lib

This is to help ports link with other libraries they may need that were also installed with MacPorts.

We found that the error of this thread occurs when a user previously installs another port called flow-tools, which provides a file $ {prefix}/include/ftconfig.h. This is not FreeType's configuration but FlowTools' configuration. But FreeType is still finding this file and trying to use it, which of course doesn't contain any of FreeType's definitions like FT_UInt32 so everything fails.

So, is there a way that we can have FreeType look for its ftconfig.h in the build directory anyway and not look to a possibly wrong one in the directory given in CPPFLAGS? The failing compile line is:


libtool: compile: /usr/bin/gcc-4.0 -I/opt/local/include -I/opt/local/ var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_print_f reetype/work/freetype-2.3.9/objs -I./builds/unix -I/opt/local/var/ macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_print_f reetype/work/freetype-2.3.9/include -c -O2 - DFT_CONFIG_OPTION_SYSTEM_ZLIB -DDARWIN_NO_CARBON "- DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY "- DFT_CONFIG_MODULES_H=<ftmodule.h>" builds/unix/ftsystem.c -fno- common -DPIC -o /opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_print_f reetype/work/freetype-2.3.9/objs/.libs/ftsystem.o


I see -I/opt/local/include is first, hence that's where ftconfig.h is found first. Perhaps that should be the last -I that's listed, instead of the first?






reply via email to

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