参考:
环境:debian sid x86 gcc4.4.4
环境变量,后三个是必须的,否则编译无法成功:
export PREFIX=/home/stesen/tools/gimp-2.7
export PATH=$PATH:${PREFIX}/gimp-2.7/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export LD_LIBRARY_PATH=${PREFIX}/lib
sudo aptitude build-dep gimp
# libtool
debian自带的libtool版本上有点问题,在编译babl和gegl时会出现如下问题:
libtool: Version mismatch error. This is libtool 2.2.6, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6b.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
libtool: and run autoconf again.
make[3]: *** [babl-base.lo] Error 1
make[3]: Leaving directory `/home/stesen/downloads/gimp-2.7.0/babl/babl/babl/base'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/stesen/downloads/gimp-2.7.0/babl/babl/babl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/stesen/downloads/gimp-2.7.0/babl/babl'
make: *** [all] Error 2
所以需要自己编译一个libtool,版本在1.5以上即可,编译完gegl后这个libtool就没用了
wget ftp://ftp.gnu.org/pub/gnu/libtool/libtool-2.2.tar.bz2
tar xf libtool-2.2.tar.bz2
cd libtool-2.2/
./configure --prefix=${PREFIX}
make
make install
cd ..
# babl
git clone --depth 1 git://git.gnome.org/babl
cd babl
下面要使编译过程中全都使用刚才安装的libtool
cp autogen.sh{,.org}
sed -e 's/\${LIBTOOLIZE-libtoolize\}/\/home\/stesen\/tools\/gimp-2.7\/bin\/libtoolize/g' autogen.sh.org > autogen.sh
./autogen.sh --prefix=${PREFIX}
for file in `find ./ -name Makefile` ;do
echo "LIBTOOL=${PREFIX}/bin/libtool" >> $file
done
make
make install
cd ..
# gegl
git clone --depth 1 git://git.gnome.org/gegl
cd gegl
cp autogen.sh{,.org}
sed -e 's/\${LIBTOOLIZE-libtoolize\}/\/home\/stesen\/tools\/gimp-2.7\/bin\/libtoolize/g' autogen.sh.org > autogen.sh
./autogen.sh --prefix=${PREFIX} --disable-gtk-doc
for file in `find ./ -name Makefile` ;do
echo "LIBTOOL=${PREFIX}/bin/libtool" >> $file
done
make
make install
cd ..
# gimp
git clone --depth 1 git://git.gnome.org/gimp
cd gimp
./autogen.sh --prefix=${PREFIX} --disable-gtk-doc
make
make install
启动gimp:
${PREFIX}/gimp-2.7
阅读(1214) | 评论(0) | 转发(0) |