Closed xonaman closed 3 months ago
@xonaman hello.
could you please take a look at whether the symbol is exists, you can refer to https://github.com/rainyl/opencv_dart/issues/24#issuecomment-2047320726
I assume you mean symbols opencv_dart | grep IMRead
. Here’s the output:
~/.pub-cache/hosted/pub.dev/opencv_dart-1.2.1/ios/opencv_dart.framework % symbols opencv_dart | grep IMRead
0x000000000009a9b0 ( 0x2f0) Image_IMRead [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000009c460 ( 0x340) Image_IMRead_Async [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
Yes, it is.
did you run setup manually? since i see 'opencv_dart.framework', it should be 'opencv_dart.xcframework', and there should be two subdirectory in it, arm64 for real device and x86_64 for simulator, cd to arm64 and run 'symbols opencv_dart | grep IMRead', and then tell me the result please.
I do not use iPhone so can't test it by myself, what i can help is give you the possible solution, hope you won't be bored.
@xonaman The correct structure of ~/.pub-cache/hosted/pub.dev/opencv_dart-1.2.1/ios
should be like:
you can try to run setup manually with dart run opencv_dart:setup ios -a os64 -f
and try again
@rainyl After dart run opencv_dart:setup ios -a os64 -f
, my ~/.pub-cache/hosted/pub.dev/opencv_dart-1.2.1/ios
looks like this:
robertmainzer@MacBook-Pro-2 ios % find .
.
./Makefile
./opencv_dart.framework
./opencv_dart.framework/opencv_dart
./opencv_dart.framework/Info.plist
./libopencv_dart-ios-os64.tar.gz
./opencv_dart.xcframework
./opencv_dart.xcframework/ios-x86_64-simulator
./opencv_dart.xcframework/ios-x86_64-simulator/opencv_dart.framework
./opencv_dart.xcframework/ios-x86_64-simulator/opencv_dart.framework/opencv_dart
./opencv_dart.xcframework/ios-x86_64-simulator/opencv_dart.framework/Info.plist
./opencv_dart.xcframework/ios-arm64
./opencv_dart.xcframework/ios-arm64/opencv_dart.framework
./opencv_dart.xcframework/ios-arm64/opencv_dart.framework/opencv_dart
./opencv_dart.xcframework/ios-arm64/opencv_dart.framework/Info.plist
./opencv_dart.xcframework/Info.plist
./opencv_dart.podspec
I build with that again using flutter build ipa --release
and still the error occurs.
https://github.com/rainyl/opencv_dart/actions/runs/10259385478/job/28383772890?pr=204#step:5:116
I have no apple devices so can't test it, but it seems every thing is okay in the above logs.
not sure why.
may that help? i found it on tflite repo
i see that they show in the action logs, but maybe they get stripped somehow on running on device?
may that help? i found it on tflite repo
i see that they show in the action logs, but maybe they get stripped somehow on running on device?
I think so.
No response for a long time, I am going to close this issue, feel free to reopen it again if anyone still have more problems.
For the solution, please check the advice posted by abdelaziz-mahdy https://github.com/rainyl/opencv_dart/issues/200#issuecomment-2277701671, I cant test it.
I got the same problems :(
Device: Mac M1 14.4 Simulator
opencv_dart: ^1.2.1
3.24.0 Flutter SDK
symbols opencv_dart | grep IMRead
0x000000000009a9b0 ( 0x2f0) Image_IMRead [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000009c460 ( 0x340) Image_IMRead_Async [FUNC, EXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
Here is my pub folder
@kreazyme try to set the strip style, https://docs.flutter.dev/platform-integration/ios/c-interop#stripping-ios-symbols
Finnaly, I try to run opencv_dart:setup
and flutter clean && flutter pub get
many of many times, and it's worked well.
Many thank to @rainyl 😄
Finnaly, I try to
run opencv_dart:setup
andflutter clean && flutter pub get
many of many times, and it's worked well. Many thank to @rainyl 😄
Great! Thanks for your solution~
@kreazyme try to set the strip style, https://docs.flutter.dev/platform-integration/ios/c-interop#stripping-ios-symbols
I think that should be added to readme, to avoid the problem in the future
I think that should be added to readme, to avoid the problem in the future
Agree, and a Q&A section is necessary.
@abdelaziz-mahdy your solution worked in my case. Thank you so much!
glad to help <3
I've tried all the solutions, but hadn't have success. Tried to run opencv_dart:setup
and flutter clean
&& flutter pub get
many of many times without any success. How to solve this issue? Thank you in advance!
I've tried all the solutions, but hadn't have success. Tried to run
opencv_dart:setup
andflutter clean
&&flutter pub get
many of many times without any success. How to solve this issue? Thank you in advance!
Your issue is different, increase your minimum os version and it should work correctly
@frg-x Get it, I am working on it.
Hey!
I am using version 1.2.1 and got everything working on the simulator (iOS).
When building for release and running that on a real device (iOS), I encounter the following issue:
Invalid argument(s): Failed to lookup symbol 'Image_IMRead_Async': dlsym(RTLD_DEFAULT, Image_IMRead_Async): symbol not found
I have looked into https://github.com/rainyl/opencv_dart/issues/144 and can confirm that
opencv_dart.xcframework
exists in~/.pub-cache/hosted/pub.dev/opencv_dart-1.2.1/ios
.I think there must be some setting that I need to enable to make the libs shipping with the release build.
Can anyone help?