Common open source software porting notes

Source: Internet
Author: User
Tags builtin wxwidgets

Porting Environment Utuntu 15.04

1. MPlayer Transplant

Version: Mplayer-export-snapshot.tar.bz2/mplayer-export-2015-11-26

Linux PC platform:./configure && make && make install

Dependent software: Yasm

2. Yasm Transplant

Version: yasm-1.3.0

Linux PC platform:./configure && make && make install

Mipsel Platform:

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

1. QT Compilation
Version qt-embedded-linux-opensource-src-4.5.3

The difference between MIPS and Mipsel
MIPS is the MIPS architecture of Big-endian
Mipsel is the MIPS architecture of Little-endian.
The difference between them is that the byte order of the data stored in the memory is reversed, which is to put the low address or high address.

./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-scrip Ttools

./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 compilation

Version: Mplayer1.0rc2

Modify LIBVO/VIDEO_OUT.C Add
#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 Compilation

4. QT-X11 compilation

Version: qt-x11-opensource-src-4.5.3

Modify Qpnghandle.cpp
#include <libpng/png.h>

Error: ' Adoptref ' is not declared in this scope, and no declarations were found by ..... As shown in.
Workaround: Locate Qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/webcore/javascriptcore/wtf/refptr.h in the file header by adding the following code:
#include "PassRefPtr.h"

Error: ' Preparecomparison ' is not declared in this scope, and no declarations were found by ..... As shown in.
Workaround:
Locate the makefile file under the Qt-x11-opensource-src-4.5.3/src/xmlpatterns directory, and then add the following cxxflags to the file:
-fpermissive

Error: ' Erase ' is not declared in this scope, and no declarations were found by .... As shown in.
Workaround: Locate the 24 column in the 996 row of the Qt-x11-opensource-src-4.5.3/src/corelib/tools/qmap.h file, and change the erase to This->erase

Error: ' Getcacheddomconstructor ' is not declared in this scope, and no declarations were found by ..... As shown in.
Workaround: Src/3rdparty/webkit/webcore/bindings/js/jsdomglobalobject.h
Add to
jsc::jsobject* Getcacheddomconstructor (jsc::execstate*, const jsc::classinfo*);
void Cachedomconstructor (jsc::execstate*, const jsc::classinfo*, jsc::jsobject* constructor);

Error: ' Insert ' is not declared in this scope, and no declarations were found by ..... As shown in.
Workaround: Locate the 50 column in the 99 row of the Qt-x11-opensource-src-4.5.3/tools/porting/src/codemodel.h file and change the insert to This->insert

x86#./configure && Make

Connecting to a third-party library file appears undefined symbol ' [email protected] @CXXABI_1.3 ' Add-lstdc++

Undefined reference to symbol ' [email protected] @GLIBC_2.2.5 ' Add-LM

At development time, set the Library_path so that GCC can find the dynamic link libraries needed at compile time.
When publishing, set Ld_library_path so that the program loads the runtime to automatically find the required dynamic-link libraries.

QT Compilation Project:
Switch to the project catalog
1. Qmake-project generates a file with the suffix named *.pro
2, Qmake *.pro generation Makefile
3, modify makefile corresponding place for-rpath,/usr/local/lib otherwise there will be a paragraph error (PC version only)
Note: Qmake to choose the PC or the embedded version as needed

4. wxWidgets-3.0.2 compilation
X86: Create AMD64 directory, switch to this directory ... /configure && make, switch to samples directory after compiling the make compile example
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

Replace/usr/include/usr/local/include with the corresponding directory
.. /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 Plus-fexceptions

Src/unix/displayx11.cpp modification
#include <X11/extensions/xinerama.h>

5. Compiling 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

Common open source software porting notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.