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
不知道从什么时候开始,很多一说起国产好像就非常愤慨,其实大可不必.做开源中国六年有余,这六年时间国内的开源蓬勃发展,从一开始的使用到贡献,到推出自己很多的开源软件,而且还有很多软件被国外认可.中国是开 ...
随机推荐
- AE教程:学会这个,你做的Logo就可以单独出道了
一.确定所需要做的动效 1.制作logo背景形状动效 2.制作U的动效 3.制作I的动效 4.制作消失动效 二.制作logo背景形状动效1.”合成 - 新建合成“ 新建一个1000*800的合成 2. ...
- Mockplus 3.2前瞻,五大特色功能让你惊喜!
在这个火热的夏季,我们有理由热切期待Mockplus 3.2的发布! 作为国产的一流原型设计工具,Mockplus 3.2版本会给我们带来什么呢? 格子(Repeater) 我们平常的设计,有大量需要 ...
- extjs 学习一
环境 : eclipse ext tomcat 6 将下载的extjs 解压后全部 导入到项目中 .使用时 <!-- 1.引入样式 2.引入库文件 ,底层驱动 3. ext-all--&g ...
- TextView等组件的LayoutParams不能随便用,不然组件不显示
TableLayout.LayoutParams lpRow = new TableLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTEN ...
- centos7 jenkins安装和使用
jenkins 安装和使用 1.先安装jdK1.8 和 maven 此步骤省略 2.进入jenkisn 官网 下载https://jenkins.io/download/ Long-term Supp ...
- hdu-2159(完全背包)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2159 思路:完全背包,但有次数的限制,因此,对次数进行dp,判断次数是否超限. #include< ...
- BaseAdapter
作者通过Java代码来实现布局,而我习惯通过.xml文件来实现,所以我对程序做了如下修改 MainActivity.java public class MainActivity extends Act ...
- Perf -- Linux下的系统性能调优工具,第 1 部分
Perf 简介 Perf 是用来进行软件性能分析的工具. 通过它,应用程序可以利用 PMU,tracepoint 和内核中的特殊计数器来进行性能统计.它不但可以分析指定应用程序的性能问题 (per t ...
- 解决 multiple definition of
总结了解决multiple definition of的方法: 问题原因: 当多个文件包含同一个头文件时,并且你的.H里面没有加上条件编译#ifndef TEST_H#define TEST_H ...
- Failed to get D-Bus connection: Operation not permitted
通过centos7镜像创建了一个docker容器,并在容器中安装了一个apache服务,但是启动时发生如下报错 [root@1346963c2247 ~]# rpm -qa | grep httpdh ...