0

I was trying to make my first tweak for ios using Theos. And I just used a default tweak template(nic.pl), didnt change anything, I got this error when I tried to run make package:

dyld: could not load inserted library '/usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib' because no suitable image found.  Did find:
    /usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib: mach-o, but wrong architecture
    /usr/local/Cellar/fakeroot/1.22/lib/libfakeroot-0.dylib: mach-o, but wrong architecture

/usr/local/bin/fakeroot: line 181:  3701 Abort trap: 6           FAKEROOTKEY=$FAKEROOTKEY DYLD_INSERT_LIBRARIES="$LIB" "$@"
make: *** [internal-package] Error 134

More Information:

Env: Darwin MacBook pro 16.7.0 Darwin Kernel Version 16.7.0

IOS sdk: I am using the newest version of SDK(iosdk11) & Xcode(9.0), I also tried different SDK, but no luck, I assume the problem here is fake root did not generate compatible binary.

Fakeroot: I just did brew install fakeroot to install.

libfakeroot info: /usr/local/Cellar/fakeroot/1.22/lib/libfakeroot.dylib: Mach-O 64-bit dynamically linked shared library x86_64.

404
  • 53
  • 1
  • 6
  • You're trying to link your iOS binary against a macOS shared library. That cannot possibly work, you need to get hold of a libfakeroot compiled for iOS, or compile it yourself (if there's something where you can specify C compiler, using `xcrun -sdk iphoneos gcc` might just be enough to get you an iOS binary). Moreover, if you intend to publish this tweak, you either need to create a separate package for libfakeroot and add that as a dependency, or link your tweak statically against it. If you do not do that, then your tweak will not be able to find libfakeroot on the target system. – Siguza Sep 23 '17 at 16:27
  • @Siguza Thx for your answer, I am not familiar with how theos work tbh, is there anyway I can do to change xcrun default sdk to be iphoneos sdk, and default compiler to be iphone:clang? I tried adding `TARGET = iphone:clang` in Makefile under my tweak dir but didn't work. – 404 Sep 23 '17 at 20:40
  • Also can you tell me how to compile libfakeroot.dylib myself? THx! – 404 Sep 23 '17 at 20:54

0 Answers0