Code Monkey home page Code Monkey logo

Comments (8)

headupinclouds avatar headupinclouds commented on September 17, 2024

But I get the error: Environment variable POLLY_IOS_DEVELOPMENT_TEAM is empty (see details: http://polly.readthedocs.io/en/latest/toolchains/ios/errors/polly_ios_development_team.html)

Take a look at the link provided in the polly log message. It should tell you what you need to do. If you are still having problems let me know. That should get your build working. After that, you may have to decide how you want to integrate the library in your project. If you build your application or SDK with Hunter, it will be straightforward. If you want to integrate in an existing application without using Hunter, then you could create a dynamic framework to drop into an Xcode project. I'll follow up with some notes on how to do that.

This repository makes use of the cross platform unit testing framework gauze. If you want to confirm that things are building/running properly for your device, or you want to run a benchmark, you can do the following:

  • tether an iOS device to your host machine
  • install ios-deployand make sure it is in your PATH, see: https://gauze.readthedocs.io/en/latest/prereq/ios.html
  • build, then install and run tests on your device using a suitable iOS toolchain with a command like this: polly.py --toolchain ios --config RELEASE --fwd HUNTER_CONFIGURATION_TYPES=RELEASE ACF_BUILD_TESTS=ON --install --verbose --test

from acf.

headupinclouds avatar headupinclouds commented on September 17, 2024

I've added ACF_BUILD_SHARED_SDK in #60 , so you can generate a dynamic framework for iOS using a command like this:

polly.py --toolchain ${TOOLCHAIN} --config ${CONFIG} --fwd HUNTER_CONFIGURATION_TYPES=${CONFIG} ACF_BUILD_SHARED_SDK=ON --install --verbose --framework --reconfig --framework-lib libacf.dylib

I've added some additional notes for this scenario in the README here

from acf.

haithanhp avatar haithanhp commented on September 17, 2024

Thank you so much. I will try to use it for my iOS project and give you the feedbacks. Thanks again for supporting me.

from acf.

haithanhp avatar haithanhp commented on September 17, 2024

Hi,
I use your updated codes to build library for iOS. However, I got the error. Here is the log file.

log.txt

I use command line: polly.py --toolchain ios --config RELEASE --fwd HUNTER_CONFIGURATION_TYPES=RELEASE ACF_BUILD_SHARED_SDK=ON --install --verbose --framework --reconfig --framework-lib libacf.dylib

from acf.

headupinclouds avatar headupinclouds commented on September 17, 2024

At first glance it looks like the OpenCV WebP dependency is failing due to some SIMD ARM NEON optimizations that aren't supported (possibly because it is attempting to use those on a simulator architecture). I'll try to reproduce that later this week. There are 3 things you can try:

  1. Disable WebP in your OpenCV package. You can do that by modifying cmake/Hunter/config.cmake:
if(IOS OR ANDROID)
  # local workaround for protobuf compiler crash with Xcode 8.1
  # see https://github.com/elucideye/acf/issues/41
  set(opencv_cmake_args
    WITH_PROTOBUF=OFF
    BUILD_PROTOBUF=OFF
    BUILD_LIBPROTOBUF_FROM_SOURCES=NO
    BUILD_opencv_dnn=OFF
    
    WITH_JASPER=OFF
    BUILD_JASPER=OFF
    
    WITH_WEBP=OFF  ####### ADD
    BUILD_WEBP=OFF ####### ADD
  )
  hunter_config(OpenCV VERSION ${HUNTER_OpenCV_VERSION} CMAKE_ARGS ${opencv_cmake_args})  
endif()
  1. Skip the simulator architectures. For the ios.cmake toolchain you may end up building 5 architectures, which can take a long time.

See: https://github.com/ruslo/polly/blob/4dcb237f387d445d8b82e9c26a582b4ec7519855/ios.cmake#L32-L40

My guess is that this is related to webp + simulator builds.

grep IPHONESIMULATOR_ARCH ${POLLY_ROOT}/ios.cmake 
  set(IPHONESIMULATOR_ARCHS i386;x86_64)

You could find an iOS toolchain that matches your desired Xcode + iOS SDK version using only device architectures and try that. For example, my current xcrun --sdk iphoneos --show-sdk-version reports 11.3, in which case I might use the following single architecture toolchain ios-11-3-dep-9-0-arm64.

  1. Try to debug the OpenCV + WebP build logic. It looks like you've hit a bug, and it would be nice to sort it out upstream.

from acf.

headupinclouds avatar headupinclouds commented on September 17, 2024

This should be fixed in Hunter v0.20.75 (available here after merging #65)

credit @ruslo :

from acf.

headupinclouds avatar headupinclouds commented on September 17, 2024

Please pull the latest and test with ACF >= v0.1.7. The opencv+webp+simulator issue should be resolved.

from acf.

headupinclouds avatar headupinclouds commented on September 17, 2024

Closing old issue

from acf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.