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

New warning in 5.2.1 #154

Closed
keith opened this issue Oct 20, 2015 · 4 comments
Closed

New warning in 5.2.1 #154

keith opened this issue Oct 20, 2015 · 4 comments

Comments

@keith
Copy link
Contributor

keith commented Oct 20, 2015

After updating from 5.2.0 to 5.2.1 we started getting a new warning:

ld: warning: ignoring file ~/project/Pods/CardIO/CardIO/libopencv_core.a, missing required architecture x86_64 in file ~/project/Pods/CardIO/CardIO/libopencv_core.a (3 slices)
ld: warning: ignoring file ~/project/Pods/CardIO/CardIO/libopencv_imgproc.a, missing required architecture x86_64 in file ~/project/Pods/CardIO/CardIO/libopencv_imgproc.a (3 slices)

It looks like the opencv static libraries weren't compiled as they should have been. You can see the difference in architectures vs the CardIO static library:

% file libopencv_core.a
libopencv_core.a: Mach-O universal binary with 3 architectures
libopencv_core.a (for architecture armv7s):     current ar archive random library
libopencv_core.a (for architecture armv7):      current ar archive random library
libopencv_core.a (for architecture arm64):      current ar archive random library
% file libCardIO.a
libCardIO.a: Mach-O universal binary with 5 architectures
libCardIO.a (for architecture armv7):   current ar archive random library
libCardIO.a (for architecture armv7s):  current ar archive random library
libCardIO.a (for architecture i386):    current ar archive random library
libCardIO.a (for architecture x86_64):  current ar archive random library
libCardIO.a (for architecture arm64):   current ar archive random library
@dgoldman-pdx
Copy link
Member

Since the iOS simulator lacks a camera, the simulator builds (x86_64, i386) are not supposed to include the OpenCV libraries. All OpenCV calls in card.io are under an appropriate compiler flag.

Thus, the OpenCV static libraries do not need to be built for x86_64 and i386.

Sounds like the project is failing to exclude these libraries for these architectures.

@keith
Copy link
Contributor Author

keith commented Oct 20, 2015

Ah interesting, that makes sense. We're including CardIO through CocoaPods, so I assume anyone using CocoaPods for this would see the same issue.

@bluk
Copy link
Contributor

bluk commented Oct 20, 2015

I am labeling this as an enhancement only because this seems to be fairly harmless right now. For CocoaPods, http://blog.carbonfive.com/2014/01/24/cocoapods-for-device-only-ios-libraries/ seems to be a way to change the Podspec; there didn't seem to be an easier way in a quick search.

@bluk
Copy link
Contributor

bluk commented Nov 3, 2015

Should be fixed in release 5.2.2. The x86_64 and i386 slices were added. Even though they aren't used, removing them presented problems with Carthage support, so the short term solution is a temporary size increase in the OpenCV libraries.

@bluk bluk closed this as completed Nov 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants