johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

Failed Build with Status 65 #91

Open WilliamHua opened 8 years ago

WilliamHua commented 8 years ago



* BUILD FAILED 


The following build commands failed:
 Ld build/Debug-iphoneos/InjectionBundle.bundle/InjectionBundle normal arm64
(1 failure)

\ Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. _

 at /Users/willhua/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.
 main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/willhua/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 460
_ Bundle build failed ***



WilliamHua commented 8 years ago

I am trying to get Injection for XCode working again. I have version 6.4 and XCode version 7.2. I have looked at issue #57 and #58 (which just say that the issue has been resolved). Not sure how to approach debugging / fixing this issue.

johnno1962 commented 8 years ago

Update your plugin by deleteing and reinstalling/building it and delete the iOSInjectionProject folder and try again. There needs to be be ENABLE_BITCODE = NO; in the bundle project’s project.pbxproj.

WilliamHua commented 8 years ago

I removed the plugin via Alcatraz and deleted ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin.

I also removed iOSInjectionProject from the project.

I then exited XCode and re-downloaded the project via Alcatraz and patched the project. I ran into the same issue.

johnno1962 commented 8 years ago

You need to find where ENABLE_BITCODE=YES is set in the bundle project. This is most strange. That has been fixed for a year!

WilliamHua commented 8 years ago

Oh sorry I forgot mention my ENABLE_BITCODE has been set to NO already.

I remember I tried to use this project last year and this is the issue that came up.

Maybe there's something else I forgot to delete? Or Alcatraz isn't completely updated.

johnno1962 commented 8 years ago

Try setting the minimum deployment target to 8.0 in the Bundle project. This should avoid bitcode.

WilliamHua commented 8 years ago

It doesn't seem to help. The minimum deployment target was 7.0 before if that matters.

johnno1962 commented 8 years ago

can you email iOSInjectionProject/InjectionBundle.xcodeproj/project.pbxproj to injection at johnholdsworth.com?

WilliamHua commented 8 years ago

Should have sent it your way

johnno1962 commented 8 years ago

Thanks, your Bundle project still has default iOS deployment version, can you set it to 8.0? Problem is the "-fembed-bitcode-marker” when it compiles the bundle.

WilliamHua commented 8 years ago

screen shot 2016-03-13 at 9 22 56 pm

Is this where I change the iOS deployment version?

johnno1962 commented 8 years ago

In the bundle project.. menu item, “Project/Injection Plugin/Open Bundle Project” and change that.

CoderJason08 commented 8 years ago

same problem for me, i tried all above and it also BUILD FAILED ,i set all ENABLE_BITCODE for NO。

/Users/admin/DocumentsKingIOS/KingIOS 1.0.6/View/XNWQuestionListCell.h:10:9: fatal error: 'Masonry.h' file not found 1 error generated. 

\ BUILD FAILED **

The following build commands failed:
 CompileC build/InjectionBundle.build/Debug-iphonesimulator/InjectionBundle.build/Objects-normal/x86_64/BundleContents.o BundleContents.m normal x86_64 objective-c++ com.apple.compilers.llvm.clang.10.compiler
(1 failure)

* Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. 

 at /Users/admin/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.
 main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/admin/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 460
**_ Bundle build failed ***


johnno1962 commented 8 years ago

seems to be a different problem to me:

/Users/admin/DocumentsKingIOS/KingIOS 1.0.6/View/XNWQuestionListCell.h:10:9: fatal error: 'Masonry.h' file not found

Can you try your project without the space in the directory path?

WilliamHua commented 8 years ago

I changed the deployment target as you specified and it seemed to fix the issue. However, now I have a different issue:

Could not codesign as 'iPhone Developer': /Users/willhua/Documents/XCode Projects/Eventus/iOSInjectionProject/build/Debug-iphoneos/InjectionBundle1.bundle

In the iOSInjectionProject, the Code Signing section of Build Settings, the Code Signing Identity is "Don't Code Sign."

johnno1962 commented 8 years ago

Check out https://github.com/johnno1962/injectionforxcode/issues/41

mikiXuan commented 8 years ago

* Build Failed with status: 2. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. * help!

821985307 commented 8 years ago

I also encountered the same problem if you know how to solve it, contact me please 821985307@qq.com this is my email

yas375 commented 8 years ago

I'm having some problem. Also in the Injection Console before it prints that it has failed with 65 status it says that one of the frameworks we are using couldn't be found for x86_64 architecture:

...
ld: warning: directory not found for option '-F/Users/yas/Library/Developer/Xcode/DerivedData/Caremobile-bvkpgrfszsplakgvzgeekswqpduj/Build/Products/Debug-iphonesimulator'

ld: warning: -undefined dynamic_lookup is deprecated on iOS

ld: framework not found DVCoreDataFinders for architecture x86_64

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



** BUILD FAILED **




The following build commands failed:

 Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64
(1 failure)

*** Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. ***

 at /Users/yas/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.

 main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/yas/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 460

*** Bundle build failed ***



I hope it will help.

johnno1962 commented 8 years ago

@yas375, you need to adjust the framework search path in your injection bundle project.. "Product/Injection Plugin/Open Bundle Project” so the bundle can link. Add the directory containing the DVCoreDataFinders framework.

yas375 commented 8 years ago

This might sound weird, but it works now without any change...

Actually this morning I was about to give a try to your recommendation, but when I was running the injection, my app was just closing. I didn't have much time in the morning to look more closely. Now I've cleared DerivedData for another time and run it again and it seem to work as expected! :clap:

Since yesterday I was jumping between branches. Some of them contain different frameworks. I don't know if it matters.

yas375 commented 8 years ago

I've just got the same issue as I was getting in the morning. The injection just closes my app. That problem doesn't say anything about status 65 so I have created a separate issue with details: https://github.com/johnno1962/injectionforxcode/issues/118

Thanks again for your help and for the plugin, John!

mikeRozen commented 8 years ago

Hi All, Wanted to try the plugin and had the same issue: The following build commands failed:
 Ld build/Debug-iphonesimulator/InjectionBundle.bundle/InjectionBundle normal x86_64
(1 failure)

* Build Failed with status: 65. You may need to open and edit the bundle project to resolve issues with either header include paths or Frameworks the bundle links against. _

 at /Users/myName/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.
 main::error('Build Failed with status: 65. You may need to open and edit t...') called at /Users/michaelrozenblat/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 461
_ Bundle build failed *****

I changed the search Framework path to recursive (didn't helped)

InjectionLog.txt

Thanks.

johnno1962 commented 8 years ago

Hi, The information about the error is just before the messsage you pasted which only says the build (probably the linking) failed. Can you paste a little more?

aaronash commented 8 years ago

I have some installed projects using CocoaPods, as well as the Facebook SDK, and was running into this same problem. For anyone that stumbles upon a similar issue, this is what worked for me:

  1. Product > Injection Plugin > Open Bundle Project
  2. Open Build Settings, search for "Framework Search Paths"
  3. Add "../*" and make it recursive.
  4. Try building. A Product > Clean might be necessary.

I still get -undefined dynamic_lookup is deprecated on iOS, but it's only a warning, and Injection works. Would it be theoretically possible for Injection to auto-detect if someone is using CocoaPods and add the correct framework search paths to the InjectionBundle project? Maybe CocoaPods is not the root of the issue, I'm only guessing.

shiyuwudi commented 8 years ago

encountered the same issue and managed to fix it follow all the solution provided by the author and other guys above, tuned out that none of these work for me(keep throwing code 65)!! anybody help?

tonespy commented 8 years ago

@Charybdis Works fine

lyc59621 commented 7 years ago

Please look at my problem
file.txt

johnno1962 commented 7 years ago

Hi, fatal error: 'WeikeModel.h' file not found
#import “WeikeModel.h”. I’m afraid Injection dooen’t supprt spaces in directory names.