1、依赖
X11依赖Xtrans、xcb和xorgproto,因此编译顺序为Xtrans->xorgproto->xcb->X11。
1.1、编译Xtrans
下载地址
Index of /releases/individual/libhttps://www.x.org/releases/individual/lib/
#解压
tar -zxvf xtrans-1.4.0.tar.gz
cd xtrans-1.4.0
#交叉编译环境,其中/path/to/cross-compile指交叉编译器目录
#如/home/user/toolchain/arm-linux-gnueabihf/bin
export PATH=$PATH:/path/to/cross-compile
#配置,其中/path/to/prefix指编译安装目录
#如/home/user/toolchain/arm-linux-gnueabihf/arm-linux-gnueabihf
#把编译结果安装在交叉编译器中,否则引用到该库需要指定对应的目录
./configure --prefix=/path/to/prefix \
--host=arm-linux-gnueabihf \
--enable-option-checking
#编译
make
#安装
make install
1.2、编译xorgproto、xcb 【ARM开发】交叉编译Qt源码之(1)编译xcb_console_log的博客-CSDN博客下载地址:Index of /disthttps://xcb.freedesktop.org/dist/解压tar -zxvf libxcb-1.13.tar.gz执行指令export PATH=$PATH:${CROSS_COMPELE_PATH}./configure --host=arm-none-linux-gnueabihf --prefix=${INSTALL_PREFIX}
https://blog.csdn.net/console_log/article/details/122826798?spm=1001.2014.3001.5501
1、编译X11
下载地址:
Index of /releases/individual/libhttps://www.x.org/releases/individual/lib/
#解压
tar -zxvf libX11-1.7.2.tar.gz
cd libX11-1.7.2
#交叉编译环境,其中/path/to/cross-compile指交叉编译器目录
#如/home/user/toolchain/arm-linux-gnueabihf/bin
export PATH=$PATH:/path/to/cross-compile
#配置,其中/path/to/prefix指编译安装目录
#如/home/user/toolchain/arm-linux-gnueabihf/arm-linux-gnueabihf
#把编译结果安装在交叉编译器中,否则引用到该库需要指定对应的目录
./configure --prefix=/path/to/prefix \
--host=arm-linux-gnueabihf \
--enable-option-checking \
--enable-unix-transport \
--enable-tcp-transport \
--enable-ipv6 \
--enable-local-transport \
--enable-malloc0returnsnull
#编译
make
#安装
make install