Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Targeting Ios on flutter. How to handle undefined symbols for 86_64 ios architectures ? #401

Closed
dopaminista opened this issue Dec 13, 2022 · 3 comments

Comments

@dopaminista
Copy link

How can I update crate's environment variables, build settings to avoid errors ?

With flutter rust binding library on ios setup, all of other classes are statically binded but some of them are not compatible to the target platform.

Build failed because of the undefined symbols for ios86_64 architectures

Error (Xcode): Undefined symbol: cv::imreadmulti(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, int)

Error (Xcode): Undefined symbol: cv::imreadmulti(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >&, int, int, int)

Error (Xcode): Undefined symbol: cv::large_kinfu::LargeKinfu::create(cv::Ptrcv::large_kinfu::Params const&)
Error (Xcode): Undefined symbol: cv::large_kinfu::Params::coarseParams()

Error (Xcode): Undefined symbol: cv::large_kinfu::Params::defaultParams()
Error (Xcode): Undefined symbol: cv::large_kinfu::Params::hashTSDFParams(bool)
Error (Xcode): Undefined symbol: cv::mixChannels(cv::_InputArray const&, cv::_InputOutputArray const&, int const*, unsigned long)

Error (Xcode): Undefined symbol: cv::mixChannels(cv::_InputArray const&, cv::_InputOutputArray const&, std::__1::vector<int, std::__1::allocator > const&)

Error (Xcode): Undefined symbol: cv::namedWindow(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int)

Error (Xcode): Undefined symbol: cv::polarToCart(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, bool)

Error (Xcode): Undefined symbol: cv::randShuffle(cv::_InputOutputArray const&, double, cv::RNG*)

Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternGenerator::getPattern()
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternGenerator::generatePattern()

Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternGenerator::RandomPatternGenerator(int, int)
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternCornerFinder::loadPattern(cv::Mat const&)
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternCornerFinder::loadPattern(cv::Mat const&, std::__1::vector<cv::KeyPoint, std::__1::allocatorcv::KeyPoint > const&, cv::Mat const&)
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternCornerFinder::getImagePoints()
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternCornerFinder::getObjectPoints()
Error (Xcode): Undefined symbol: cv::randpattern::RandomPatternCornerFinder::computeObjectImagePoints(std::__1::vector<cv::Mat, std::__1::allocatorcv::Mat >)
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Exited

Framework versions

  • Using opencv-rust 0.74.2
  • opencv2.framework for ios 4.6.0

Xcode configs

  • xcode 14.0 compatible project format,
  • using default clang flags.
  • target platform: ios11

Current environment variables for opencv-rust crate

  • OPENCV_LINK_PATHS="$(flutter_wrapper_dir)/ios"
  • OPENCV_LINK_LIBS="opencv2.framework, libc++.dylib"
  • OPENCV_INCLUDE_PATHS="$(all opencv2.framework headers)"(generated)
  • DYLD_FALLBACK_LIBRARY_PATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"(last version of tool chain)
@twistedfall
Copy link
Owner

Hi, I can't really help in this case as I don't have the necessary expertise, but there were reports mentioning successful builds for iOS, I would recommend searching the closed issue you might find the necessary hints.

@twistedfall
Copy link
Owner

Did you have any success? If so maybe you can share your solution.

@twistedfall
Copy link
Owner

I'll close the issue for now, if you still need help please feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants