Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libclang not found when building using azure pipelines for windows #2091

Open
mamcx opened this issue Aug 4, 2021 · 0 comments
Open

libclang not found when building using azure pipelines for windows #2091

mamcx opened this issue Aug 4, 2021 · 0 comments

Comments

@mamcx
Copy link

mamcx commented Aug 4, 2021

build.log
Recently all my windows build failed with:

thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', D:\a\1\s$(HOME)/.cargo/registry\src\github.aaakk.us.kg-1ecc6299db9ec823\bindgen-0.58.1\src/lib.rs:2057:31

I have this small sample:

[package]
name = "sync"
version = "0.2.0"
authors = ["Sample"]
edition = "2018"

[dependencies]
xlsxwriter = "0.3.5"

I tried to set the ENV but it not work:

trigger:
  branches:
    include:
      - 'master'

strategy:
  maxParallel: 2
  matrix:
    windows-stable:
      imageName: 'windows-latest'
      rustup_toolchain: stable

pool:
  vmImage: $(imageName)

steps:
  - script: |
      cargo version
      rustc --version
      rustup toolchain list
      setx PATH "C:\Program Files\LLVM\bin;%PATH%" /M
      setx LIBCLANG_PATH "C:\Program Files\LLVM\bin" /M
      echo %path:;=&echo.%
      refreshenv
    displayName: Versions

  - script: |
      cargo build --bin sync --release
    env:
      LIBCLANG_PATH: "C:\Program Files\LLVM\bin"
    displayName: Cargo build Windows
    condition:  eq( variables['Agent.OS'], 'Windows_NT' )

P.D. This could be similar to #1797.
P.D.2: I attached the full log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant