Jump to content

[TUTORIAL] How to Fix arm64 arch Error when making a deb package


19 posts in this topic

Recommended Posts

Updated (edited)

So recently i was having issues making a deb package because of an error i would get regarding arm64 which looks like this:

 

 

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-print-directory --no-keep-going \

internal-library-compile \

THEOS_CURRENT_TYPE=tweak THEOS_CURRENT_INSTANCE=Cars THEOS_CURRENT_OPERATION=compile \

THEOS_BUILD_DIR="." _THEOS_MAKE_PARALLEL=yes

/Users/angrydominican/Documents/Debfiles/Cars/theos/bin/logos.pl -c warnings=error Tweak.xm > ./obj/Tweak.xm.mm

xcrun -sdk iphoneos clang++ -x objective-c++ -c -I"/Users/angrydominican/Documents/Debfiles/Cars" -DTARGET_IPHONE=1 -O2 -I/Users/angrydominican/Documents/Debfiles/Cars/theos/include -include /Users/angrydominican/Documents/Debfiles/Cars/theos/Prefix.pch -Wall -Werror -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk" -arch armv7 -arch arm64 -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_8_1 -miphoneos-version-min=8.1 -fobjc-arc -include "logos/logos.h" ./obj/Tweak.xm.mm -o obj/Tweak.xm.83371b02.o

rm ./obj/Tweak.xm.mm

xcrun -sdk iphoneos clang++ -L/Users/angrydominican/Documents/Debfiles/Cars/theos/lib -lobjc -framework Foundation -framework CoreFoundation -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors -framework UIKit -framework MessageUI -framework Social -framework QuartzCore -framework CoreGraphics -framework Foundation -framework AVFoundation -framework Accelerate -framework GLKit -lsubstrate -dynamiclib -install_name "/Library/MobileSubstrate/DynamicLibraries/Cars.dylib" -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk" -arch armv7 -arch arm64 -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_8_1 -miphoneos-version-min=8.1 -multiply_defined suppress -Wl,-segalign,4000 -o "obj/Cars.dylib.ba964c90.unsigned" obj/Tweak.xm.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLAlertView.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLAlertViewResponder.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLAlertViewStyleKit.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLButton.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLTextView.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/SCLTimerDisplay.m.83371b02.o obj//Users/angrydominican/Documents/Debfiles/Cars/theos/include/SCLAlertView/UIImage+ImageEffects.m.83371b02.o

ld: warning: ignoring file /Users/angrydominican/Documents/Debfiles/Cars/theos/lib/libsubstrate.dylib, file was built for armv7 which is not the architecture being linked (arm64): /Users/angrydominican/Documents/Debfiles/Cars/theos/lib/libsubstrate.dylib

Undefined symbols for architecture arm64:

"_MSHookFunction", referenced from:

_logosLocalCtor_c00dbd47() in Tweak.xm.83371b02.o

"_MSHookMessageEx", referenced from:

_logosLocalInit() in Tweak.xm.83371b02.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [obj/Cars.dylib.ba964c90.unsigned] Error 1

make[1]: *** [internal-library-all_] Error 2

make: *** [Cars.all.tweak.variables] Error 2

 

So to fix that i was removing the arm64 arch from the Makefile but doing so would make the deb incompatible with 64bit devices. So the amazing genius @@DiDA figured out that it was my lib substrate.dylib that was not working right. Thus he sent me a copy of his and replaced mine with his in theos/lib. And BAM problem solved.

 

So if you do have this issue here is a copy of that libsubstrate.dylib file you'll need. Now you should be able to make package for both 32 bit and 64 bit devices.

 

 

Hidden Content

React or reply to this topic to see the hidden content & download link. 👀

 

Credits:

-@@Battousai

-@@DiDA

Updated by Diversityy
  • Like 27
  • Thanks 3
  • Haha 2
  • Agree 2
  • Informative 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines