card.io-iOS-SDK icon indicating copy to clipboard operation
card.io-iOS-SDK copied to clipboard

Unable to build with existing OpenCV framework

Open AdamSwinden opened this issue 9 years ago • 4 comments

I'm building an app that already uses the iOS OpenCV 2 framework to perform some image processing. When I add the Card.io iOS SDK I get a load of build errors that look like clashes with its own OpenCV implementation. If I remove the original OpenCV framework the app builds fine but none of the image processing code works.

Any thoughts on how I can get this building and running?

screen shot 2015-10-06 at 15 51 10

AdamSwinden avatar Oct 06 '15 14:10 AdamSwinden

@dgoldman-ebay spent a bunch of time making this work correctly automatically with some linker tricks. I wonder whether the recent bitcode change from @bluk broke this. Speculation: Since we no longer get to strip out known unused symbols, we get not just stupidly large downloads but symbols which @dgoldman-ebay's targeted fix list does not include.

@AdamSwinden if you try one release back, does it work?

josharian avatar Oct 06 '15 21:10 josharian

Oh, and if the problem is a lack of stripping, we should be able to use the whitelist put together by Dave to manually strip things ourselves.

Grumble grumble bitcode grumble

josharian avatar Oct 06 '15 21:10 josharian

Looks like you were right @josharian. Using 5.1.1 fixes the issue.

AdamSwinden avatar Oct 07 '15 10:10 AdamSwinden

Apparently, one of the magic linker flags that enables the limited exported symbols in libCardIO.a was the GENERATE_MASTER_OBJECT_FILE flag. It seems to have some trouble with Bitcode if it's enabled. However, for the latest release, the libCardIO.a is split from the other OpenCV libraries to help with the size of the individual files. Does that help?

bluk avatar Oct 19 '15 19:10 bluk