今天在rk3399pro开发板上编译rockchip的rga库,
出现了如下错误:
librga.so: undefined reference to pthread_mutexattr_destroy' librga.so: undefined reference to
pthread_mutexattr_setpshared’
librga.so: undefined reference to `pthread_mutexattr_init’
collect2: error: ld returned 1 exit status
CMakeFiles/im2d.dir/build.make:121: recipe for target ‘im2d’ failed
make[2]: *** [im2d] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/im2d.dir/all’ failed
make[1]: *** [CMakeFiles/im2d.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2
可以通过以下两种方法解决
方法1:
之前命令:./cmake-linux.sh
修改命令:./cmake-linux.sh -lpthread
方法2:
在buildroot.cmake需要加上SET(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -pthread”)
源码编译出现undefined reference to `pthread_mutexattr_destroy错误
最新推荐文章于 2024-07-06 23:34:53 发布