miniGUI-4.0.2 交叉编译

miniGUI-4.0.2 for Hi3559A  CC=aarch64-himix100-linux

所需文件:
zlib-1.2.6.tar.gz
libpng-1.6.36.tar.gz
jpegsrc.v9c.tar.gz
freetype-2.6.1.tar.gz
harfbuzz-2.5.1.tar.xz
libminigui-4.0.2.tar.gz
libmgi-4.0.0.tar.gz
libmgeff-1.2.3.tar.gz
libmgutils-1.2.2.tar.gz
libmgplus-1.4.0.tar.gz
libxml2-2.9.7.tar.gz
sqlite3.30.1.tar.gz
libmgncs-1.2.4.tar.gz
minigui-res-4.0.0.tar.gz
非必须:
chipmunk-5.3.1.tar.gz
mg-tools-3.2.1.tar.gz
mg-demos-1.0.0.tar.gz
mg-samples-4.0.0.tar.gz
mg-tests-4.0.0.tar.gz
mguxdemo-4.0.0.tar.gz

1.zlib-1.2.6.tar.gz(低版本PNG编译时报Z_FIXED错)
CC=aarch64-himix100-linux-gcc CXX=aarch64-himix100-linux-g++ LD=aarch64-himix100-linux-ld ./configure --prefix=$PWD/../_install
make
make install

2.libpng-1.6.36.tar.gz
注意:
过低版本报checking host system type... Invalid configuration `aarch64-himix100-linux': machine `aarch64-himix100' not recognized 错误
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux  LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include
make
make install

3.jpegsrc.v9c.tar.gz
注意:低版本报checking host system type... Invalid configuration `aarch64-himix100-linux': machine `aarch64-himix100' not recognized 错误
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux
make
make install

4.freetype-2.6.1(编译没有harfbuzz,png,zlib的库,否则harfbuzz编译失败)
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux --enable-static --with-harfbuzz=no --with-png=no --with-zlib=no

make
make install

5.harfbuzz-2.5.1.tar.gz
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux --enable-static --enable-shared LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include
make

如果没有先编译freetype库会报错:
 GEN      libharfbuzz.la
/opt/hisi-linux/x86-arm/aarch64-himix100-linux/host_bin/../lib/gcc/aarch64-linux-gnu/6.3.0/../../../../aarch64-linux-gnu/bin/ld: cannot find -lfreetype
collect2: error: ld returned 1 exit status
没有找到freetype库
make
make install

6.libminigui-4.0.2
 ./configure --prefix=$PWD/../_install --with-runmode=ths --disable-splash --disable-jpgsupport --enable-pngsupport --with-osname=linux --with-targetname=fbcon --enable-consoleial --enable-consoleimps2 --enable-autoial  --enable-ctrltrackbar --enable-ctrlscrollbar --enable-ctrlnewtoolbar --enable-ctrlmenubtn --enable-ctrlscrollview --enable-ctrltextedit --enable-ctrlspinbox --enable-ctrlmonthcal -enable-ctrltreeview --enable-ctrllistview --enable-ctrlcoolbar --enable-ctrliconview --enable-ctrlgridview --enable-videodri=no --enable-ttfcache --with-hb-includes=$PWD/../_install/include/harfbuzz/ --with-ft2-includes=$PWD/../_install/include/freetype2 --disable-pcxvfb --host=aarch64-himix100-linux LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include

make
报错:
pe2.c: In function 'load_font_data':
freetype2.c:1098:60: error: 'FT_SFNT_OS2' undeclared (first use in this function)
         TT_OS2* tt_os2 = (TT_OS2*)FT_Get_Sfnt_Table (face, FT_SFNT_OS2);
                                                            ^~~~~~~~~~~
指定 -with-ft2-includes=$PWD/../_install/include/freetype2/没有起作用
修改 configure 第14220行,注释掉
#  with_ft2_includes=""

make
报错:
drivideo.c:62:21: fatal error: xf86drm.h: No such file or directory
 #include 
解决方式:
 没有对应驱动,去掉dri编译选项
 ./configure --prefix=$PWD/../_install --with-runmode=ths --disable-screensaver --disable-splash --disable-jpgsupport --enable-pngsupport --with-osname=linux --with-targetname=fbcon --enable-autoial --enable-videodri=no --enable-ttfcache --with-hb-includes=$PWD/../_install/include/harfbuzz/ --with-ft2-includes=$PWD/../_install/include/freetype2 --disable-pcxvfb --host=aarch64-himix100-linux LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include

