本文主要描述minigui交叉编译过程:
1.jpeg-7
step1:
./configure --prefix=/home/book/work/toolchain_book/arm/jpeg-7 --host=arm-linux CC=arm-linux-gnueabihf-gcc
step2:
make
step3:
make install
2.freetype
step1:
./configure --prefix=/home/book/work/toolchain_book/arm/freetype --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc –with-zlib=no
step2:
make
step3:
make install
3.harfbuzz
step1:
./configure --prefix=/home/book/work/toolchain_book/arm/harfbuzz --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc --with-glib=no --with-freetype=yes PKG_CONFIG_PATH=/home/book/work/toolchain_book/arm/freetype/lib/pkgconfig
step2:
make
step3:
make install
FAQ:
1.添加了—with-freetype=yes,执行configure后报错:
configure: error: FreeType support requested but libfreetype2 not found
解决办法:
添加变量PKG_CONFIG_PATH
4.zlib
step1:
./configure --shared –prefix=/home/book/work/toolchain_book/arm/zlib
step2:
修改Makefile文件 ,在工具链前加上arm-linux-gnueabihf-
step3:
make
step4:
make install
FAQ:
./configure –help
usage:
configure [–shared] [–prefix=PREFIX] [–exec_prefix=EXPREFIX]
[–libdir=LIBDIR] [–includedir=INCLUDEDIR]
Zlib配置是不支持—host项,交叉编译时需要手动更改Makefile,将Makfile里的gcc、ar、ranlib均加上前缀arm-linux-gnueabihf-,再执行make && make install,编译安装成功后在—prefix指定的目录下生成include、shared和lib目录.
5.libpng
step1:
./configure --prefix=/home/book/work/toolchain_book/arm/libpng --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc执行此操作直接报错:configure: error: zlib not installed.继续添加其他变量依然无法解决该问题。
解决办法:
要解决这个问题最重要的是要了解到libpng库是不需要configure的,因为在scripts目录下已经提供makefile,所以没有必要使用configure来创建makefle文件了。
因此把scripts目录下mak