# x11-toolkits/gigi fails to build



## hedgehog (Jan 5, 2011)

```
g++46 -o src/DynamicGraphic.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -I/usr/local/include src/DynamicGraphic.cpp
g++46 -o src/Edit.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -I/usr/local/include src/Edit.cpp
g++46 -o src/EventPump.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -I/usr/local/include src/EventPump.cpp
g++46 -o src/Font.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -I/usr/local/include src/Font.cpp
In file included from src/Font.cpp:33:0:
/usr/local/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
compilation terminated.
scons: *** [src/Font.os] Error 1
scons: building terminated because of errors.
*** Error code 2

Stop in /usr/ports/x11-toolkits/gigi.
*** Error code 1

Stop in /usr/ports/x11-toolkits/gigi.
```

Looks like it cannot find freetype2 inclusion. This is an earlier log of compilation process:

```
g++46 -o src/WndEditor.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -pthread -Wall -Wno-parentheses -O2 -fPIC -
I/usr/local/include -I/usr/local/include/freetype2 -I. -Ilibltdl src/WndEditor.cpp
g++46 -o src/WndEvent.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -pthread -Wall -Wno-parentheses -O2 -fPIC -
I/usr/local/include -I/usr/local/include/freetype2 -I. -Ilibltdl src/WndEvent.cpp
g++46 -o src/ZList.os -c -O2 -pipe -I. -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -pthread -Wall -Wno-parentheses -O2 -fPIC -
I/usr/local/include -I/usr/local/include/freetype2 -I. -Ilibltdl src/ZList.cpp
```
I noticed there was *-I/usr/local/include -I/usr/local/include/freetype2* option passed to gcc, but there is no freetype2 inclusion at the error point. How may I include /usr/local/include/freetype2 in this case?


----------



## hedgehog (Jan 5, 2011)

x11-toolkits/gigi wants gcc44, but I have gcc46, so I had to edit one file:

```
--- GG/adobe/cmath.hpp.orig     2011-01-05 13:35:35.631436941 +0200
+++ GG/adobe/cmath.hpp  2011-01-05 13:35:50.973926288 +0200
@@ -37,14 +37,14 @@
 
 #define ADOBE_HAS_CPP_CMATH 
 
-#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 4))
+#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 6))
 /*
     The currently supported version of GNUC has C99 extensions in math.h. But no TR1 extensions.
 */
```
When I continued building after this change, it failed with error which is mentioned in the 1st post. Problem solved  by rebuilding from the beginning after patch been applied.


----------

