KleinYuan / Caffe2-iOS

Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
MIT License
227 stars 45 forks source link

I got a issues when build the target #17

Closed Kyuuki93 closed 7 years ago

Kyuuki93 commented 7 years ago

When I trying to build the target, I got many warning and errors like this:

ld: warning: ignoring file /Users/Church/Caffe2-iOS/src/caffe2-ios/caffe2-ios/opencv2.framework/opencv2, file was built for unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) which is not the architecture being linked (armv7): /Users/Church/Caffe2-iOS/src/caffe2-ios/caffe2-ios/opencv2.framework/opencv2

The opencv framework was ignored, it seems two kind of architectures were not matched, but I'm not sure what the real problem is, did I do something wrong?

Thanks for your help anyway.

KleinYuan commented 7 years ago

@Kyuuki93 I assume this is because of the new commit I did two days ago. I updated the opencv2.framework with a fresh built so that it's pure static and compatible without problem for archiving. However, the new opencv2.framework contains a file called opencv2, which is around 130MB, way too large to fit a git commit. Therefore, I used git lfs to store big files, including all pb models. I think this waring is because of cloning did not fetch the files stored in lfs hosting.

Check the following:

  1. You have Git lfs installed
  2. Do a fresh clone again
  3. If still problematic, try this

Also make sure that you are building target against an actual device instead of a simulator.

I will update the readme to include the content above.

Another workaround is that you can switch branch to 2-0-stable which should not have this problem, but potentially with issues of archiving (which you may not care).

KleinYuan commented 7 years ago

@Kyuuki93 I update the document for GIT LFS: https://github.com/KleinYuan/Caffe2-iOS#lfs-clone

Since this is implementing issue, I will close it and feel free to reopen it if you still meet this problem.