【发布时间】:2020-02-29 15:05:42
【问题描述】:
我正在尝试在我越狱的 iOS 设备上构建 Tor 项目。我克隆了 Git 存储库,然后运行了 autogen.sh。接下来,我运行 ./configure,但没有找到 C 编译器。所以我改为运行它(在从 repos 安装 Clang、Theos Dependencies 等之后):
./configure CC="clang --isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk"
现在它说它不能运行 C 编译的程序:
PoisonImy:~/tor mobile$ ./configure CC="clang -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... no
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... clang -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/var/mobile/tor':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
这是因为我之前使用 Clang 编译一个 hello world 程序并尝试运行它时遇到“Killed: 9”错误。我使用 'ldid -SEntitlements.plist a.out' 修复了它,Entitlements.plist 文件位于here。
有没有办法指示配置脚本(或 clang)做同样的事情?
编辑:也许制作一个运行 clang 和 ldid 的 shell 脚本,然后将其传递给配置脚本?我会试试这个。我是 shell 脚本的新手,所以我不知道如何解决这个问题。
【问题讨论】:
标签: ios makefile clang configure