gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

Bitcode support #202

Closed ws233 closed 9 years ago

ws233 commented 9 years ago
  1. Changes in the build script. Added support for the bitcode for all the libraries.
  2. Readme has been changed to reflect the changes in the build script.
  3. Libraries binaries are now contain bitcode.
kevincon commented 9 years ago

Looks good to me, but all of the builds on Travis failed due to linking errors. Can you investigate why enabling the bitcode embedding results in all of the "duplicate symbol" errors? This link seems to be related and might help find the answer: http://stackoverflow.com/questions/31566867/ios-fat-binaries-should-every-arch-include-bitcode

ws233 commented 9 years ago

@kevincon, I believe that's due to unsupported '-fembed-bitcode' option in Xcode 6. As soon as we change travis settings to use Xcode 7 for the build, everything should be ok. At least with my local Xcode 7 I don't have such issues, but have them with Xcode 6. So let's wait till the final release of Xcode 7 and than try to change travis settings.

ws233 commented 9 years ago

I've also added a note that xCode 7 is required to build the library from this commit.

kevincon commented 9 years ago

Sounds good, but let's wait to land these changes until Travis supports Xcode 7 so we don't have a broken build. Here's the issue on Travis we can follow: https://github.com/travis-ci/travis-ci/issues/4055

ws233 commented 9 years ago

I've rebased the branch onto Makefile branch. I've also modified Travis config file so it uses xCode 7, but there are still build errors. I'll take a look on them soon.

ws233 commented 9 years ago

Ok. I could succeed with Travis in this branch, but it seems there is something wrong with coveralls. It seems it cannot proceed due to some reason. @kevincon, could you take a look and figure out why coveralls hang?

So, a few things should be mentioned in this branch.

  1. xctool (which is used by default as a compiler in Travis CI) doesn't support Xcode 7 beta 6 and higher. Refer the issue for details: https://github.com/facebook/xctool/issues/528. So I've changed the travis configuration to use xcodebuild instead. I'm planning to change the configuration back to xctool right after the issue has been fixed. I'll create a ticket for that soon.
  2. Due to the first, the build is run serially, since there is no more build matrix and we use just a build script.
  3. Due to the second, I had to disable building libraries during Travis CI build, since every dependent library compilation takes about 40 minutes and there is a time limit for the build in the Travis CI, which is 50 minutes only.
  4. So far xcode7 build environment doesn't contain iPhone simulator 7.1 and 8.1, only 9.0. So I've commented them so far, until Travis CI team add them into xcode7 environment. They told me the ticket is already created for that and will be finished very soon.

It seems that Xcode 7 is released on September 16 with iOS 9. So let's have everything ready for it here.

kevincon commented 9 years ago

I tried restarting the build on Travis, but even after it succeeded again it still did not report coverage info to Coveralls. I'm not sure why that's happening, because the last part of the build log on Travis shows that it was able to find the coverage files, parse them for coverage percentages, and submit them to Coveralls.

It might just be an issue on Coveralls' end, but maybe we should switch to a different coverage reporting script? I found a few other candidates that look like they have nice integration with XCode projects, Travis, and Coveralls: