← All tasks
cpplibjxl/libjxl #3855Not a task: already works

Failed to generate build files on clang GNU frontend on Windows with `-DJPEGXL_STATIC=ON`

envgap__libjxl__libjxl-3855

01 / FAILURE SIGNATURE

As reported upstream

Neither lock free instructions nor -latomic found.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
6f57ce403783b7ebfe011a9b1c93c16724b69a15
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

libjxl/libjxl #3855 · read the original issue
**Describe the bug**

After #3837, CMake can no longer produce build files due to failing atomics check. This only happens with Clang with GNU driver and `-DJXL_STATIC=ON`. This means, MSVC and Clang with MSVC driver (clang-cl) are not affected, and Clang with GNU driver with `-DJXL_STATIC=OFF` is not affected.

```

-- The C compiler identification is Clang 19.1.0 with GNU-like command-line

-- The CXX compiler identification is Clang 19.1.0 with GNU-like command-line

...

-- Performing Test ATOMICS_IN_LIBRARY

-- Performing Test ATOMICS_IN_LIBRARY - Failed

CMake Error at cmake/FindAtomics.cmake:49 (message):

  Neither lock free instructions nor -latomic found.

Call Stack (most recent call first):

  C:/Users/Alifian/scoop/apps/vcpkg/current/scripts/buildsystems/vcpkg.cmake:859 (_find_package)

  CMakeLists.txt:262 (find_package)

```



**To Reproduce**

Steps to reproduce the behavior:

Use `-DJPEGXL_STATIC=ON` together with Clang-GNU driver (`-DCMAKE_CXX_COMPILER=clang++`)



**Environment**

 - OS: [e.g. Windows 11 23H2]

 - Compiler version: Clang 19.1.0

 - CPU type: x86_64
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]