当前位置:   article > 正文

opengl交叉编译

opengl交叉编译

I   xcb-proto编译

xcb-proto下载   https://xcb.freedesktop.org/dist/

这里使用的是1.14版本

配置  mips版本

ubuntu@ubuntu:~/Videos/OpenGL/xcb-proto-1.14$ CC=mips64el-linu-gcc CXX=mips64el-linux-g++ ./configure --prefix=/home/ubuntu/Videos/OpenGL/xcb-proto-1.14/loongson_install --host=mips-linux

ARM版,未验证

CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ ./configure --prefix=/home/ubuntu/Videos/OpenGL/xcb-proto-1.14/arm_install  --host=arm-linux

安装

make 

make install

路径设置,不然下面的libxcb找不到

export PKG_CONFIG_PATH=/home/ubuntu/Videos/OpenGL/xcb-proto-1.14/loongson_install/lib/pkgconfig
 

libX11

Index of /archive/individual/lib

这里使用的是

II libxcb

下载  Index of /dist (xcb.freedesktop.org)

这里使用的是1.14版本

配置mips版本

 CC=mips64el-linux-gcc CXX=mips64el-linux-g++ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libxcb-1.14/loongson_install --host=mips-linux

编译安装

make 

make install

III  libX11

下载

Index of /archive/individual/lib

配置

 ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux
 

报错

  1. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
  2. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux --cache-file=arm-linux.cache

 配置成功

编译make -j8 ,报错

 添加其他库文件

Index of /archive/individual/proto (xorg.freedesktop.org)

这里使用的是xproto-7.0.31.tar.gz

拷贝到libx11源码目录下并解压

配置并安装

  1. ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux
  2. make
  3. make install

之后编译libX11

新加配置

  1. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ export PREFIX=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install
  2. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
  3. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$

之后配置编译

  1. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
  2. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux --cache-file=arm-linux.cache
  3. 之后make

这次报错

参考,索性一次把改下的包下完

(6条消息) 交叉编译libX11_OneSea的专栏-CSDN博客_交叉编译libx11

  下载https://xorg.freedesktop.org/archive/individual/lib/xtrans-1.4.0.tar.gz

  网址Index of /archive/individual/lib (xorg.freedesktop.org)

配置编译安装同 xproto-7.0.31.tar.gz ,报错

下载kbproto-1.0.6.tar.bz2http://mirror2.openwrt.org/sources/kbproto-1.0.4.tar.bz2

配置编译安装同 xproto-7.0.31.tar.gz ,这个没有make ,直接make isntall ,可能会有问题,暂时报错

下载http://mirror2.openwrt.org/sources/inputproto-2.0.tar.bz2kbproto-1.0.6.tar.bz2

配置编译安装同 xproto-7.0.31.tar.gz ,这个没有make ,直接make isntall ,可能会有问题,暂时报错

下载 https://www.x.org/releases/individual/lib/libxcb-1.14.tar.gz

 配置编译安装同 xproto-7.0.31.tar.gz ,暂时报错

出现配置问题

 sudo apt-get install doxygen

 因为目前ubuntu 的支持到1.13.1 ,所以重新下个

https://www.x.org/releases/individual/xcb/libxcb-1.13.1.tar.gz

sudo apt-get install xsltproc

sudo apt-get install xcb-proto

配置OK ,编译问题

解决sudo apt-get install python-xcbgen

下载

 https://www.x.org/releases/individual/lib/libXau-1.0.9.tar.gz

 配置编译安装同 xproto-7.0.31.tar.gz ,重新编译libxcb

  1. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3/libxcb-1.13.1$ export PREFIX=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install
  2. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3/libxcb-1.13.1$ export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
  3. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3/libxcb-1.13.1$ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux

编译安装 make &&make install

重新编译libX11,报错

下载

https://xorg.freedesktop.org/archive/individual/proto/xorgproto-2021.5.tar.gz

 配置编译安装同 xproto-7.0.31.tar.gz ,编译libX11

  1. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
  2. ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install --host=mips64el-linux --cache-file=arm-linux.cache CPPFLAGS="-I/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install/include" LDFLAGS="-L/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install/lib"
  3. 之后make && make install

IV  libDrm

下载

https://dri.freedesktop.org/libdrm/libdrm-2.4.100.tar.gz

配置编译安装

  1. CC=mips64el-linux-gcc CXX=mips64el-linux-g++ ./configure --prefix=/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install --disable-amdgpu --disable-intel --target=mips-linux --host=mips-linux --disable-cairo-tests
  2. 之后make && make install

V MESA

下载

https://archive.mesa3d.org//mesa-20.0.1.tar.xz

配置编译安装

设置环境变量

  1. export PREFIX=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install
  2. export HOST=mips64el-linux
  3. export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/lib/pkgconfig:/home/ubuntu/Videos/OpenGL/xcb-proto-1.14/loongson_install/lib/pkgconfig
  4. export CXX=mips64el-linux-g++
  5. export CC=mips64el-linux-gcc

配置

  1. ./configure --prefix=/home/ubuntu/Videos/OpenGL/mesa-19.0.0/loongson_install --target=mips-linux --host=mips-linux --enable-gles2 --enable-gles1 --disable-glx --disable-egl --disable-dri --enable-shared-glapi --with-dri-drivers=swrast LIBDRM_CFLAGS="-I/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include
  2. -I/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include/libdrm" LIBDRM_LIBS="-L/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/lib" --enable-autotools --enable-dri --disable-dependency-tracking
  3. ubuntu@ubuntu:~/Videos/OpenGL/mesa-19.0.0$ ./configure --prefix=/home/ubuntu/Videos/OpenGL/mesa-19.0.0/loongson_install --target=mips-linux --host=mips-linux --enable-gles2 --enable-gles1 --disable-glx --disable-egl --disable-dri --enable-shared-glapi --with-dri-drivers=swrast LIBDRM_CFLAGS="-I/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include:/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include/libdrm" LIBDRM_LIBS="-L/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/lib" --enable-autotools --enable-dri --disable-dependency-tracking

编译安装

make 

报错

 下载

http://www.zlib.net/zlib-1.2.11.tar.gz

配置编译安装

  1. export CC=mips64el-linux-gcc
  2. ./configure --prefix=/home/ubuntu/Videos/OpenGL/zlib-1.2.11/loongson_install
  3. make
  4. make install

修改配置文件,继续编译

./configure --prefix=/home/ubuntu/Videos/OpenGL/mesa-19.0.0/loongson_install --target=mips-linux --host=mips-linux --enable-gles2 --enable-gles1 --disable-glx --disable-egl --disable-dri --enable-shared-glapi  --with-dri-drivers=swrast  LIBDRM_CFLAGS="-I/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include:/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/include/libdrm:/home/ubuntu/Videos/OpenGL/zlib-1.2.11/loongson_install/include" LIBDRM_LIBS="-L/home/ubuntu/Videos/OpenGL/libdrm-2.4.100/loongson_install/lib:/home/ubuntu/Videos/OpenGL/zlib-1.2.11/loongson_install/lib" --enable-autotools --enable-dri --disable-dependency-tracking

报错

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/283011
推荐阅读
  

闽ICP备14008679号