Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Build Project for Release #46

Closed
hirad opened this issue Aug 26, 2014 · 12 comments
Closed

Can't Build Project for Release #46

hirad opened this issue Aug 26, 2014 · 12 comments
Labels

Comments

@hirad
Copy link

hirad commented Aug 26, 2014

I have an app using Tesseract which runs just fine in development, but when I want to archive it, I get a series of warnings:

warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture armv7
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture armv7
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture armv7s
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture armv7s
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture arm64
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture arm64

And, of course, archiving fails due to undefined symbols for architecture.

Any tips on this?

I've read this can be caused by having the wrong files in "Compile Sources", but as far as I can tell, I only have .m files and core data models in there.

@hirad
Copy link
Author

hirad commented Aug 27, 2014

I "fixed" this problem by going to my target's 'Linked Frameworks and Libraries' section and adding TessearctOCR.framework to it. That fixes the archiving issue, but the warnings stay there, annoyingly enough.

@ws233
Copy link
Collaborator

ws233 commented Aug 27, 2014

I guess, that you added .a files to "Compile Sources" of a release target.
Check it again and simply remove those files from there and you'll have no warnings.

@joaomvfsantos
Copy link

I am having the same warnings but instead of using the TessearctOCR.framework directly I am using Tesseract as a CocoaPod. This then results on a linking error:

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_Tesseract", referenced from: objc-class-ref in xxxx.a(xxx.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried to remove the .a files from "Compile Sources" but to no avail. Do you have any further insight on what could be the issue here?

@kevincon
Copy link
Collaborator

kevincon commented Dec 3, 2014

These issues should be fixed by #71, which is now a part of CocoaPods release 3.1.1. Update your podfile to use it:

pod 'TesseractOCRiOS', '3.1.1'

I'll close the issue for now, but feel free to reopen it if it's still not working for you.

@kevincon kevincon closed this as completed Dec 3, 2014
@manenko
Copy link

manenko commented Dec 6, 2014

Hi,

I have the same issue with the latest pod version (3.1.1):

warning: no rule to process file '/Users/ZZ/Documents/Projects/YY/XX/Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture arm64
warning: no rule to process file '/Users/ZZ/Documents/Projects/YY/XX/Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture arm64

So it seems this issue was not resolved by #71.

@kevincon
Copy link
Collaborator

kevincon commented Dec 6, 2014

@manenko, I just created a brand new iOS 8.1 project in Xcode 6.1.1, added this line to a blank Podfile:

pod 'TesseractOCRiOS', '3.1.1'

ran pod install, and used the template framework project code. I built for both Debug and Release for both the iPhone 6 simulator (which uses x86_64 architecture) and my iPhone 6 (arm64 architecture). For all these configurations, the build successfully completed and the app worked perfectly.

I have a theory about what might be going wrong for you, but before we get to that, can you let me know the following things?

  1. If you don't mind, can you paste your entire Podfile here from when you were receiving the build errors? If you don't want to do that, can you just paste the TesseractOCRiOS-related line?
  2. Can you let me know exactly what setup you were trying to build for? Was it a physical iPhone 6 connected to your computer? Were you building for Debug or Release?

@kevincon kevincon reopened this Dec 6, 2014
@manenko
Copy link

manenko commented Dec 7, 2014

I apologize for the false alarm. I changed Podfile to use 3.1.1 in project AAA, but I thought that I did that for project BBB. So BBB used old version of the library and I reported this. Now when I changed Podfile for project BBB use 3.1.1, it compiles without any warnings.

I'm very sorry for the false alarm.

@kevincon
Copy link
Collaborator

kevincon commented Dec 7, 2014

No worries! Let us know if you run into any other issues. Also we just released a new CocoaPods update (really just a version bump, see #74), but now if you leave off the specific version in the Podfile it will use the latest version of the library (now 3.4.0).

@kevincon kevincon closed this as completed Dec 7, 2014
@pwansch
Copy link

pwansch commented Jan 20, 2015

Hi Kevin,
I just created a brand new iOS 8.1 project in Xcode 6.1.1, added this line to a blank Podfile:
pod 'TesseractOCRiOS', '3.4.0'
and nothing else and did pod install. When I open my project Snap.xcworkspace, I see the following:

snap

The framework files in the Pods project are red, because they refer to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework
which does not exist since I only have iOS8.1 installed.
How can I make it work so that I can get to try the awesome sample?

Thank you!

@ws233
Copy link
Collaborator

ws233 commented Jan 20, 2015

Hi, @pwansch.
Could you try this #111 and tell us if it helps?

@kevincon
Copy link
Collaborator

@pwansch, I created a new project using the same steps as you did, and although I also see those items in red like you do, building and running the project works perfectly fine (see screenshot below).

The only red items that refer to the iOS7.1-related path are Foundation.framework and UIKit.framework in Pods/Frameworks/iOS. This seems to be an issue with CocoaPods itself, but I can assure you that everything will still build correctly regardless. Here's the related issue on CocoaPods: CocoaPods/CocoaPods#2324

Screenshot of the 3.4.0 Cocoapod running fine using the same version of Xcode as you:

screen shot 2015-01-20 at 11 48 10 am

@pwansch
Copy link

pwansch commented Jan 20, 2015

Thank you @kevincon. This perfectly answered my question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants