移植环境 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. 数据库链接 mybatis spring data jpa 两种方式

    jdbc mybatis                     spring data jpa dao service webservice jaxrs     jaxws  springmvc w ...

  2. part1:7-Linux网络配置

    1.虚拟机(Vmware)网络配置 VMware虚拟机对于不同的网络环境提供了三种网卡工作模式: Bridged:网桥模式: 在桥接模式下,计算机A充当路由器与虚拟机之间的“桥”,虚拟机通过计算机A的 ...

  3. css3新增功能

    CSS3新增功能 1 CSS3选择器详解 1.1 基础选择器 通配选择器* 元素选择器E ID选择器#id CLASS选择器.class 群组选择器select1,selectN 1.2 层次选择器 ...

  4. 2018.10.14 loj#6003. 「网络流 24 题」魔术球(最大流)

    传送门 网络流好题. 这道题可以动态建图. 不难想到把每个球iii都拆点成i1i_1i1​和i2i_2i2​,每次连边(s,i1),(i2,t)(s,i_1),(i_2,t)(s,i1​),(i2​, ...

  5. 2018.10.12 NOIP训练 01 串(倍增+hash)

    传送门 一道挺不错的倍增. 其实就是处理出每个数连向的下一个数. 由于每个点只会出去一条边,所以倍增就可以了. 开始和zxyzxyzxy口胡了一波O(n+m)O(n+m)O(n+m)假算法,后来发现如 ...

  6. 2018.09.01 poj3071Football(概率dp+二进制找规律)

    传送门 概率dp简单题. 设f[i][j]表示前i轮j获胜的概率. 如果j,k能够刚好在第i轮相遇,找规律可以发现j,k满足: (j−1)>>(i−1)" role=" ...

  7. angularjs写公共方法

    'use strict'; angular.module('fast-westone') .factory('commonUtilService', function () { return { /* ...

  8. Redis - 事务(multi,exec,watch,unwatch)

    转载自:https://blog.csdn.net/wgh1015398431/article/details/53156027:加了一些自己的注解 1.事务 1.1 概述 Redis中的事务(tra ...

  9. 大文件webuploader的基本使用

    webuploader的简单使用 需要的文件   自备  百度很多 webuploader.js  uploader.swf  jQuery <!DOCTYPE html> <htm ...

  10. (欧拉公式 很水) Coprimes -- sgu -- 1002

    链接: http://vj.acmclub.cn/contest/view.action?cid=168#problem/B Coprimes 时限:250MS     内存:4096KB     6 ...