【问题标题】:Cross compiling fontconfig for iOS为 iOS 交叉编译 fontconfig
【发布时间】:2013-02-12 17:35:11
【问题描述】:

如何交叉编译 iOS 的 fontconfig。
http://freedesktop.org/software/fontconfig/release

我试试这个:

./configure
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -arch armv7"
--sysconfdir=/Users/bluefish625/Desktop/fontconfig/sysconfdir/
--prefix=/Users/bluefish625/Desktop/fontconfig/prefix/
--mandir=/Users/bluefish625/Desktop/fontconfig/mandir
--disable-shared
--host=armv7-apple-darwin
--with-freetype-config=$PREFIX/bin/freetype-config

错误信息是:

configure: error: in `/Users/bluefish625/Downloads/fontconfig-2.9.0':
configure: error: The pkg-config script could not be found or is too old.
Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config.

Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details

而且,我不知道--with-freetype-config 是什么意思?
有人可以帮助我吗?谢谢。

【问题讨论】:

  • 通常这意味着您没有编译 fontconfig 所需的依赖项,或者您的路径搞砸了。如果您使用自制软件并通过 brew 安装 fontconfig,它应该安装所有依赖项。
  • 你能给我一个关于自制软件的链接吗?谢谢。
  • @Magicfish 你找到为 iOS 目标编译 fontconfig 的解决方案了吗?

标签: ios cross-compiling fontconfig


【解决方案1】:

试试这个:

export IOS_PLATFORMDIR="/Developer/Platforms/iPhoneOS.platform"
export IOS_SYSROOT="$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS5.0.sdk"
export IOS_GCC="$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2"
export IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"

./configure --host arm-apple-darwin10 --disable-docs --enable-shared=no \
           --with-expat="/Users/meox/PODOFO/expat" \
           --with-expat-includes="/Users/meox/PODOFO/expat/include" \
           --with-expat-lib="/Users/meox/PODOFO/expat" \
CC="$IOS_GCC" LD="$IOS_GCC" \
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS
-L/Users/meox/PODOFO/freetype2 -L/Users/meox/PODOFO/expat
-L/Users/meox/PODOFO/zlib -L/Users/meox/PODOFO/libiconv
-L/Users/meox/PODOFO/bzip2" \
CPPFLAGS="-I/Users/meox/PODOFO/freetype2/include
-I/Users/meox/PODOFO/zlib/include -I/Users/meox/PODOFO/expat/include"

你必须设置正确的路径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-27
    • 2021-09-14
    • 2014-07-19
    • 2012-06-11
    • 1970-01-01
    • 2019-05-21
    • 2011-07-24
    • 2014-12-05
    相关资源
    最近更新 更多