Theos not compiling with Arm64 - ios

I am trying to package a Jailbreak Tweak using Theos on Windows 8.1 (64bit). If I do not specify Arm64 it compiles fine and works on my iPhone 5. However not my 6s. The console says a big error which I don't understand. Any help trying to get this tweak to compile with 64bit architecture would be great.
Makefile:
ARCHS = armv7 armv7s arm64
test_FRAMEWORKS = UIKit
include theos/makefiles/common.mk
TWEAK_NAME = Forton
Forton_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += fortonprefs
include $(THEOS_MAKE_PATH)/aggregate.mk
Error Log:
$ make package
/home/AbbottL/forton/theos/makefiles/targets/Cygwin/iphone.mk:38: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak Forton...
Linking tweak Forton...
ld: warning: ignoring file /home/AbbottL/forton/theos/sdks/iPhoneOS8.1.sdk/usr/lib/dylib1.o, missing required architecture arm64 in file /home/AbbottL/forton/theos/sdks/iPhoneOS8.1.sdk/usr/lib/dylib1.o (2 slices)
ld: warning: ignoring file /home/AbbottL/forton/theos/lib/libsubstrate.dylib, file was built for armv7 which is not the architecture being linked (arm64): /home/AbbottL/forton/theos/lib/libsubstrate.dylib
Undefined symbols for architecture arm64:
"_MSHookMessageEx", referenced from:
_logosLocalInit() in Tweak.xm.91812798.o
ld: symbol(s) not found for architecture arm64
armv7-apple-darwin11-clang: error: linker command failed with exit code 1 (use -v to see invocation)
/home/AbbottL/forton/theos/makefiles/instance/library.mk:27: recipe for target 'obj/Forton.dylib.1b5b9d6a.unsigned' failed
make[2]: *** [obj/Forton.dylib.1b5b9d6a.unsigned] Error 1
/home/AbbottL/forton/theos/makefiles/instance/library.mk:19: recipe for target 'internal-library-all_' failed
make[1]: *** [internal-library-all_] Error 2
/home/AbbottL/forton/theos/makefiles/master/rules.mk:54: recipe for target 'Forton.all.tweak.variables' failed
make: *** [Forton.all.tweak.variables] Error 2
Using ios 8.1 SDK

Fixed by swapping libsustrate file to a later version.

Related

iOS Project Build Problems

My project, in iPhone5s simulator running above normal, but iPhone5 compile error, an error message is as follows:
ld: warning: directory not found for option '-L/Users/apple/Desktop/……/UMSocial_Sdk_3.3.7'
ld: warning: ignoring file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a, missing required architecture i386 in file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a (2 slices)
ld: warning: ignoring file /Users/apple/Desktop/……/UMAnalytics_Sdk/libMobClickLibrary_armv6.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……_Sdk/libMobClickLibrary_armv6.a
ld: warning: ignoring file /Users/apple/Desktop/……_iOS_SDK/lib/libP2P.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……2P.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_InterfaceJump", referenced from:
objc-class-ref in CommonFunc.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Your project link some file didn't support i386 architecture. Maybe this file ??just support arm architecture.
You should make sure your "Build Settings" -> "Valid Architectures" didn't contain i386. iPhone5's architecture is "armv7", it shouldn't compile for architecture i386.
If your just want to build target phone architecture, you can set "Build Active Architecture Only" to YES.
I sorry, I think your iPhone5 is device, you can try to change "Valid Architecture" to only support 64bit or 32bit arm architecture, and change "Build Active Architecture Only" to have a try.
iPhone5 simulator is build fine, and iPhone5s build failed usually is arm64 problem.

missing file require architecture i386 and x86_64 on simulator but working fine on device

I have added TurnOutNow library which contain EASDK.h and libEventAnalytics.a
My project & TurnOutNow library have reachability.m file.
So it was giving following errror on build :
duplicate symbol _OBJC_METACLASS_$_Reachability in: /Users/achavan/Library/Developer/Xcode/DerivedData/Meeting_Caddie-bbzedidjjyellubhnftrohiumzog/Build/Intermediates/Meeting Caddie.build/Debug-iphoneos/Meeting Caddie.build/Objects-normal/armv7/Reachability.o /Work_Theme_iPhone/New M_Caddie/Eventpedia_Beta/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a(Reachability.o) ld: 2 duplicate symbols for architecture armv7
I searched on stackoverflow and found that removing reachability.m from build phases would work.
But then it was giving following error:
(null): "_kReachabilityChangedNotification", referenced from:
(null): -[AppDelegate setUpRechability] in AppDelegate.o
(null): +[ASIHTTPRequest registerForNetworkReachabilityNotifications] in ASIHTTPRequest.o
(null): +[ASIHTTPRequest unsubscribeFromNetworkReachabilityNotifications] in ASIHTTPRequest.o
(null): Symbol(s) not found for architecture arm64
(null): Linker command failed with exit code 1 (use -v to see invocation)
To solve this issue:
I renamed reachability class.
It is working fine on the device.
But it's giving the following error when I build on IOS simulator.
1. ld: warning: ignoring file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a, missing required architecture i386 in file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a (2 slices)
"_OBJC_CLASS_$_EASDK", referenced from:
2. (null): Ignoring file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a, missing required architecture x86_64 in file /Work_Theme_iPhone/New M_Caddie/MeetingCaddie/iOS_Eventpedia/TurnOutNow_SDK/libEventAnalytics.a (2 slices)
(null): "_OBJC_CLASS_$_EASDK", referenced from:
EASDK is a file in TurnoutNow library.
Any help appreciated.
After going to several of link, I found that
i386 = ios simulator or 32 bit build on mac os x
armv6 armv7 arm7s = ios device
x86_64 = 64 bit build on mac os x
and when I ran following command :
libEventAnalytics.a (for architecture cputype (16777228) cpusubtype (0)): current ar archive random library
Amits-Mac-mini:TurnOutNow_SDK achavan$ lipo -info libEventAnalytics.a
Architectures in the fat file: libEventAnalytics.a are: armv7 arm64
I found that libEventAnalytics.a is not built for i386 and x86_64.
So I am unable to run my app on simulator.

While building iOS application with Xcode 5 in simulator, i got following error

The error ld: in
'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libSystem.B.dylib',
missing required architecture i386 in file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libSystem.B.dylib (2 slices) for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i think you can find your answer here
linking against dylib built for MacOSX file '/usr/lib/libSystem.B.dylib' for architecture i386
may it useful for you

Cocos2D using Theos

I'm currently trying to build an app with Cocos2D and Theos but without success.
I have a Jailbroken iPhone 4S (iOS 7.0.4) with :
SDK 7.0
Clang
LLVM
LD64
but do not have a Mac.
When I run the make command, it prints a lot of errors :
Making all for application TestCocos2D...
Copying resource directories into the application wrapper...
Linking application TestCocos2D...
Undefined symbols for architecture armv7:
"_CCNextPOT", referenced from:
-[CCLabelTTF createTextureWithAttributedString:useFullColor:] in CCLabelTTF.m.bd6d7c66.o
-[CCLabelTTF createTextureWithString:useFullColor:] in CCLabelTTF.m.bd6d7c66.o
-[CCRenderTexture initWithWidth:height:pixelFormat:depthStencilFormat:] in CCRenderTexture.m.bd6d7c66.o
...........
"_kmMat4PerspectiveProjection", referenced from:
-[CCDirectorIOS setProjection:] in CCDirectorIOS.m.bd6d7c66.o
"_kmVec3Fill", referenced from:
-[CCDirectorIOS setProjection:] in CCDirectorIOS.m.bd6d7c66.o
"_kmVec3TransformCoord", referenced from:
-[CCDirector convertToGL:] in CCDirector.m.bd6d7c66.o
-[CCDirector convertToUI:] in CCDirector.m.bd6d7c66.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/TestCocos2D.app/TestCocos2D.64873355.unsigned] Error 1
make[1]: *** [internal-application-all_] Error 2
make: *** [TestCocos2D.all.application.variables] Error 2
Makefile :
export TARGET = iphone:clang
export TARGET_SDK_VERSION = 7.0
export TARGET_IPHONEOS_DEPLOYMENT_VERSION = 7.0
export ARCHS = armv7
include theos/makefiles/common.mk
APPLICATION_NAME = TestCocos2D
TestCocos2D_FILES = Libraries/cocos2d/Platforms/iOS/CCAppDelegate.m Libraries/cocos2d/Platforms/iOS/CCDirectorIOS.m Libraries/cocos2d/Platforms/iOS/CCES2Renderer.m Libraries/cocos2d/Platforms/iOS/CCGLView.m Libraries/cocos2d/Platforms/iOS/UITouch+CC.m Libraries/cocos2d/CCAction.m Libraries/cocos2d/CCActionCatmullRom.m .... Libraries/cocos2d/cocos2d.m main.m Classes/AppDelegate.m Classes/HelloWorldScene.m Classes/IntroScene.m
TestCocos2D_FRAMEWORKS = UIKit CoreGraphics
include $(THEOS_MAKE_PATH)/application.mk
Folder :
control
makefile
main.m
Classes
AppDelegate.h
HelloWorldScene.h
IntroScene.h
AppDelegate.c
HelloWorldScene.c
IntroScene.c
Libraries
link to cocos2d
link to cocos2d-ui
link to kazmath
link to ObjectAL
Newton
Ressources
Link to theos
So, how could I solve those issues ?
What should resemble the makefile and the directory ?
Is there a way to create a Framwork and use it as UIKit or CoreGraphics in the makefile ?
Thanks a lot in advance.

Linker error for echoprint in iOS

I'm using echoprint API for song search from last 3 months. But suddenly it started giving me below errors. Already I have face many problems while adding that API to my project & now it start giving me linker error. It was working for me previously.
Error like this:
"Codegen::Codegen(float const*, unsigned int, int)", referenced from: _GetPCMFromFile in File.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: symbol(s) not found for architecture i386
ld: warning: directory not found for option '-L-L/Users/prajaktakulkarni/Downloads/echoprint-codegen-4.12 2/src/echoprint-codegen-ios/build/Release-iphoneos'
ld: warning: ignoring file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a, missing required architecture i386 in file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a (2 slices)
Undefined symbols for architecture i386:
"Codegen::Codegen(float const*, unsigned int, int)", referenced from:
_GetPCMFromFile in File.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The error message is saying that the static library libechoprint-codegen-ios.a hasn't been built for the i386 architecture - which is the architecture used by the simulator.
You can find out which architectures the static library has been built for by running the following code in Terminal:
lipo -info ~/Documents/Instajam/libechoprint-codegen-ios.a
It will likely tell you it is built for armv7 and armv7s. That will support all but the oldest iOS devices at the time of writing.
You could build libechoprint-codegen-ios.a to run on a simulator. Here's a good stackoverflow post if you are interested in doing that: Build fat static library (device + simulator) using Xcode and SDK 4+
The easiest option would be to just plug your phone in and not worry about building a fat static library. :D
Recently the problem was fixed for me by using libz.1.1.3.tbd instead libz.tbd and of course this link is useful Echoprint iOS Missing Framework

Resources