Fsck uSuck

linuxfonts.narod.ru -> How to: compile and install GTK3 libraries in CentOS 6.4

!!! This how-to is outdated. Please read the actual one !!!

CentOS doesn't contain GTK3 libraries so you cannot install software that is dependent on them. Here you will find the instructions how to compile and install GTK3 libraries into /opt in CentOS 6.3/6.4.

If anyone's interested I can upload compiled GTK3 libraries - but I don't want to do that as you shouldn't trust me - I can easily embed something nasty in them ;-).

0. Prepare your system by installing these packages:

yum install gcc make bison yasm atk-devel gtk2-devel cairo-devel glib2-devel pango-devel gettext-devel rpm-build expat-devel

1. Download the following packages:

atk-2.4.0.tar.xz
cairo-1.12.2.tar.xz
gdk-pixbuf-2.26.3.tar.xz
glib-2.32.4.tar.xz
gtk+-3.4.4.tar.xz
pango-1.30.1.tar.xz
pixman-0.26.2.tar.xz

2. Run the following commands:

export LD_LIBRARY_PATH=/opt/gtk3/lib
export PATH="/opt/gtk3/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gtk3/lib/pkgconfig"

3. Temporarily disable all existing GTK2-headers:

cd /usr/include
mkdir OLDHEADERS
mv atk* cairo glib* gtk* pango* OLDHEADERS

4. Now build the packages in this order using the following configure argument:

1. glib
2. atk
3. pango
4. pixman
5. cairo
6. gdk-pixbuf
7. gtk

./configure --prefix=/opt/gtk3 && make -j<NUMBER_OF_YOUR_CPU_CORES> && make install

5. You can now build and install software which requires GTK3 using these commands:

export LD_LIBRARY_PATH=/opt/gtk3/lib
export PATH="/opt/gtk3/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gtk3/lib/pkgconfig"
./configure && make && make install

or, alternatively,

export CFLAGS="-I/opt/gtk3/include -L/opt/gtk3/lib"
export PATH="/opt/gtk3/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gtk3/lib/pkgconfig"
./configure && make && make install

© 2012 Artem S. Tashkinov. This material cannot be reproduced on any other website, you are only allowed to link to this webpage.

blog comments powered by Disqus free counters
Hosted by uCoz