libX11交叉编译

源码链接
解压
配置编译

参考编译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

xproto源码下载链接
xtrans下载链接

./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
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 交叉编译libxcbX11是为了在特定的环境中使用XCB库和X11库。根据引用\[1\]中的描述,编译libxcbX11需要安装一些前提工具和依赖项,如Xtrans、xorgproto、xcb-proto、libXau等。具体的编译过程可以参考引用\[1\]中提供的步骤。在编译过程中可能会遇到一些问题,比如引用\[2\]中提到的找不到xcb-proto和libXau的错误。解决这些问题可以根据引用\[2\]中给出的配置和编译命令进行操作。最后,根据引用\[3\]中的描述,可能还会遇到xcb-util-wm的错误,如果有人知道如何解决这个问题,可以提供详细的解决办法。总之,交叉编译libxcbX11需要按照一定的步骤和依赖项进行操作,遇到问题可以参考相关的文档或寻求帮助。 #### 引用[.reference_title] - *1* *2* [交叉编译libxcbX11](https://blog.csdn.net/weixin_42892101/article/details/107852277)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [libX11libxcb交叉编译](https://blog.csdn.net/hx0318/article/details/123196945)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值