Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

libCardIO.a as zip #41

Closed
Bunn opened this issue Oct 7, 2015 · 7 comments
Closed

libCardIO.a as zip #41

Bunn opened this issue Oct 7, 2015 · 7 comments

Comments

@Bunn
Copy link

Bunn commented Oct 7, 2015

Suggestion:
I don't think it's a good idea to set libCardIO.a as a zip file. It doesn't work well with submodules. For example, I have a project that uses card.io as a submodule, it worked fine, but on the newest versions the libCardIO.a was changed to a zip file, now I have to decompress it and add on my git library. This adds two big problems:

It gets harder to use git submodule to update the library, since it needs to be manually unzipped every time;
It adds the need to add the library to the main repo. Duplicating the files required to download, besides bloating the repo with unnecessary files that could be handled by the submodule.

I'm not sure if this suggestion makes more sense on this repo or on https://github.com/card-io/card.io-iOS-SDK. Feel free to close it if I should have added this on the other repo.
Thanks.

@josharian
Copy link
Member

FWIW, I agree. The root problem is that the files are so big, which is a consequence of the BitCode changes (not the only one), and the right fix is to make the files smaller again. Cc @bluk who did the original hard work of making BitCode work at all.

@bluk
Copy link
Contributor

bluk commented Oct 7, 2015

This is one of my top concerns. There are a few things that had to be considered. Primarily Github itself does not allow files over 100MB so that's why the file is zipped, and CocoaPods as-is needs the library in the repo vs a GitHub release file last I looked.

Like Josh said, the ultimate fix is to find a way to shrink the libraries. I've tried a few different things but nothing significantly changed the library size with Bitcode enabled. I would appreciate suggestions but will continue to explore other possibilities for prebuilt binaries.

I'm hoping that a version of Xcode will fix the issue with the unused symbols from OpenCV where we can revert some of the linker build changes. That may help the size. I believe there are Apple bug report radars for some of those issues filed by different parties as well.

@Bunn
Copy link
Author

Bunn commented Oct 8, 2015

Maybe this could be a workaround for the time being?
https://github.com/blog/2069-git-large-file-storage-v1-0

@josharian
Copy link
Member

@bluk can you get llvm-nm (http://llvm.org/docs/CommandGuide/llvm-nm.html) to spit out a listing of the symbols with sizes? It would be good to understand whether th rpbolem is large symbols or a lack of stripping (or both).

If the problem is no stripping, I think that there ought to be an LLVM tool that you can use to remove symbols from BitCode, at which point we could extract the BitCode segment, edit it to remove all unneeded symbols, and then reassemble.

If the problem is large symbols due to optimization or debug info, k think we could in theory use opt and LLVM-dwarf to strip those out (again after extracting the relevant segment).

Sorry for not having more detail, but I don't know LLVM well and I am on phone.

@Bunn thanks but no thanks. We should fix the underlying problem rather than adding epicycles.

@bluk
Copy link
Contributor

bluk commented Oct 19, 2015

Please try Release 5.2.1 where the libraries are split. libCardIO.a is now ~96MB so you should be able to store it in a GitHub (Enterprise) repository. You will need to also link in the 2 OpenCV libraries libopencv_core.a and libopencv_imgproc.a with your application. Thank you for your patience.

@bluk bluk closed this as completed Oct 19, 2015
@bluk
Copy link
Contributor

bluk commented Oct 19, 2015

BTW, turning on/off the Bitcode enabled build setting the split libCardIO.a library from ~5MB to ~96MB so this is still an issue worth investigating but hope this solution helps with some of the immediate pain.

cysp added a commit to cysp/card.io-iOS-source that referenced this issue Oct 16, 2017
+0aac4a05 Merge pull request card-io#41 from card-io/20170224_standardize_issue_template
+0aef13ce Standardize ISSUE_TEMPLATE.md
+d3e09c66 Standardize ISSUE_TEMPLATE.md
+4a6f5efc Standardize ISSUE_TEMPLATE.md
+8c62386a Merge pull request card-io#37 from cysp/feature/ios-compilefix
+324250d4 Forward-declare struct ScannerState for compatibility with the iOS project
+05dd0aee Merge pull request card-io#35 from cysp/feature/mastercard-2series
+02e1c436 Add MasterCard 2-Series
+4ae1cbf0 Merge pull request card-io#33 from COCUS-NEXT/feature/blur
+9a25c052 chore: variable rename: unblur to unblurDigits
+45e315dd Update license year and company
+d9381ce5 Merge pull request card-io#31 from card-io/dgoldman/master/docs
+25369d3f README.md: add pointers to some documentation
+3291a212 Merge pull request card-io#28 from COCUS-NEXT/feature/blur
+51538328 feat: implement blur in DMZ sources
+32d1bc13 Merge pull request card-io#27 from willsteel/master
+e4d68dcf fix: Android-source issue card-io#60
+2efa16c5 add x86-64
+269fc2f0 Merge pull request card-io#20 from card-io/android-64-bit
+b1c5f508 add 64-bit arm android processor detection
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants