Legoless / OpenCV-Dynamic

OpenCV iOS Dynamic Framework Podspec
http://opencv.org
Other
24 stars 13 forks source link

Can't build CocoaPod #3

Closed Yoric closed 6 years ago

Yoric commented 7 years ago

I'm using the following CocoaPod:

platform :ios, '9.0'

workspace 'MyApp'

target 'MyApp' do
  use_frameworks!

  # Pods for MyApp
  pod 'OpenCV-Dynamic', '~> 3.x'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MyAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

then running pod install

I get the following error:

/Users/david/Library/Caches/CocoaPods/Pods/Release/OpenCV-Dynamic/3.2.2-81ec0/opencv/modules/core/src/arithm_simd.hpp:1200:29: error: use of undeclared identifier 'hasSIMD128'
    Div_SIMD() { haveSIMD = hasSIMD128(); }

Attaching full build logs.

logs.txt

I don't think it matters, but I have cmake 3.7.2 and clang-800.0.42.1.

Legoless commented 7 years ago

Hmm, there is likely to be a default setting that xcodebuild reads and screws it up. Or it could be something that was removed in newer Xcode. Clang and cmake versions look okay.

Which Xcode are you using and what is the output of xcode-select --version?

Yoric commented 7 years ago

I'm using XCode 8.2.1 and I get xcode-select version 2343.

Legoless commented 7 years ago

My xcode-select returns version 2347. Can you try to reinstall command line tools with xcode-select --install and try again?

Legoless commented 7 years ago

And do a pod update first, I pushed a new version that uses main OpenCV repository instead of my fork.

Yoric commented 7 years ago

Can you try to reinstall command line tools with xcode-select --install and try again?

According to xcode-select --install, it seems that it's done through the AppStore these days. Should I still do it?

Yoric commented 7 years ago

Updated pod (even CocoaPods itself, since there was apparently a new release), got essentially the same message:

log.txt

I'll look into de/re-installing the XCode command-line tools.

Yoric commented 7 years ago

Well, according to both softwareupdate and AppStore, I have the latest version of xcode. Maybe you are using XCode 8.3 beta?

Legoless commented 7 years ago

I'm not using the Beta version. I'll have a detailed look, apparently there is some compiler option active that shouldn't be in your configuration.

Yoric commented 7 years ago

Would this be influenced by the settings in my current XCode project or is this a system-wide stuff?

I'm targeting iOS 10.2, btw.

Legoless commented 7 years ago

The target is good. Only the minimum target is defined, which is iOS 8.x. I'm doing a clean install right now, will let you know if I run into this issue.

Yoric commented 7 years ago

Important configuration note: I have MacPorts installed. I suppose that it may somehow interfere.

Legoless commented 7 years ago

I have tried by installing MacPorts as well, doesn't seem to be the issue. Looking more into it. It's gonna be hard to fix until I can reproduce the issue, it must be somewhere with build scripts though. Can you try cloning the opencv repository directly and building the framework manually by using this command: python opencv/platforms/ios/build_framework.py ios --dynamic?

And if this fails, please try also without --dynamic option.

Let me know how it goes.