【问题标题】:Unable to cross compile iOS programs on linux无法在 Linux 上交叉编译 iOS 程序
【发布时间】:2021-03-17 04:45:36
【问题描述】:

我知道有人已经问过这个问题,但它不再是最新的了。大多数链接都已失效,命令不再相关。

我已经阅读了这些

Compile IOS program from linux commandline

How to cross-compile clang/llvm for iOS?

例如,我一直在尝试为我的 iPhone 6(越狱)编译 silversearcher-ag。这是项目链接https://github.com/ggreer/the_silver_searcher

我的目标是 iOS 12.4。

这些是我尝试过的命令

./configure CC=/home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target/bin/arm-apple-darwin11-clang CXX=/home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target/bin/arm-apple-darwin11-clang++ --host=arm-apple-darwin11

make

我正在使用 cctools-port 交叉编译项目。我编译的 cctools 工具链位于/home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target 下,下面是工具链的目录结构的样子

这是我的配置日志:https://del.dog/nugibonury

这是我的制作日志:

CC       src/ignore.o
In file included from src/ignore.c:11:
./src/options.h:7:10: fatal error: 'pcre.h' file not found
#include <pcre.h>
         ^~~~~~~~
1 error generated.
make: *** [Makefile:494: src/ignore.o] Error 1

这是我的 GitHub 存储库,其中包含交叉编译工具链 https://github.com/GrowtopiaJaw/arm-apple-darwin11

【问题讨论】:

    标签: ios linux cross-compiling gnu jailbreak


    【解决方案1】:

    Apple 不提供 PCRE。您需要手动获取 headers 和 dylib/tbd 文件。

    如果您使用的是 checkra1n 或 unc0ver,那么 the deb on the APT repo 也包含标题,所以您可以使用它。

    如果您打算将其打包到 APT/dpkg 文件中,请确保添加 pcre 作为依赖项。

    【讨论】:

    • 由于iOS使用clang,而且这个项目基本上是建立在gcc上的,我似乎也无法在iOS上编译这个项目。尝试使用 LLVM 版本 5 和 Clang 版本 10 的 Clang,./configure 抱怨 clang 无法执行文件。这是我的配置日志del.dog/torrimaduj 这是完整的config.log del.dog/mabangesta
    • 这很可能是由于您的工具链用完了/var - shebangs 已被沙盒彻底瘫痪。 ://
    • 有什么办法可以通过在 linux 或手机本身上进行交叉编译来克服这个问题。我真的不知道该怎么办了
    • 是的,交叉编译是完全可能的,而且您似乎已经尝试过。只需下载我链接的deb,提取其中的data.tar.lzma,然后将usr/includeusr/lib 文件夹与您的项目合并,或者使用-I-L 传递它们。
    • 是的,谢谢。这样可行。但我想知道这是否可以应用于其他项目。似乎某些 gcc 标志在 clang 上不可用,例如 -Wlogical-op
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-04
    • 2015-04-24
    • 2018-12-07
    • 2011-05-18
    • 1970-01-01
    相关资源
    最近更新 更多