krishi has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I am having problems installing freetype-2.3.1 on solaris 9.
When I did ./configure, it showed me the following message:

configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating freetype-config
config.status: creating freetype2.pc
config.status: creating ftconfig.h
make: Nothing to be done for `unix'.

Then I did make, and it showed me the following error:

In file included from builds/unix/ftsystem.c:21: ./builds/unix/ftconfig.h:42:10: #include expects "FILENAME" or <FILENAME>
./builds/unix/ftconfig.h:43:10: #include expects "FILENAME" or <FILENAME>
In file included from builds/unix/ftsystem.c:21: ./builds/unix/ftconfig.h:118: error: syntax error before "typedef"
builds/unix/ftsystem.c:22:10: #include expects "FILENAME" or <FILENAME>
builds/unix/ftsystem.c:23:10: #include expects "FILENAME" or <FILENAME>
builds/unix/ftsystem.c:24:10: #include expects "FILENAME" or <FILENAME>
builds/unix/ftsystem.c:25:10: #include expects "FILENAME" or <FILENAME>
builds/unix/ftsystem.c:26:10: #include expects "FILENAME" or <FILENAME>
/usr/include/sys/machtypes.h:33: error: syntax error before "typedef"
builds/unix/ftsystem.c:97: error: syntax error before "memory"
builds/unix/ftsystem.c: In function `ft_alloc': builds/unix/ftsystem.c:100: error: `memory' undeclared (first use in this function)
builds/unix/ftsystem.c:100: error: (Each undeclared identifier is reported only once
builds/unix/ftsystem.c:100: error: for each function it appears in.)
builds/unix/ftsystem.c:102: error: `size' undeclared (first use in this function)
builds/unix/ftsystem.c: At top level: builds/unix/ftsystem.c:127: error: syntax error before "memory"

And so on.... Could anyone please tell me what the problem is? Thanks, Krishi.

Replies are listed 'Best First'.
Re: (OT) Freetype installation problems
by moritz (Cardinal) on Dec 17, 2007 at 09:54 UTC
    The file ftsystem.c uses includes that look like this:
    #include FT_INTERNAL_DEBUG_H

    The file name is in a pre processor macro, and it seems your C compiler can't handle that.

    I tested it with gcc 4.1, and that works, so try to compile the package with gcc instead.

      Can you tell me how do I exactly compile it with gcc ?
      I have gcc 3.4.6 installed on my system.
      Thanks,
      Krishi.
        Come on, you can try a bit on your own.

        ./configure has a very helpful --help option.