交叉编译libX11
- 介绍
- 一.编译xproto(x11proto-core_7.0.31.orig.tar.gz)
- 二.编译xextproto(x11proto-xext_7.3.0.orig.tar.gz)
- 三.编译xtrans(xtrans_1.4.0.orig.tar.gz)
- 四.编译xcb-proto(xcb-proto)
- 五.编译xua/libXau(libxau_1.0.9.orig.tar.gz)
- 六.编译xcb/libxcb(libxcb_1.14.orig.tar.gz)
- 七.编译kbproto(x11proto-kb_1.0.7.orig.tar.gz)
- 八.编译inputproto(x11proto-input_2.3.1.orig.tar.gz)
- 九.编译xorgproto(xorgproto_2020.1.orig.tar.gz)
- 十.编译libX11(libx11_1.6.10.orig.tar.gz)
介绍
创建/opt/libX11target用来做安装目录
创建libX11目录放置源码,编译前建个编译脚本myconfigure.sh
#下面这个导出语句是用来指定开发包的位置,因为有些存在依赖关系,需要指定这个包的路径,
#所有依赖安转在libX11target目录,就只用指定这个路劲了
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
下面编译的脚本都在这个脚本基础上面,安装目录都是/opt/libX11target
一.编译xproto(x11proto-core_7.0.31.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
二.编译xextproto(x11proto-xext_7.3.0.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
三.编译xtrans(xtrans_1.4.0.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
四.编译xcb-proto(xcb-proto)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
五.编译xua/libXau(libxau_1.0.9.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
六.编译xcb/libxcb(libxcb_1.14.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
七.编译kbproto(x11proto-kb_1.0.7.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
八.编译inputproto(x11proto-input_2.3.1.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
九.编译xorgproto(xorgproto_2020.1.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
执行脚本myconfigure.sh,然后make,然后makeinstall
十.编译libX11(libx11_1.6.10.orig.tar.gz)
脚本myconfigure.sh
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
出现错误
checking whether malloc(0) returns NULL... configure: error: in `/home/mywork/libX11/libX11-1.6.10':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
把执行脚本改为
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libX11target/lib/pkgconfig
echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
./configure \
--prefix=/opt/libX11target \
--host=arm-linux \
--cache-file=arm-linux.cache
执行脚本myconfigure.sh,然后make,然后makeinstall
make出现错误X11/extensions/xf86bigfproto.h: No such file or directory
compilation terminated.添加了第九步骤,把xorgproto安转之后就解决了
make[3]: Entering directory '/home/mywork/libX11/libX11-1.6.10/src'
CC Font.lo
CC FreeCurs.lo
CC FreeEData.lo
CC FreeEventData.lo
CC FreeGC.lo
CC FreePix.lo
CC FSSaver.lo
CC FSWrap.lo
Font.c:49:42: fatal error: X11/extensions/xf86bigfproto.h: No such file or directory
compilation terminated.