记录Mesa配置文件如下:

Mesa版本:Mesa-10.2.3

  1. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --disable-glx --enable-egl --disable-dri --enable-shared-glapi --with-egl-platforms=fbdev --with-dri-drivers=swrast
  2. 或者
  3. unset PKG_CONFIG_PATH
  4. export PKG_CONFIG_PATH=/home/work/DownLoad/presen/lib/pkgconfig:/home/work/DownLoad/libdrm/lib/pkgconfig
  5. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --target=arm-linux --host=arm-linux --prefix=/home/work/DownLoad/Mesa-10.0 --enable-gl --enable-gles2 --enable-gles1 --enable-opengl --enable-shared-glapi --disable-dri --enable-shared-dricore --enable-gles1 --enable-opengl --enable-gallium-egl --with-egl-platforms=fbdev --with-gallium-drivers=swrast --with-dri-drivers=swrast CFLAGS="-I/home/work/DownLoad/libudev/include -L/home/work/DownLoad/libudev/lib/arm-linux-gnueabi"
  6. make &&make install

1 Mesa-10.3.5
#arm-linux
CC=/opt/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc
CXX=/opt/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure
--prefix=/Mesa --target=arm-linux --host=arm-linux --enable-gles2
--enable-gles1 --disable-glx --enable-egl --disable-dri
--enable-shared-glapi --with-egl-platforms=fbdev
--with-dri-drivers=swrast
---- configure: error: Package requirements (libdrm_radeon >= 2.4.56) were not met:
Requested 'libdrm_radeon >= 2.4.56' but version of libdrm_radeon is 2.4.52
安装libdrm-2.4.58
CC=/opt/Sourcery_G++_Lite4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --host=arm-linux
-----configure: error: Package requirements (pciaccess >= 0.10) were not met:
No package 'pciaccess' found
安装 sudo apt-get install libpciaccess-dev

------CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /root/桌面/Mesa-10.3.5/bin/missing aclocal-1.14 -I m4
/root/桌面/Mesa-10.3.5/bin/missing: 行 81: aclocal-1.14: 未找到命令
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] 错误 127
解决方法 sudo autoreconf -ivf
--------./configure: line 6427: syntax error near unexpected token `2.2'
./configure: line 6427: `LT_PREREQ(2.2)'
解决方法:1 apt-get libtool 2 把源文件目录清空,build目录也清空,重新解压,重新配置编译就行。
/* 
automake >= 1.11.1 (AM_INIT_AUTOMAKE([1.11.1])) (or 1.10.3, Automake < 1.10.3 and 1.11 are known to be suffering from
critical security issues)
autoconf >= 2.64 (AC_PREREQ(2.64))
libtool >= 2.2.6 (LT_PREREQ([2.2.6]))
intltool >= 0.40.0 (IT_PROG_INTLTOOL([0.40.0]))
*/
---------/bin/bash: yacc: 未找到命令
make[2]: *** [../../src/mesa/program/program_parse.tab.c] 错误 127
make[2]:正在离开目录 `/root/桌面/Mesa-10.3.5/src/mesa'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/root/桌面/Mesa-10.3.5/src'
make: *** [all-recursive] 错误 1
解决方法yacc和lex在ubuntu使用flex和bison代替,此处安装bison就是安装yacc 执行命令 : $sudo apt-get install bison $sudo apt-get
install flex

------CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /root/桌面/Mesa-10.3.5/bin/missing aclocal-1.14 -I m4
/root/桌面/Mesa-10.3.5/bin/missing: 行 81: aclocal-1.14: 未找到命令
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] 错误 127
解决方法 sudo autoreconf -ivf
--------./configure: line 6427: syntax error near unexpected token `2.2'
./configure: line 6427: `LT_PREREQ(2.2)'
解决方法:1 apt-get libtool 2 把源文件目录清空,build目录也清空,重新解压,重新配置编译就行。
/* 
automake >= 1.11.1 (AM_INIT_AUTOMAKE([1.11.1])) (or 1.10.3, Automake < 1.10.3 and 1.11 are known to be suffering from
critical security issues)
autoconf >= 2.64 (AC_PREREQ(2.64))
libtool >= 2.2.6 (LT_PREREQ([2.2.6]))
intltool >= 0.40.0 (IT_PROG_INTLTOOL([0.40.0]))
*/
---------/bin/bash: yacc: 未找到命令
make[2]: *** [../../src/mesa/program/program_parse.tab.c] 错误 127
make[2]:正在离开目录 `/root/桌面/Mesa-10.3.5/src/mesa'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/root/桌面/Mesa-10.3.5/src'
make: *** [all-recursive] 错误 1
解决方法yacc和lex在ubuntu使用flex和bison代替,此处安装bison就是安装yacc 执行命令 : $sudo apt-get install bison $sudo apt-get
install flex

Qt配置:

  1. ./configure -prefix /usr/local/qt-5.2.1-embedded-arm-quick -release -opensource -qt-libpng -qt-libjpeg -plugin-sql-sqlite -widgets -qt-sql-sqlite -make libs -no-cups -no-nis -no-iconv -no-dbus -no-openssl -no-iconv -no-accessibility -no-javascript-jit -no-sse2 -silent -xplatform  linux-arm-gnueabi-g++  -nomake tools -nomake examples -nomake tests -qt-freetype -opengl es2  -qreal float -no-glib -strip -xinput2 -linuxfb -plugindir /usr/local/qt-5.2.1-embedded-arm-quick/plugin -qmldir /usr/local/qt-5.2.1-embedded-arm-quick/qml -importdir /usr/local/qt-5.2.1-embedded-arm-quick/imports  -L/home/work/DownLoad/Mesa/lib -I/home/work/DownLoad/Mesa/include -confirm-license "$@" -verbose
  2. make && make install
  3. qmake.conf中需要加入:QMAKE_LIBS_OPENGL_ES2 = -lglapi -lGLESv2 -lEGL
  4. 这是由于libGLESv2.so依赖于libglapi.so,可以用arm-none-linux-gnueabi-ld查看关系库的依赖关系。Mesa交叉编译的时候如果没有 --enable-shared-glapi,则会报如下错误:
  5. libGLESv2.so: undefined reference to '_glapi_get_dispatch'
  6. libGLESv2.so: undefined reference to'_glapi_Dispatch'

XLib所有源码下载地址:

  1. http://cgit.freedesktop.org/xorg/

http://cgit.freedesktop.org/xorg/

ubuntu 命令行批量下载: wget -r -np -nd ftp://mirrors.go-part.com/xorg/X11R7.7/

记录LibX11-1.3.2的配置如下:

  1. echo enable_malloc0returnsnull=yes>arm-linux.cache

这一句是为了保证可以交叉编译,不然交叉编译的时候test是不会过的,会报如下错误:

checking whether malloc(0) returns NULL... configure: error: in `/home/work/DownLoad/libX11-1.3.2':
configure: error: cannot run test program while cross compiling

这是由于xlib在使用--host=arm-linux的时候禁止交叉编译。解决方法为从congfirue中找到报错的那一句,查看具有+set的那一句脚本,例如本例中为:

  1. vim configure
  2. 查找checking whether malloc(0) returns Null...这一句,得到以下信息
  3. # Check whether --enable-malloc0returnsnull was given.
  4. if test "${enable_malloc0returnsnull+set}" = set; then
  5. enableval=$enable_malloc0returnsnull; MALLOC_ZERO_RETURNS_NULL=$enableval
  6. else
  7. MALLOC_ZERO_RETURNS_NULL=auto
  8. fi
  9. { $as_echo "$as_me:$LINENO: checking whether malloc(0) returns NULL" >&5
  10. $as_echo_n "<span style="color:#FF0000;">checking whether malloc(0) returns NULL... " >&6; }
  11. if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
  12. if test "$cross_compiling" = yes; then
  13. { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
  14. $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  15. { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
  16. See \`config.log' for more details." >&5
  17. $as_echo "$as_me: error: cannot run test program while cross compiling
  18. See \`config.log' for more details." >&2;}

由于他是在if test "${enable_malloc0returnsnull+set}" = set;

  1. make clean && make distclean
  2. rm -rf arm-linux.cache
  3. echo enable_malloc0returnsnull=yes>arm-linux.cache
  4. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/ --disable-xf86bigfont --host=arm-linux --target=arm-linux  CFLAGS="-I/home/work/DownLoad/libX11/include -I/home/work/DownLoad/libX11/libxcb/include -L/home/work/DownLoad/libX11/lib -L/home/work/DownLoad/libX11/libxcb/lib" --includedir=/home/work/DownLoad/libX11/include XPROTO_LIBS=/home/work/DownLoad/libX11/lib --cache-file=arm-linux.cache
  5. make && make install
  1. CFLAGS="-I/home/work/DownLoad/libX11/include -L/home/work/DownLoad/libX11/lib",这句制定xPorto的路径,因为需要用到xProto中的x.h

交叉编译X11需要交叉编译Xproto(版本xproto-7.0.17):

Xporto下载地址:

  1. http://cgit.freedesktop.org/xorg/proto/xproto/
  2. configXproto.sh如下:
  1. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/ --host=arm-linux --target=arm-linux
  2. make && make install

由于需要用到Xtrans.h,故而需要下载xtrans,下载地址为:

  1. http://www.x.org/releases/X11R7.5/src/lib/

我所选的版本为:xtrans-1.2.5

交叉编译和上面的类似

  1. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/ --host=arm-linux --target=arm-linux --cache-file=arm-linux.cache
  2. make && make install

由于报错XKB.c:36:37: fatal error: X11/extensions/XKBproto.h: No such file or directory,故而还需要用到kbproto-1.0.6

kbproto-1.0.6下载地址:

  1. http://cgit.freedesktop.org/xorg/proto/kbproto/

kbproto-1.0.6交叉编译和上面的类似:

  1. make clean && make distclean
  2. rm -rf configure
  3. ./autogen.sh
  4. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/kbproto --host=arm-linux --target=arm-linux
  5. make && make install

需要XI.h,需要下载inputproto-2.1.99.6,下载地址为:

  1. http://cgit.freedesktop.org/xorg/proto/inputproto/

iputProto-2.1.99.6交叉编译和上面类似

  1. make clean && make distclean
  2. rm -rf configure
  3. ./autogen.sh
  4. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/inputporto/ --host=arm-linux --target=arm-linux

错误:../include/X11/Xlib-xcb.h:7:21: fatal error: xcb/xcb.h: No such file or directory
需要下载libXcb,下载地址

  1. http://xcb.freedesktop.org/dist/

libxcb-1.8.1交叉编译如下:

  1. export PKG_CONFIG_PATH=/home/work/DownLoad/libX11/xcbproto/lib/pkgconfig
  2. make clean && make distclean
  3. rm -rf arm-linux.cache
  4. echo ac_cv_path_XSLTPROC=/home/work/DownLoad/libX11/libxslt/bin > arm-linux.cache
  5. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/libxcb/ CFLAGS="-I/home/work/DownLoad/libX11/libxslt/include -I/home/work/DownLoad/libX11/LibXau/include -I/home/work/DownLoad/libX11/include -L/home/work/DownLoad/libX11/libxslt/lib -L/home/work/DownLoad/libX11/LibXau/lib" --host=arm-linux --target=arm-linux --cache-file=arm-linux.cache
  6. 错误信息:configure: error: XCB requires xsltproc

下载xsltproc,下载地址:

  1. https://git.gnome.org/browse/libxslt/
  2. <pre name="code" class="html">CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --with-libxml-libs-prefix=/home/work/DownLoad/libX11/libxml2/lib --with-libxml-include-prefix=/home/work/DownLoad/libX11/include/libxml2/libxml/ --prefix=/home/work/DownLoad/libX11/libxslt/ --host=arm-linux --target=arm-linux

如果已经交叉编译并且已经指定libxml2的路径,然而还是找不到libxml2,可以将在congfigure中手动指出xml的路径
LIBXML_CONFIG_PREFIX="/home/work/DownLoad/libX11/libxml2"

xsltproc需要下载libxml,下载地址:

  1. ftp://xmlsoft.org/libxml2/
  2. 交叉编译和上面的类似
  3. xcb需要xcb-proto,下载地址:http://xcb.freedesktop.org/dist/
  4. xcb-proto-1.7交叉编译如下:
  5. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/xcbproto/ --host=arm-linux --target=arm-linux
  6. make && make install
  7. xcb需要libxau,下载地址:http://cgit.freedesktop.org/xorg/lib/libXau/
  8. libXau-1.0.7交叉编译:
  9. make clean && make distclean
  10. rm -rf configure
  11. ./autogen.sh
  12. CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-g++ ./configure --prefix=/home/work/DownLoad/libX11/LibXau/ --host=arm-linux --target=arm-linux CFLAGS="-I/home/work/DownLoad/libX11/include"
  13. make && make instal

附录一下交叉编译成功后的lib库的下载地址,用以以后下载使用:

http://download.csdn.net/detail/mkndg/7738667

交叉编译Mesa,X11lib,Qt opengl的更多相关文章

  1. Qt OpenGL三维绘图

     简介 OpenGL是为三维绘图提供的标准应用编程接口. OpenGL处理的仅仅是三维绘图方面,而很少或是根本不提供图形用户界面编程方面的支持.OpenGL*应用程序的用户界面必须由其它工具包创建,比 ...

  2. QT OpenGL中文教程在QT4版本后的错误代码更改(一)

    由于教程中说的已经够可以了,这里就不对代码进行分析了,有兴趣可以自己去看看.这个教程来源于原来的NeHeOpenGL中文教程 (http://www.yakergong.net/nehe/) ,但其有 ...

  3. ubuntu下配置qt+opengl+opencv

    原地址:http://www.cnblogs.com/aleny-liu/archive/2011/12/16/aleny-Qtnote1.html http://blog.csdn.net/jdh9 ...

  4. 【原创】基于ZYNQ7000的交叉编译工具链Qt+OpenCV+ffmpeg等库支持总结(二)

    承接上文http://www.cnblogs.com/bombe1013/p/3294301.html,我们接下来说说Qt的移植与安装. 很喜欢Qt这个库以及Qt creater这个IDE,其实个人觉 ...

  5. Qt OpenGL 鼠标拾取实现

    在之前的文章中讲到了OpenGL鼠标拾取操作的例子,工作中需要在Qt中实现,下面的程序演示了QT中opengl的拾取例子. 本例子在Qt5.12和Qt Creator4.8.0上测试,使用的是QOpe ...

  6. QT OpenGL绘制三维图形(立方体、圆柱体、圆锥、球体、圆环等等)

    本文使用QGLWidget来绘制各种三维基本图形,包括立方体.圆柱体.圆锥.球体.圆环等等,涉及包括基本绘制以及上色.纹理.旋转等操作. 使用的软件版本:QT5.12 + QT Creater4.8. ...

  7. 初探 Qt Opengl【2】

    最近在研究QOPengl QGraphicsView QGraphicsItemQGraphicsScene不过也只是皮毛,也不是做什么技术贴,就是记录一下自己在其中遇到的问题,和自己新学到的东西. ...

  8. 初探Qt Opengl【1】

    最近一直在学习Qt的opengl绘图,看到好多资源都是关于以前的旧版本的, 我将我这几天学的的部分关于opengl的做个总结,也希望对需要学习的人有一定的帮助 在我的学习中,我主要用到一下三个方法 # ...

  9. 45.Qt openGL实现三维绘图

    main.cpp #include <QApplication> #include <iostream> #include "tetraheadron.h" ...

随机推荐

  1. Hibernate生成器类

    在Hibernate中,id元素的<generator>子元素用于生成持久化类的对象的唯一标识符. Hibernate框架中定义了许多生成器类. 所有的生成器类都实现了org.hibern ...

  2. jQuery CSS 操作函数

    CSS 属性 描述 css() 设置或返回匹配元素的样式属性. height() 设置或返回匹配元素的高度. offset() 返回第一个匹配元素相对于文档的位置. offsetParent() 返回 ...

  3. Eclipse 浏览(Navigate)菜单

    浏览 Eclipse 工作空间 浏览(Navigate)菜单提供了多个菜单可以让你快速定位到指定资源. 上图中 Open Type, Open Type in Hierarchy 和 Open Res ...

  4. linq to sql 动态构建查询表达式树

    通过Expression类进行动态构造lamda表达式. 实现了以下几种类型,好了代码说话: public Expression<Func<T, bool>> GetAndLa ...

  5. ng-model ng-show

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. go反射----1类型

    声明:文章内容取自雨痕老师<Go语言学习笔记> 反射( reflect )让我们能在运行期探知对象的类型信息和内存结构,这从一定程度上弥补了静态语言在动态行为上的不足.同时,反射还是元编程 ...

  7. jprofiler_监控远程linux服务器的JVM进程(转 非常棒)

    几天前写了一篇文章,jprofiler_监控远程linux服务器的tomcat进程(实践),介绍了使用jprofiler怎样监控远程linux的tomcat进程,这两天想了想,除了可以监控tomcat ...

  8. Android开发:fragment将事件传递回activity

    fragment触发事件后传递会给activity,可以通过在fragment中定义一个接口,让activity实现这个接口. 具体代码如下 public class AAFragment exten ...

  9. (三)Solrj4到Solrj5的升级之路

    (三)Solrj4到Solrj5的升级之路 Solr5发布了,带来了许多激动人心的新特性,但Solrj的许多接口也发生了变化,升级是痛苦的,但也是必须的,下面就赶紧来看看有哪些代码需要升级吧. 变化1 ...

  10. JavaScript基础深入之

    JS的数值类型是分为两类:基本数据类型和引用数据类型. 基本类型占据的内存栈空间,引用类型被保存在堆空间.引用类型赋值的变量也是被保存在栈空间的,它的作用类似于电视遥控器,负责操作堆空间内指向的对象. ...