Fix __atomic_load_8 issue on Raspberry Pi 32-bit Debian OS#24031
Fix __atomic_load_8 issue on Raspberry Pi 32-bit Debian OS#24031Qengineering wants to merge 1 commit intoopencv:4.xfrom
Conversation
| WRAP java objc python js | ||
| ) | ||
| ocv_target_link_libraries(${the_module} ${LAPACK_LIBRARIES}) | ||
| ocv_target_link_libraries(${the_module} ${LAPACK_LIBRARIES} ${CMAKE_SHARED_LINKER_FLAGS}) |
There was a problem hiding this comment.
This is wrong change:
- shared libraries build should already have these flags automatically
- static libraries build goes broken due to mess with shared flags.
|
I am familiar with the related issues. I've read them all and tried every suggested solution.Nothing solved the problem. In the end, the only thing that worked was this indeed this not-so-nice solution. |
Need to debug/investigate why these fixes don't work in your build configuration first. Use |
|
As requested, build with It outputs at 59% with: I hope it gives you the clue on how to solve the issue. |
|
Output of cmake configure step should be captured ( Try to run cmake configure stage with Also please grab full linker command line options for |
|
The With FORCE cmake generates : The atomic lib is linked in the last call. What to do? |
|
@Qengineering Thank you for the check.
Perhaps condition doesn't pass because this flag is not enabled
Regression is introduced in calib3d module which uses /cc @asmorkalov @ivashmak |
|
Opened issue: #24281 |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
When OpenCV is build on a Raspberry Pi with a 32-bit Debian OS, it errors with
undefined reference to '__atomic_load_8'The problem is the linkage of calib3d. Somehow it doesn't pull in
libatomic.so.By incorporating
${CMAKE_SHARED_LINKER_FLAGS}into theCMakeList.txtthis library is explicitly used in the build.Of course, the build must flag
-D CMAKE_SHARED_LINKER_FLAGS=-latomic.See also #Failed to install on Raspberry Pi (ARM) 32 bit