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

When I build project, I got the error : undefined reference to `__aarch64_ldadd4_acq_rel' #61

Open
Feinno-zhouyanxjs opened this issue Sep 9, 2024 · 5 comments

Comments

@Feinno-zhouyanxjs
Copy link

NDK version : 21.3.6528147
CMAKE version : 3.10.2.4988404
My CMakeLists.txt file:
`project(yolov8ncnn)

cmake_minimum_required(VERSION 3.10)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")

set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.6.0-android/sdk/native/jni)
find_package(OpenCV REQUIRED core imgproc)

set(ncnn_DIR ${CMAKE_SOURCE_DIR}/ncnn-20221128-android-vulkan/${ANDROID_ABI}/lib/cmake/ncnn)
find_package(ncnn REQUIRED)

add_library(yolov8ncnn SHARED yolov8ncnn.cpp yolo.cpp ndkcamera.cpp)

#target_link_libraries(yolov8ncnn ncnn ${OpenCV_LIBS} camera2ndk mediandk)
target_link_libraries(yolov8ncnn ncnn ${OpenCV_LIBS} camera2ndk mediandk c++_shared)`

How can I fix this issue! THANKS!

@XiezhDev
Copy link

ndk版本的问题,你的ndk版本跟ncnn不兼容

@Feinno-zhouyanxjs
Copy link
Author

Feinno-zhouyanxjs commented Sep 11, 2024

谢谢你的回复。
在local.properties文件,我配置下面这些版本的ndk,貌似都不能编译通过。
20.1.5948944
21.1.6352462
21.3.6528147
22.0.7026061
23.1.7779620
23.2.8568313
25.1.8937393

sdk.dir=/Users/ray/Library/Android/sdk
cmake.dir=/Users/ray/Library/Android/sdk/cmake/3.10.2.4988404
ndk.dir=/Users/ray/Library/Android/sdk/ndk/25.1.8937393

问题在哪里呢?

@XiezhDev
Copy link

image image image image 可以参考下我的改动,你这个问题估计是ndk版本的问题,可以用最新的,我用的是 26.2.11394342

@XiezhDev
Copy link

XiezhDev commented Sep 11, 2024

这个项目不能用最新的yolov8,现在的yolov8代码跟当时调整了,最新版本的导出的.param .bin拿过来用会闪退,网上很多方法都试了,什么修改模型结构,都不行,建议看下 这个 https://github.com/wkt/YoloMobile/tree/main?tab=readme-ov-file,这个能拿最新版本的yolov8导出的模型直接过来用

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