源码链接
解压
配置编译
参考编译libX11(转载)
依赖:
xproto
xtrans
kbproto
inputproto
libxcb
xorgproto
这里X11的链接库和头文件不能用CFLAGS和LDFLAGS,可能是configure的bug吧
echo enable_malloc0returnsnull=yes>arm-linux.cache
./configure CC=arm-linux-gnueabihf-gcc --host=arm-linux --prefix=/home/cp/out_arm --includedir=/home/cp/out_arm/include --libdir=/home/cp/out_arm/lib --cache-file=arm-linux.cache
缺少X.h文件
编译xproto,下载链接
没有X11/Xtrans/Xtrans.h
编译xtrans,下载链接
没有X11/extensions/XKBproto.h
编译kbproto
没有X11/extensions/XI.h
编译inputproto
没有xcb/xcb.h
一直libxcb,下载地址
没有X11/extensions/xf86bigfstr.h
编译xorgproto,下载地址
编译xproto,xtrans,kbproto, inputproto,xcb-proto,libXau,xorgproto
./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc --prefix=/home/cp/out_arm
make && make install
编译libxcb
libxcb1.11下载地址
依赖:
xcb-proto,下载地址
libXau
出错:
make[1]: Entering directory ‘/home/cp/source/libxcb-1.11/src’
GEN xproto.c
Failed to load the xcbgen Python package!
Make sure that xcb/proto installed it on your Python path.
If not, you will need to create a .pth file or define $PYTHONPATH
to extend the path.
Refer to the README file in xcb/proto for more info
解决:
apt-get install python-xcbgen
没有X11/Xauth.h
编译libXau,
最后配置编译成功
./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc --prefix=/home/cp/out_arm CFLAGS=-I/home/cp/out_arm/include LDFLAGS=-L/home/cp/out_arm/lib
make && make install
=====================================================================
libXrender移植
配置
./configure --prefix=/home/cp/out_arm --host=arm-linux CFLAGS=-I/home/cp/out_arm/include LDFLAGS=-L/home/cp/out_arm/lib CC=/home/cp/gcc_tools/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc