移植环境 Utuntu 15.04

1、mplayer移植

版本:mplayer-export-snapshot.tar.bz2 /mplayer-export-2015-11-26

Linux PC 平台: ./configure && make && make install

依赖软件:yasm

2、yasm移植

版本:yasm-1.3.0

Linux PC 平台: ./configure && make && make install

mipsel平台:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1、QT 编译
版本 qt-embedded-linux-opensource-src-4.5.3

mips和mipsel的区别
mips是big-endian的mips架构
mipsel是little-endian的mips架构。
他们之间的区别就是内存中存放的数据的字节顺序相反,也就是把低位放在低地址还是高地址。

./configure --prefix=/opt/mipsel/qtopia -opensource -release -shared -Declarative -fast -no-largefile -qt-sql-sqlite -qt3support -exceptions -xmlpatterns -no-glib -no-phonon -no-mmx -no-3dnow -no-sse -no-sse2 -svg -no-webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libjpeg -make libs -make tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -iconv -no-dbus -xplatform qws/linux-mips-g++ -embedded mipsel -little-endian -qt-freetype -depths 16,24,32 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -no-armfpa -DQT_QLOCALE_USES_FCVT -DQT_NO_QWS_CURSOR -no-pch -I/opt/mipsel/tslib/include -L/opt/mipsel/tslib/lib -confirm-license

./configure -embedded mips -little-endian -xplatform qws/linux-mips-g++ -prefix /opt/mipsel/qtopia -release -opensource -confirm-license -webkit -qt-zlib -qt-libpng -qt-libjpeg -qt-gif -I/opt/mipsel/tslib/include -L/opt/mipsel/tslib/lib -no-qt3support -make libs -nomake examples -nomake demos -no-phonon -no-phonon-backend -no-accessibility -no-scripttools

./configure -embedded mips -little-endian -xplatform qws/linux-mips-g++ -prefix /opt/mipsel/qtopia -release -opensource -confirm-license -webkit -qt-zlib -qt-libpng -qt-libjpeg -qt-gif -I/opt/mipsel/tslib/include -L/opt/mipsel/tslib/lib -no-qt3support -shared -make libs -nomake examples -nomake demos -no-phonon -no-phonon-backend -no-accessibility -no-scripttools

./configure -xplatform qws/linux-mips-g++ -prefix /opt/mipsel/qtopia -I/opt/mipsel/tslib/include -L/opt/mipsel/tslib/lib -embedded mips -little-endian -release -opensource -shared -fast -make libs -confirm-license -nomake examples -nomake demos -no-webkit -qt-zlib -qt-libpng -qt-libjpeg -no-qt3support -no-phonon -no-phonon-backend -no-accessibility -no-scripttools -no-largefile -no-exceptions -no-accessibility -no-xmlpatterns -no-phonon -no-phonon-backend -no-svg -no-gif -no-libtiff -no-openssl -no-nis -no-opengl -no-cups -no-dbus

2、mplayer编译

版本:mplayer1.0rc2

修改libvo/video_out.c添加
#ifdef HAVE_IVTV
extern vo_functions_t video_out_ivtv;
#endif

X86# ./configure --disable-gui --disable-ivtv
MIPS# ./configure --enable-cross-compile --prefix=/opt/mipsel/mplayer/ --target=mips-linux --cc=mipsel-linux-gcc --as=mipsel-linux-as --ar=mipsel-linux-ar --host-cc=gcc --disable-gui --disable-ivtv

tar -zxvf ./text.tar.gz -C /home/app/test/

3、libmad编译

4、qt-x11编译

版本:qt-x11-opensource-src-4.5.3

修改qpnghandle.cpp
#include <libpng/png.h>

error :'adoptref' was not declared in this scope, and no declarations were found by.....如上图所示。
解决方法:找到qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/JavaScriptCore/wtf/RefPtr.h在文件头部加入如下代码:
#include "PassRefPtr.h"

error: 'prepareComparison' was not declared in this scope, and no declarations were found by.....如上图所示。
解决方法:
找到qt-x11-opensource-src-4.5.3/src/xmlpatterns目录下的Makefile文件,在该文件的CXXFLAGS 后面加入:
-fpermissive

error :'erase' was not declared in this scope, and no declarations were found by....如上图所示。
解决方法:找到 qt-x11-opensource-src-4.5.3/src/corelib/tools/qmap.h文件的996行的24列,将erase改为this->erase

error :'getCachedDOMConstructor' was not declared in this scope, and no declarations were found by.....如上图所示。
解决方法:src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h
添加
JSC::JSObject* getCachedDOMConstructor(JSC::ExecState*, const JSC::ClassInfo*);
void cacheDOMConstructor(JSC::ExecState*, const JSC::ClassInfo*, JSC::JSObject* constructor);

error :'insert' was not declared in this scope, and no declarations were found by.....如上图所示。
解决方法:找到 qt-x11-opensource-src-4.5.3/tools/porting/src/codemodel.h文件的99行的50列,将 insert 改为this->insert

X86# ./configure && make

连接第三方库文件出现undefined symbol '__gxx_personality_v0@@CXXABI_1.3' 添加 -lstdc++

undefined reference to symbol 'sincosf@@GLIBC_2.2.5' 添加 -lm

开发时,设置LIBRARY_PATH,以便gcc能够找到编译时需要的动态链接库。
发布时,设置LD_LIBRARY_PATH,以便程序加载运行时能够自动找到需要的动态链接库。

QT编译工程:
切换到工程目录
1、qmake -project 生成后缀名为*.pro的文件
2、qmake *.pro生成 Makefile
3、修改Makefile相应地方为 -rpath,/usr/local/lib否则会有段错误(仅对PC版本)
注意:qmake要根据需要选择PC还是嵌入式版本

4、wxWidgets-3.0.2编译
X86: 创建amd64目录,切换到此目录 ../configure && make 即可, 编译完后切换到 samples目录 make 编译例子
mipsel:../configure --host=mipsel-linux --prefix=/opt/mipsel/wxWidgets

export CFLAGS="-I/home/wxX11/wxX11-arm/include"
export CXXFLAGS="-I/home/wxX11/wxX11-arm/include"
export LDFLAGS="-L/home/wxX11/wxX11-arm/lib"
export CPPFLAGS="-I/home/wxX11/wxX11-arm/include"

export LIBRARY_PATH=/opt/mipsel/usr/lib:/opt/mipsel/usr/libc/lib:/opt/mipsel/usr/libc/uclibc/lib &&
export LD_LIBRARY_PATH=/opt/mipsel/usr/lib:/opt/mipsel/usr/libc/lib:/opt/mipsel/usr/libc/uclibc/lib &&
export C_INCLUDE_PATH=/opt/mipsel/usr/libc/uclibc/usr/include &&
export CPLUS_INCLUDE_PATH=/opt/mipsel/usr/include/c++/4.7.2

../configure --host=mipsel-linux --prefix=/opt/mipsel/wxWidgets --with-x11 --without-subdirs --enable-no_rtti --enable-no_exceptions --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --disable-shared

替换/usr/include /usr/local/include为相应目录
../src/stc/scintilla/lexlib/LexerNoExceptions.cxx:34:11: error: exception handling disabled, use -fexceptions to enable
Makefile:16841: recipe for target 'wxscintilla_LexerNoExceptions.o' failed
make: *** [wxscintilla_LexerNoExceptions.o] Error 1
CXXFLAGS 加-fexceptions

src/unix/displayx11.cpp修改
#include <X11/extensions/xinerama.h>

5、编译libX11
libX11-1.5.0

./configure --prefix=/opt/mipsel/libX11 --build=i686-pc-linux-gnu --host=mipsel-linux --with-freetype-config=/opt/mipsel/freetype/bin/freetype-config --with-expat-lib=/opt/mipsel/libX11/lib --with-expat-includes=/opt/mipsel/libX11/include

