Skip to content

[zig] was built/linked incorrectly: LLVM and Clang have separate copies of libc++ #27280

@vyapaari

Description

@vyapaari

Description / Steps to reproduce the issue

Package Version

mingw-w64-clang-x86_64-zig 0.15.2

Environment

  • OS : Windows (GitSDK/MSYS2)
  • Environment : CLANG64
  • Shell : bash (Git SDK 64-bit)

Describe the Bug

When running zig version or attempting to compile any Zig code within the CLANG64 environment of GitSDK/MSYS2, the compiler fails immediately with a linker consistency error. This indicates that the Zig binary was linked against multiple incompatible copies of the LLVM C++ standard library.

Expected behavior

Expected Behavior

The command should return the version number and exit successfully, and compilation should proceed without library linkage errors.

Additional Context

This issue was identified while running zig commands . The path to the standard library being used is C:\git-sdk-64\clang64\lib\zig\std\ . It appears the package needs to be rebuilt ensuring that both LLVM and Clang dependencies are linked against the same libc++ instance.ig version

Actual behavior

Steps to Reproduce

  1. Open a Git SDK 64-bit terminal (or MSYS2 CLANG64).
  2. Run zig version .

Actual Behavior
0.15.2 error: Zig was built/linked incorrectly: LLVM and Clang have separate copies of libc++ If you are dynamically linking LLVM, make sure you dynamically link libc++ too

Verification

Windows Version

MINGW64_NT-10.0-26200

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

Not Sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions