cmake config_error ai_generated true

CMake Error: found library with wrong architecture

ID: cmake/find-library-wrong-arch

Also available as: JSON · Markdown
82%Fix Rate
86%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3 active

Root Cause

Found library compiled for different CPU architecture.

generic

Workarounds

  1. 90% success Install correct architecture library: apt-get install lib:amd64
  2. 88% success Set CMAKE_SYSTEM_PROCESSOR and CMAKE_FIND_ROOT_PATH for cross-compilation

Dead Ends

Common approaches that don't work:

  1. Force link with -L and ignore arch 88% fail

    Linker error or crash

  2. Use file from wrong sysroot 82% fail

    ABI mismatch