Linux之开源软件移植的更多相关文章

  1. Linux和开源已经在2013年开始悄悄主宰世界?

    提到Linux,很多人觉得它依旧不温不火,实际上在这个即将过去的一年,Linux和开源软件已经悄悄主宰了计算领域的各方面,这具体表现在开源项目遍地、Chromebook崛起、SteamOS备受瞩目、A ...

  2. 2014年:Linux和开源的福祸之年

    (1)Heartbleed漏洞 Heartbleed漏洞,是今年开源软件曝出的最大糗事.Heartbleed漏洞是OpenSSL的重大漏洞,这项严重缺陷(CVE-2014-0160)的产生是由于未能在 ...

  3. 做10年Windows程序员与做10年Linux程序员的区别(附无数评论)(开源软件相当于熟读唐诗三百首,不会作诗也会吟)

    如果一个程序员从来没有在linux,unix下开发过程序,一直在windows下面开发程序, 同样是工作10年, 大部分情况下与在linux,unix下面开发10年的程序员水平会差别很大.我写这篇文章 ...

  4. 开源软件实践之linux高性能服务器编程框架和选型

    很多人学习编程技术一般都通过一本编程语言的入门书籍,然后尝试做一些例子和小项目.但是这些都不能让我们深入的学习很多的编程技巧和高深技术,当然这个时候很多有经验的学习人员就会告诉大家,找一个好的开源软件 ...

  5. GIS开源软件大全

    3 - F 3map:行星地球项目由3map驱动,这是一个自由软件,由Telstra宽带基金会创建并支持,提供客户端与服务器的能力以在线再现虚拟地球. Amein!:其界面介于ArcMap和UMN M ...

  6. GNU/Linux与开源文化的那些人和事

     一.计算机的发明 世上本无路,走的人多了,就有了路.世上本无计算机,琢磨的人多了--没有计算机,一切无从谈起. 三个人对计算机的发明功不可没,居功至伟.阿兰·图灵(Alan Mathison Tur ...

  7. [转帖]GNU/Linux与开源文化的那些人和事

    GNU/Linux与开源文化的那些人和事 时间:2015-09-24   作者:admin 分类:新手入门 阅读:167次 http://embeddedlinux.org.cn/emb-linux/ ...

  8. 2014 年最热门的国人开发开源软件 TOP 100 - 开源中国社区

    不知道从什么时候开始,很多一说起国产好像就非常愤慨,其实大可不必.做开源中国六年有余,这六年时间国内的开源蓬勃发展,从一开始的使用到贡献,到推出自己很多的开源软件,而且还有很多软件被国外的认可.中国是 ...

  9. 2014 年最热门的国人开发开源软件TOP 100

    不知道从什么时候开始,很多一说起国产好像就非常愤慨,其实大可不必.做开源中国六年有余,这六年时间国内的开源蓬勃发展,从一开始的使用到贡献,到推出自己很多的开源软件,而且还有很多软件被国外认可.中国是开 ...

随机推荐

  1. 【JDBC&Dbutils】JDBC&JDBC连接池&DBUtils使用方法(重要)

    -----------------------JDBC---------- 0.      db.properties文件 driver=com.mysql.jdbc.Driver url=jdbc: ...

  2. VS2010 MFC对话框程序用CButtonST给按钮添加图标

    也许是VS版本的关系,CButtonST中的BCMenu两个文件是无法编译通过的.   1.拷贝下载的CButtonST(我下载的v3.9)中的BtnST.h和BtnST.cpp文件到自己项目目录下. ...

  3. 2018.08.29 NOIP模拟 table(拓扑排序+建图优化)

    [描述] 给出一个表格,N 行 M 列,每个格子有一个整数,有些格子是空的.现在需要你 来做出一些调整,使得每行都是非降序的.这个调整只能是整列的移动. [输入] 第一行两个正整数 N 和 M. 接下 ...

  4. 在windows7下创建ftp服务站点

    1.开始->控制面板->程序(点击“卸载程序”)->启动或关闭windows功能->Internet Information Services(Internet信息服务)-&g ...

  5. fortran write格式

    advance="no",就是输出不换行. write(*,"(f10.1)",advance="no")A 格式化输出的控制字符非常的丰富 ...

  6. java.lang.ExceptionInInitializerError Caused by: org.hibernate.InvalidMappingException: Unable to read XML

    此错误是说无法读取你的xml文档,于是我们就该去更改xml文档,因为我是自动生成的,所以我找了一份之前手写的,发现是dtd错了,把之前的dtd拷贝过来之后程序就测试通过了

  7. Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource Caused by: org.hibernate.DuplicateMappingException: duplicate import: Person refers to both cn.itcast.

    此错误是说有两个相同的名字的配置文件,所以不知道查找哪个.解决方法就是把不需要的那个配置文件删除. 删除mapping中不需要的那个xml文件即可

  8. UVa 11292 Dragon of Loowater (水题,排序)

    题意:有n个条龙,在雇佣勇士去杀,每个勇士能力值为x,只能杀死头的直径y小于或等于自己能力值的龙,只能被雇佣一次,并且你要给x赏金,求最少的赏金. 析:很简单么,很明显,能力值高的杀直径大的,低的杀直 ...

  9. Python调用Google翻译

    出自:http://blog.csdn.net/zhaoyl03/article/details/8830806 最近想动手做一个文档自动下载器,需要模拟浏览器的行为.虽然感觉思路上没有困难,但在技术 ...

  10. 对于java的命名规范(标识符)

    java的命名规范基本都需要使用标识符来命名的: 标识符的介绍: 标识符作用: 给变量起名字的用的. 标识符的组成: 1.Unicode编码:包含大.小写字母,数字,汉字(不建议使用).  2.美元符 ...