Desde hace varios dˇas he estado tratando de compilar el Gtk+-2.4.3
sin ‚xito, revisando varios foros en los que se describian problemas
similares no encontr‚ ninguna informaci˘n concreta que pudiera servir
para solucionarlos.
Los errores son los siguientes:
Primero:
Pango 1.2.0 and Xft backend is required for x11 target
Y el segundo en la compilacion:
/usr/local/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!"
/usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files."
/usr/local/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/local/include/freetype2/freetype/freetype.h:23:2: #error " #include <ft2build.h>"
/usr/local/include/freetype2/freetype/freetype.h:24:2: #error " #include FT_FREETYPE_H"
Lo que explico a continuaci˘n requiere descargar e instalar varios
programas antes de intentar realizarlo.
1er paso:
Descargar la version m s reciente del X11. Esta la puedes conseguir en
las siguientes direcciones:
http://ftp.xfree86.org/pub/XFree86/4.4.0/binaries/
ftp://ftp.xfree86.org/pub/XFree86/4.4.0/binaries/
Una vez ahi busca el directorio de binarios que corresponda a tu
version de Glibc, si utilizas un sistema basado en rpm puedes
averiguar la version escribiendo:
$ rpm -qa | grep glibc
te aparecera algo como lo siguiente:
glibc-x.x.x
las X son la version que tengas, si estas en linux, deber s cambiar al
directorio de X11 que corresponda con los dos primeros numeros de la
version, asi como yo tengo instalado el glibc-2.2.5 entro al
directorio "Linux-ix86-glibc22/"
descarga todos los paquetes .tar.gz ˘ tar.bz2 que se encuentren
dentro como los archivos binarios que aparescan.
Cuando los tengas,deber s ejecutar el script Xinstall.sh
$ sh Xinstall.sh
Nota: Recuerda hacer esto desde la consola ya que estas actualizando
el X11.
el script te guiara para instalar el X11.
Nota: Antes de ejecutar algo lee detenidamente el archivo INSTALL,
porque si ya tenias instalada otra version del X11 corres el riesgo de
perder las configuraciones.
2do paso:
Asumiendo que tienes un X11 configurado y funcional, vamos a la
parte problem tica. Primero, deberas descargar los siguientes
archivos:
fcpackage-X_X.tar.gz
fontconfig-X.X.XX.tar.gz
xft-X.X.X.tar.gz
Estos archivos los puedes obtener de la siguiente direccion:
http://freedesktop.org/~fontconfig/release/
Nota: Recuerda que las X son la version, procura descargar la
version m s reciente.
Esta parte es relativamente sencilla, simplemente descomprime los
archivos y corre los archivos ./configure --prefix=/usr y luego
"make" y "make install".
3er paso:
Si todo va bien hasta aqui, descarga el siguiente archivo:
freetype-X.X.X.tar.bz2
de:
http://sourceforge.net/project/showf...?group_id=3157
Al igual que los anteriores ./configure --prefix=/usr y luego
"make" y "make install"
4to paso:
Descarga e instala la version m s reciente de pkgconfig:
pkgconfig-X.X.X..tar.gz
desde:
http://www.freedesktop.org/software/pkgconfig/releases/
como siempre: ./configure --prefix=/usr luego "make" y "make
install"
4to paso:
Luego de haber hecho todo esto viene lo que nos interesa,
asumiendo que tenemos los paquetes del GTK, configuramos cada uno
con las siguientes opciones.
ATK:
configure --prefix=/usr
GLIB:
configure --prefix=/usr
PANGO:
configure --prefix=/usr --enable-explicit-deps
Nota: --enable-explicit-deps es lo que nadie nunca nos dijo, y es
la opcion que obliga a compilar pango con soporte de Xft, hasta
aqui superamos el primer problema.
5to paso ( Un poco de hacking):
primero corremos el script de configuracion del GTK
GTK:
configure --prefix=/usr
Hasta aqui todo deberia ir bien y no nos deberia mostrar ningun
problema, pero es muy probable que al compilar obtengamos el
siguiente error:
"`ft2build.h' hasn't been included yet!"
"Please always use macros to include FreeType header files."
"Example:"
" #include <ft2build.h>"
" #include FT_FREETYPE_H"
La soluci˘n: Con nuestro editor preferido, abrimos el archivo
/usr/X11R6/include/Xft/Xft.h
y cambiamos la linea que dice:
#include <freetype2/freetype.h>
por:
#include <ft2build.h>
#include FT_FREETYPE_H
y seguimos compilando felices y contentos.
6to paso:
instalando GTK:
nos relajamos un poco y escribimos:
make install
y felicidades tienen las librerias mas nuevas del GTK instaladas y
completamente funcionales, ademas actualizaron su version del X11 y
las librerias Xft, fontconfig y freetype, y de paso pkgconfig.
En ingles:
Gracias a d-westmaccot por la traduccion:
I've been trying to compile the Gtk+-2.4.3 for many days without success, checking
many forums in which similar problems were described. I didn't find any concrete
information that could be used to solve them.
The errors are as follows:
First:
Pango 1.2.0 and Xft backend is required for x11 target
And the second:
/usr/local/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!"
/usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files."
/usr/local/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/local/include/freetype2/freetype/freetype.h:23:2: #error " #include <ft2build.h>"
/usr/local/include/freetype2/freetype/freetype.h:24:2: #error " #include FT_FREETYPE_H"
What I explain here requires to download and install several programs before trying to
do it.
First step:
Download the most recent version of the X11. This one you can get from the next links:
http://ftp.xfree86.org/pub/XFree86/4.4.0/binaries/
ftp://ftp.xfree86.org/pub/XFree86/4.4.0/binaries/
There look for the directory of binaries that corresponds to your Glibc version, if you
use a system based on rpm you can find out the version by typing:
$ rpm -qa | grep glibc
Something like this will appear:
glibc-x.x.x
The X's are the version you have, if you use linuz, you'll have to move to the X11
directory that corresponds to the to first numbers of the version, for example, I have
the glibc-2.2.5 and I move to the directory "Linux-ix86-glibc22/"
Download all the packages .tar.gz or tar.bz2 that are there as well as the binary files
that appear.
When you have them, you'll have to execute the script Xinstall.sh
$ sh Xinstall.sh
Note: Remember to do this from the console 'cause you're refreshing the X11.
the script will guide you to install the X11.
Note: Before executing anything, read carefully the file INSTALL, because if you already
had the other version of X11 installed, you are in risk of losing the configurations.
Second step:
Presuming you have a X11 configured and functional, we now go to the problematic thing.
First, you'll have to download the next files:
fcpackage-X_X.tar.gz
fontconfig-X.X.XX.tar.gz
xft-X.X.X.tar.gz
You can get those files from:
http://freedesktop.org/~fontconfig/release/
Note: Remember that the X's are the version, try to download the most recent version.
This part is relatively easy, just unzip the files and run them
./configure --prefix=/usr and then
"make" and "make install".
Third step:
If everything's OK until now, download the next file:
freetype-X.X.X.tar.bz2
from:
http://sourceforge.net/project/showf...?group_id=3157
Same as before
./configure --prefix=/usr and then
"make" and "make install".
Fourth step:
Download and install the most recent version of pkgconfig:
pkgconfig-X.X.X..tar.gz
from:
http://www.freedesktop.org/software/pkgconfig/releases/
as always:
./configure --prefix=/usr and then
"make" and "make install".
Fifth step:
After doing all that, here comes what interests us, presuming that we have the GTK
packages, we configure each one with the next options.
ATK:
configure --prefix=/usr
GLIB:
configure --prefix=/usr
PANGO:
configure --prefix=/usr --enable-explicit-deps
Note: --enable-explicit-deps is what no one ever told us, and it's the option that
forces to compile with support of Xft, from here we overcome the first problem.
Sixth step (A little hacking):
First we run the configuration script of the GTK
GTK:
configure --prefix=/usr
From here all should be OK and it shouldn't show us any problem, but it's very possible that
compiling we have the following error:
"`ft2build.h' hasn't been included yet!"
"Please always use macros to include FreeType header files."
"Example:"
" #include <ft2build.h>"
" #include FT_FREETYPE_H"
The solution: With our favourite editor, we open the file /usr/X11R6/include/Xft/Xft.h
and we change the line that puts:
#include <freetype2/freetype.h>
for:
#include <ft2build.h>
#include FT_FREETYPE_H
and we go on compiling happy and satisfied.
Seventh step:
installing GTK:
we relax a little and type:
make install
and congratulations! You have the newest GTK libraries installed and completely
functionals, also you actualized you X11 version and the Xft libraries, fontconfig and
freetype, and also pkgconfig.