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
 

报错

ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
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源码目录下并解压

配置并安装

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

之后编译libX11

新加配置

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

之后配置编译

ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
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

这次报错

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

(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

ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3/libxcb-1.13.1$ export PREFIX=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install
ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3/libxcb-1.13.1$ export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
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

ubuntu@ubuntu:~/Videos/OpenGL/libX11-1.7.3$ echo "xorg_cv_malloc0_returns_null=yes" > arm-linux.cache
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"

之后make && make install

IV  libDrm

下载

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

配置编译安装

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 

之后make && make install

V MESA

下载

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

配置编译安装

设置环境变量


export PREFIX=/home/ubuntu/Videos/OpenGL/libX11-1.7.3/loongson_install

export HOST=mips64el-linux

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


export CXX=mips64el-linux-g++


export CC=mips64el-linux-gcc

配置

./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
 -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



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

配置编译安装

export CC=mips64el-linux-gcc

./configure --prefix=/home/ubuntu/Videos/OpenGL/zlib-1.2.11/loongson_install

make

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

报错

 

Logo

更多推荐