Linux之开源软件移植
移植环境 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之开源软件移植的更多相关文章
- Linux和开源已经在2013年开始悄悄主宰世界?
提到Linux,很多人觉得它依旧不温不火,实际上在这个即将过去的一年,Linux和开源软件已经悄悄主宰了计算领域的各方面,这具体表现在开源项目遍地、Chromebook崛起、SteamOS备受瞩目、A ...
- 2014年:Linux和开源的福祸之年
(1)Heartbleed漏洞 Heartbleed漏洞,是今年开源软件曝出的最大糗事.Heartbleed漏洞是OpenSSL的重大漏洞,这项严重缺陷(CVE-2014-0160)的产生是由于未能在 ...
- 做10年Windows程序员与做10年Linux程序员的区别(附无数评论)(开源软件相当于熟读唐诗三百首,不会作诗也会吟)
如果一个程序员从来没有在linux,unix下开发过程序,一直在windows下面开发程序, 同样是工作10年, 大部分情况下与在linux,unix下面开发10年的程序员水平会差别很大.我写这篇文章 ...
- 开源软件实践之linux高性能服务器编程框架和选型
很多人学习编程技术一般都通过一本编程语言的入门书籍,然后尝试做一些例子和小项目.但是这些都不能让我们深入的学习很多的编程技巧和高深技术,当然这个时候很多有经验的学习人员就会告诉大家,找一个好的开源软件 ...
- GIS开源软件大全
3 - F 3map:行星地球项目由3map驱动,这是一个自由软件,由Telstra宽带基金会创建并支持,提供客户端与服务器的能力以在线再现虚拟地球. Amein!:其界面介于ArcMap和UMN M ...
- GNU/Linux与开源文化的那些人和事
一.计算机的发明 世上本无路,走的人多了,就有了路.世上本无计算机,琢磨的人多了--没有计算机,一切无从谈起. 三个人对计算机的发明功不可没,居功至伟.阿兰·图灵(Alan Mathison Tur ...
- [转帖]GNU/Linux与开源文化的那些人和事
GNU/Linux与开源文化的那些人和事 时间:2015-09-24 作者:admin 分类:新手入门 阅读:167次 http://embeddedlinux.org.cn/emb-linux/ ...
- 2014 年最热门的国人开发开源软件 TOP 100 - 开源中国社区
不知道从什么时候开始,很多一说起国产好像就非常愤慨,其实大可不必.做开源中国六年有余,这六年时间国内的开源蓬勃发展,从一开始的使用到贡献,到推出自己很多的开源软件,而且还有很多软件被国外的认可.中国是 ...
- 2014 年最热门的国人开发开源软件TOP 100
不知道从什么时候开始,很多一说起国产好像就非常愤慨,其实大可不必.做开源中国六年有余,这六年时间国内的开源蓬勃发展,从一开始的使用到贡献,到推出自己很多的开源软件,而且还有很多软件被国外认可.中国是开 ...
随机推荐
- 另辟蹊径:vue单页面,多路由,前进刷新,后退不刷新
目的:vue-cli构建的vue单页面应用,某些特定的页面,实现前进刷新,后退不刷新,类似app般的用户体验.注: 此处的刷新特指当进入此页面时,触发ajax请求,向服务器获取数据.不刷新特指当进入此 ...
- jquery插件解读之tabs
先上代码,符简略关键性说明: /** * jQuery EasyUI 1.4.1 * * Copyright (c) 2009-2014 www.jeasyui.com. All rights re ...
- 2018.09.27 网络协议(tarjan)
描述 一些学校连接在一个计算机网络上.学校之间存在软件支援协议.每个学校都有它应支援的学校名单(学校 a 支援学校 b ,并不表示学校 b 一定支援学校 a ).当某校获得一个新软件时,无论是直接得到 ...
- 2018.08.30 NOIP模拟 graph(dfs序/树剖+线段树)
[描述] 给你一个图,一共有 N 个点,2*N-2 条有向边. 边目录按两部分给出 1. 开始的 n-1 条边描述了一颗以 1 号点为根的生成树,即每个点都可以由 1 号点 到达. 2. 接下来的 N ...
- Fiddler实战深入研究(二)[转载]
Fiddler实战深入研究(二) 阅读目录 Fiddler不能捕获chrome的session的设置 理解数据包统计 请求重定向(AutoResponder) Composer选项卡 Filters选 ...
- java-Runtime 调用命令
java是一个跨平台的语言,可以在多种平台上运行相应的程序,但是有些时候进行数据的提取时,可能就需要系统的相关命令,尤其是调用linux命令 这时候就需要使用java的Runtime命令,来执行lin ...
- NSData与UIImage之间的转换
1 //NSData转换为UIImage 2 NSData *imageData = [NSData dataWithContentsOfFile: imagePath]; 3 UIImage *im ...
- noip第8课作业
1. 计算书费 [问题描述]下面是一个图书的单价表: 计算概论 28.9 元/本 数据结构与算法 32.7 元/本 数字逻辑 45.6元/本 C++程序设计教程 78 元/本 人工智能 35 ...
- RepositionBars的用法和参数的意义(引用别人的)
MFC窗口位置管理详细分析及实例 在一般用MFC编写的程序的窗口客户区中,可能有好几个子窗口(具有WM_CHILD风格的窗口).上边是工具栏,中间是视图窗口,下边是状态栏.三个窗 口在框架的客户区里和 ...
- Zend Studio 安装破解和汉化
1.下载文件. 2.默认安装Zend Studio. 3.替换安装目录下plugins下的com.zend.verifier_12.5.1.v20150514-2003.jar文件 4.打开Zend ...