make
报错:
In file included from /home/linux/minigui-4.0.2/libminigui-4.0.2/include/common.h:107:0,
                 from pcxvfb.c:55:
/usr/include/stdint.h:148:0: warning: "__INT64_C" redefined
 #  define __INT64_C(c) c ## LL
 
-in>: note: this is the location of the previous definition
In file included from /home/linux/minigui-4.0.2/libminigui-4.0.2/include/common.h:107:0,
                 from pcxvfb.c:55:
/usr/include/stdint.h:149:0: warning: "__UINT64_C" redefined
 #  define __UINT64_C(c) c ## ULL

修改src/newgal/pcxvfb/Makefile 308行,将/usr/include去掉:
INCLUDES = -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include \
-I$(abs_top_srcdir)/src/newgal/ -I/usr/include/

make
make install
运行时报错:
../lib/minigui/lib/libminigui_ths.so:对‘__hb_extern_get_unicode_funcs’未定义的引用

修改:src/font/harzbuff-minigui-funcs.c 第 150行
将
extern hb_get_unicode_funcs __hb_extern_get_unicode_funcs;
改为:
static hb_get_unicode_funcs __hb_extern_get_unicode_funcs;

7、libmgi-4.0.0(专门为minigui 4.0修改的版本)

./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ CPPFLAGS=-I$PWD/../_install/include LDFLAGS=-L$PWD/../_install/lib
make
make install

8.minigui-res-4.0.0
./configure --prefix=$PWD/../_install  --host=aarch64-himix100-linux
make
make install

9.ibmgutils-1.0.4
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ CPPFLAGS=-I$PWD/../_install/include
make
make install

10、libxml2-2.9.7
 ./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux --without-icu --without-lzma --with-zlib=no --with-python=no LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig Z_CFLAGS=-I$PWD/../_install Z_LIBS=-L$PWD/../_install/lib
make 
make install

11、sqlite-autoconf-3300100
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux
make
make install

10.libmgplus-1.4.0
./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux  LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ MINIGUI_CFLAGS=-I$PWD/../_install/include MINIGUI_LIBS=-L$PWD/../_install/lib
make
make install

12、libmgncs-1.2.4
 ./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux  LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ MINIGUI_CFLAGS=-I$PWD/../_install/include MINIGUI_LIBS=-L$PWD/../_install/lib MGUTILS_CFLAGS=-I$PWD/../_install/include MGUTILS_LIBS=-L$PWD/../_install/lib MGPLUS_CFLAGS=-I$PWD/../_install/include MGPLUS_LIBS=-L$PWD/../_install/lib
make
报错:
mxmlds.c:27:25: fatal error: libxml/tree.h: No such file or directory
 #include 
                         ^
解决方式:
修改configure文件第 10706行:
将:
 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" 
改为:
CPPFLAGS="$CPPFLAGS $CPPFLAGS/libxml2"     

make
make install

13.libmgeff-1.2.3(从github下载的源码)
 ./configure --prefix=$PWD/../_install --host=aarch64-himix100-linux LIBS=-L$PWD/../_install/lib CPPFLAGS=-I$PWD/../_install/include CFLAGS=-I$PWD/../_install/include PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ MINIGUI_CFLAGS=-I$PWD/../_install/include MINIGUI_LIBS=-L$PWD/../_install/lib MGPLUS_CFLAGS=-I$PWD/../_install/include MGPLUS_LIBS=-L$PWD/../_install/lib
make
make install

10、mg-samples-4.0.0
./configure --host=aarch64-himix100-linux  --prefix=$PWD/../_install PKG_CONFIG_PATH=$PWD/../_install/lib/pkgconfig/ CPPFLAGS=-I$PWD/../_install/include
make
报错:
make[1]: 正在进入目录 `/home/linux/minigui-4.0.2/mg-samples-4.0.0/incore-data'
bin2c -o png_pics.inc res/*.png
/bin/sh: bin2c: 未找到命令
make[1]: *** [png_pics.inc] 错误 127
make[1]:正在离开目录 `/home/linux/minigui-4.0.2/mg-samples-4.0.0/incore-data'
make: *** [all-recursive] 错误 1
解决方式:
安装mg-tool,由于mgtool需要在编译平台运行,所以无法用现有的交叉环境,需要重新用GCC编译以上源码,暂时不编译,其他




你可能感兴趣的:(arm,miniGui,miniGui)