https://bugs.kde.org/show_bug.cgi?id=444547

            Bug ID: 444547
           Summary: Build failure on Linux Clang targets with usage of
                    atomics
           Product: extra-cmake-modules
           Version: unspecified
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: ecm-bugs-n...@kde.org
          Reporter: sh...@sdf.org
  Target Milestone: ---

SUMMARY

The sources we use to check if the atomic libraries are present or not, by
default with the compiler are incomplete. Which results in the assumption that
the library is present at compile time, when the full version actually isn't. 

This results in linking error: 

ld.lld: error: undefined symbol: __atomic_is_lock_free

STEPS TO REPRODUCE
1. Use clang (x86_64-pc-linux-gnu)
2. Compile
https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/modules/CheckAtomic.cmake#L44-50
without linking atomic
3. Compile https://invent.kde.org/-/snippets/1924 again without linking atomic

OBSERVED RESULT

Things work in the first case (step 2), but fail in second (step 3). Hence,
misdirecting the compiler.

ADDITIONAL INFORMATION

clang version: 12.0.1
Target: x86_64-pc-linux-gnu

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to