作者:lzx_322
http://blog.csdn.net/lzx_322/article/details/18220649

一:依赖关系

以下依赖关系是在GTK+ X11编译好后的,对于GTK 以及x11的部分依赖没有写出,有些包在编译gtk时便生成了!

Xfce4版本4.4.3

安装包 依赖包 安装依赖包需要的包
Libxfce4util(3) Glib(2)
Libxfcegui4(5) Libglade(3) Atk(2),libxml(1)
Xfce-utile(5) Xfce-mcs-manage(3),libfcegui4
Xfwm4(5) Libfcegui4, Xfce-mcs-manage
Xfce-msc-plugins(4) Xfce-mcs-manage
Xfce4-panel(6) Xfce-mcs-manage,libfcegui4,exo
Thunar(5) Exo(4) Libxfce4util
Terminal Vte Freetype(1),glib
Xfce4-setting exo Xfce4-setting 依赖gtk版本高,暂没编
Xdesktop Xfce4-panel(6)
Xfconf(6) Xfce-utile,dubs-glib(3)
Xfce4-dev-tool(7) xconf
Xcb-util(3) Xcb(2) Xau->xproto,pthread-stubs(1)
Gtk-xfce-engine(3) Glib(2) Libffi(1)
mousepad 最后编写的,忘记依赖
Libxfce4mcs
xfce4-icon-theme
hicolor-icon-theme

以上大致按照顺序编译安装,其中个别还有其他依赖的包,

二:编译命令

编译xfce4包时一些命令:

1、 libxfce4util-4.4.3

./configure--host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/--x-includes=/usr/local/xorg/include/ --x-libraries=/usr/local/xorg/lib/CFLAGS="-I/usr/local/xorg/include " --with-broken-putenv=no

make clean

make

make install

2、xfce-mcs-manager-4.4.3

./configure--host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/--x-includes=/usr/local/xorg/include/ --x-libraries=/usr/local/xorg/lib/CFLAGS="-I/usr/local/xorg/include "

make clean

make

make install

3、gtk-xfce-engine-2.4.3

./configure--host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/--x-includes=/usr/local/xorg/include/ --x-libraries=/usr/local/xorg/lib/CFLAGS="-I/usr/local/xorg/include "

make clean

make

make install

4、xfce-mcs-plugins-4.4.3

./configure--host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/ --x-includes=/usr/local/xorg/include/--x-libraries=/usr/local/xorg/lib/ CFLAGS="-I/usr/local/xorg/include"

make clean

make

make install

5、libxfcegui4-4.4.3

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

6、xfce-utils-4.4.3

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/ PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

7、xfwm4-4.4.3

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

8、exo-0.3.4


./configure --host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/--x-includes=/usr/local/xorg/include/ --x-libraries=/usr/local/xorg/lib/CFLAGS="-I/usr/local/xorg/include "

make clean

make

make install

9、Thunar-0.9.3

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

10、xfce4-panel-4.4.3

./configure –host=arm-linuxCC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

11、freetype-2.4.4

./configur –prefix=/usr/local/xorgCC=arm-linux-gcc –host=arm-linux

make clean

make

make install

vte-0.12.2

#./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/ –x-includes=/usr/local/xorg/include/–x-libraries=/usr/local/xorg/lib/ CFLAGS=”-I/usr/local/xorg/include”

#make clean

#make

#make install

12、xfdesktop-4.4.3

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

13、Terminal-0.4.3

#./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/ PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

#make clean

#make

#make install

14、xfce4-icon-theme-4.4.3

./configure --host=arm-linux CC=arm-linux-gcc --prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/--x-includes=/usr/local/xorg/include/ --x-libraries=/usr/local/xorg/lib/ CFLAGS="-I/usr/local/xorg/include "

make clean

make

make install

15、hicolor-icon-theme-0.12

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

16、#startup-notification-0.12

#./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

#make clean

#make

#make install

17、mousepad-0.2.14

./configure–host=arm-linux CC=arm-linux-gcc –prefix=/usr/local/xorg/PKG_CONFIG_PATH=/usr/local/xorg/lib/pkgconfig/–x-includes=/usr/local/xorg/include/ –x-libraries=/usr/local/xorg/lib/CFLAGS=”-I/usr/local/xorg/include “

make clean

make

make install

注:有一些包的安装没有在这写出,下面的错误调试中部分有指出:

三 编译修改错误

编译 xfec4中,遇见的部分问题以及解决办法

注:从开始编译到最后一次的编译,安装的目录有所改变,下面错误的出现以及修改目录是不同的

3.1 关于编译的顺序

刚找到包的时候不知道依赖关系,只有试着编译:刚开始编译的包都说要依赖libxfce4util-4.4.3

就开始编译这个包,出现的错误如图所示:

打开configure 可以看见

检测putenv()时出现错误:打开帮助查找信息

# ./configure –h

有这样一句

--with-broken-putenv=[auto/yes/no] broken putenv(3)default=auto

默认情况下是自动检测,我们在这设置参数跳过不检测:再次运行看是否出错

设置

--with-broken-putenv=no

这次运行没有错误,编译成功。

Make

Make install

3.2 依赖 x11

开始编译的时候没有等到X11编译完成,所以出现找不到 X11 头文件的错误

checking for X...no

configure: error:X Window system libraries and header files are required

在编译的包都需要依赖X11,等到X11编译完成后,出现

X11/Xlib.hNO such file

这样的错误咋configure后面加上

--x-includes=/usr/local/xorg/include/--x-libraries=/usr/local/xorg/lib/ CFLAGS="-I/usr/local/xorg/include"

头文件的路径透过了,也许后面的某些编译不需要依赖X11 ,为了方便,后面编译的包基本上都加上的X11的头文件路径。

3.3 依赖 gtk+ glib

同样,依赖gtk的包 gtk-xfce-engine-2.4.3 ,等待gtk的编译

checking forglib-2.0 >= 2.0.0 gtk+-2.0 >= 2.0.0... Package gtk+-2.0 was not found inthe pkg-config search path. Perhaps you should add the directory containing`gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0'found

configure: error:Library requirements (glib-2.0 >= 2.0.0 gtk+-2.0 >= 2.0.0) not met;consider adjusting the PKG_CONFIG_PATH environment variable if your librariesare in a nonstandard prefix so pkg-config can find them

依赖glib包

checking forNEEDED... configure: error: Package requirements (pthread-stubs xau >=0.99.2) were not met:

3.4 安装dbus

Configure 出现错误:

checking forXML_ParserCreate_MM in -lexpat... no

configure: error: Explicitly requested expat but expat not found

还有其他的错误未标出:

./configure--prefix=/usr/arm/ --host=arm-linux CC=arm-linux-gcc --enable-abstract-socketsCFLAGS=-I/usr/li/expat-2.0.0/lib LDFLAGS=-L/usr/li/expat-2.0.0/.libsLIBXML_CFLAGS=-I/usr/li/expat-2.0.0/lib LIBXML_LIBS=-L/usr/li/expat-2.0.0/.libs

Make

出现关于asm 的 错误,由于平台的原因出现此问题:晚上查询一下,有出现类似的错误的解决方法:在 configure 后面加上

 –with-x = no 

通过编译,但是此处要依赖x 所以用此方法不妥,转到sbox2 下面重新编译,不加–with-x = no,编译通过

Make install

3.5 安装 dbus-glib

编译出现错误,新建arm-linux.cache 文件,把一些信息写入文件,编译时候加上 –cache-file=arm-linux.cache,具体错误的信息没有当时保存下来。

./configure--prefix=/usr/locaal --host=arm-linux CC=arm-linux-gccCFLAGS=-I/usr/li/expat-2.0.0/lib LDFLAGS=-L/usr/li/expat-2.0.0/.libsLIBXML_CFLAGS=-I/usr/li/expat-2.0.0/lib LIBXML_LIBS=-L/usr/li/expat-2.0.0/.libs--cache-file=arm-linux.cache PKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig/

在make的时候出现 不能解析的二进制文件,修改makefile 如下图:

cannot executebinary file

修改:

dbus/Makefile

再次

cannot executebinary file

修改 Makefile

3.6 安装 exo

Configure 出现错误,不能运行test 打开configure 找到出现错误的地方,删除与之有关的代码 如下图:

进行 make 的时候 依然出现错误 可以看出错误出现在exo-0.3.4/tests 下面

进tests下 打开makefile 查找test-exo-csource删除 与test-exo-csource 有关的所有行

再次make通过

3.7 安装 vte

出现错误 如下图 依赖freetype 安装后错误出现 添加 export FT2_CONFIG=/usr/arm/bin/freetype-config

编译通过。



export FT2_CONFIG=/usr/arm/bin/freetype-config

$FT2_CONFIG

3.8

在gtk 没有编译之前编译xfce4 出现的一些依赖包的编译: 后来证明在编译gtk 的时候 这些包基本都已编译过,

安装:xcb-util-0.3.9

出现错误

configure: error:Package requirements (xcb >= 1.4) were not met:

No package 'xcb'found

下载xcb libxcb-1.5

./configure--prefix=/usr/arm/ --host=arm-linux CC=arm-linux-gccPKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig/

出现错误:

checking forNEEDED... configure: error: Package requirements (pthread-stubs xau >=0.99.2) were not met:

No package'pthread-stubs' found

No package 'xau'found

Consider adjustingthe PKG_CONFIG_PATH environment variable if you

installed softwarein a non-standard prefix.

Alternatively, youmay set the environment variables NEEDED_CFLAGS

and NEEDED_LIBS toavoid the need to call pkg-config.

See the pkg-configman page for more details.

下载 xau pthread-stubs

Pthread-stubs 安装成功

Xau 需要xproto

Xproto 安装成功

Xau 安装成功

Xcb 1.4安装:

./configure--prefix=/usr/arm/ --host=arm-linux CC=arm-linux-gccPKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig/

安装成功

安装xcb-until

出现关于版本的问题

checking whetherlibxcb was compiled against xcb-proto >= 1.6... checking for gawk...(cached) gaw

重新安装xcb-proto-1.6

重新安装libxcb

安装xcb-until-0.3.9 成功

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

也安装过关于GTK部分

安装pango

../pango/.libs/libpangocairo-1.0.so:undefined reference to `cairo_ft_font_options_substitute'

../pango/.libs/libpangocairo-1.0.so:undefined reference to `cairo_ft_font_face_create_for_pattern'

版本过高

安装 cairo

./configure --host=arm-linux--prefix=/usr/arm/ CC=arm-linux-gcc --enable-svg=no --enable-pdf=yes --enable-ps=yes --enable-win32=no--enable-freetype=yes --enable-win32-font=no --enable-xcb=no  --enable-xlib=no --enable-xlib-xrender=no--enable-png=yes  png_CFLAGS=-I/opt/gtk/include/png_LIBS='-L/opt/gtk/lib/ -lpng' xcb_CFLAGS=-I/opt/xorg/include/  xcb_LIBS='-L/opt/xorg/lib -lxcb'PKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig/ --cache-file=arm-linux.cache



cairo_svg_surface_create=yes

cairo_ps_surface_set_eps=yes

cairo_show_text_glyphs=yes

png_set_interlace_handling=yes

安装 cairo



checking whethercairo's Xlib surface backend feature could be enabled... no (requires Xdevelopment libraries)

configure:error:  Xlib surface backend featurecould not be enabled