Comments (7)
These matters also did not work:
-DCPU_BASELINE="" -DCPU_DISPATCH=""
-DCV_ENABLE_INTRINSICS=OFF
-DCV_DISABLE_OPTIMIZATION=ON
from opencv.
@fengyuentau could you take a look?
from opencv.
@alblib I cannot reproduce your issue. Below is my code (build with latest opencv) trying to reproduce it. Can you run it on your side?
CMakeLists.txt
:
cmake_minimum_required(VERSION 3.20)
project(test-opencv-linking)
find_package(OpenCV REQUIRED) # HINTS "/absolute/path/to/opencv/build/install"
message(STATUS "OpenCV_INCLUDE_DIRS=${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV_LIBS=${OpenCV_LIBS}")
add_executable(main main.cpp)
target_link_libraries(main ${OpenCV_LIBS})
target_include_directories(main PUBLIC ${OpenCV_INCLUDE_DIRS})
main.cpp
:
#include <iostream>
#include <vector>
#include <opencv2/opencv.hpp>
int main() {
std::cout << cv::getBuildInformation() << std::endl;
using namespace cv::dnn;
auto net = readNet("resnet50.onnx");
cv::Mat input(std::vector<int>{1, 3, 224, 224}, CV_32F);
net.setInput(input);
auto output = net.forward();
std::cout << output.size << std::endl;
return 0;
}
from opencv.
@fengyuentau Okay. I will test your code and other codes to find more detailed trace. maybe takes couple of days due to working hours
from opencv.
@fengyuentau On my side, same error occurs with even your code.
my system details:
iMac 2020
- Processor: 3.6 GHz 10-Core Intel Core i9
- Graphics: AMD Radeon Pro 5700 XT 16 GB
admin@iMacs-iMac opencv-test % cmake --build build --config Release
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[100%] Linking CXX executable main
ld: warning: ignoring duplicate libraries: '-lm', '/Users/admin/illuni/library/illuni_engine_v3_new_scheme/_deps/opencv-install/Darwin_arm64/lib/libopencv_core.a', '/Users/admin/illuni/library/illuni_engine_v3_new_scheme/_deps/opencv-install/Darwin_arm64/lib/libopencv_imgproc.a'
Undefined symbols for architecture arm64:
"cv::dnn::opt_NEON::convBlock_F32(int, float const*, float const*, float*, int, bool, int, int, int)", referenced from:
std::__1::__function::__func<cv::dnn::runFastConv(cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, cv::Ptr<cv::dnn::dnn4_v20240521::ActivationLayer> const&, std::__1::vector<float, std::__1::allocator<float>> const&, bool)::$_4, std::__1::allocator<cv::dnn::runFastConv(cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, cv::Ptr<cv::dnn::dnn4_v20240521::ActivationLayer> const&, std::__1::vector<float, std::__1::allocator<float>> const&, bool)::$_4>, void (cv::Range const&)>::operator()(cv::Range const&) in
"cv::dnn::opt_NEON::convBlockMR1_F32(int, float const*, float const*, float*, float, bool, float, float, bool, int, int)", referenced from:
std::__1::__function::__func<cv::dnn::runFastConv(cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, cv::Ptr<cv::dnn::dnn4_v20240521::ActivationLayer> const&, std::__1::vector<float, std::__1::allocator<float>> const&, bool)::$_4, std::__1::allocator<cv::dnn::runFastConv(cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, cv::Ptr<cv::dnn::dnn4_v20240521::ActivationLayer> const&, std::__1::vector<float, std::__1::allocator<float>> const&, bool)::$_4>, void (cv::Range const&)>::operator()(cv::Range const&) in
"cv::dnn::opt_NEON::winofunc_accum_F32(float const*, float const*, float*, int, int, int, int, int, int)", referenced from:
std::__1::__function::__func<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_1, std::__1::allocator<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_1>, void (cv::Range const&)>::operator()(cv::Range const&) in
"cv::dnn::opt_NEON::winofunc_AtXA_8x8_F32(float const*, int, float*, int, float*, int, float, float, float, bool)", referenced from:
std::__1::__function::__func<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_1, std::__1::allocator<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_1>, void (cv::Range const&)>::operator()(cv::Range const&) in
"cv::dnn::opt_NEON::winofunc_BtXB_8x8_F32(float const*, int, float*, int, int, int)", referenced from:
std::__1::__function::__func<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_0, std::__1::allocator<cv::dnn::runWinograd63(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::Ptr<cv::dnn::FastConv> const&, int, float, float, cv::dnn::dnn4_v20240521::ActivationLayer*, bool)::$_0>, void (cv::Range const&)>::operator()(cv::Range const&) in
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
from opencv.
Processor: 3.6 GHz 10-Core Intel Core i9
So you are on a x64 host but cross-compiling for arm64 macOS? Let me try to reproduce your issue later this week.
from opencv.
@fengyuentau Yes! I am on x64 macOS host and cross-compiling for arm64 macOS! Thank you so much! I am looking forward to your reply.
from opencv.
Related Issues (20)
- There seems to be an issue with the parallel_for_ function in the parallel.cpp file.
- Add SIMD256 intrinsics to demosaicing
- 3rdparty/ ndsrvp and hal_rvv seeems no lincense files. HOT 5
- all: http://opencv.org/license.html returns 404 status. HOT 3
- Docs for Python imshow example improvement
- HWASan error in BufferArea tests HOT 3
- OpenCV 4.10.0 segfault when using OpenVINO 2024.0.0 HOT 2
- phaseCorrelate fails with larger 16bit images
- dnn 5.x with OpenVINO 2022.1 backend doesn't pass integer tests because of the NaryEltwise layer
- HWASan error in G-API core test HOT 1
- CMake Error at cmake/OpenCVDetectCUDAUtils.cmake:297 (list): list GET given empty list HOT 8
- error: (-216:No CUDA support) OpenCV was not built to work with the selected device. Please check CUDA_ARCH_PTX or CUDA_ARCH_BIN in your build configuration. in function 'initCUDABackend'a support HOT 2
- Cant install latest opencv due to undefined reference (libcublas)
- G-API error in VASObjectTracker test HOT 1
- G-API error in some PatternMatchingIntegrationE2E tests HOT 1
- Does OpenCV really support FFmpeg 5.0+ on Windows?
- opencv still uses Concurrency Runtime in parallel_for_xxx functions on Windows
- Inconsistent result from segmentation sample for u2netp model HOT 1
- Possible memory leak in fastNlMeansDenoisingColored
- Opencv 4.5.4 with Cuda Build Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.