ApsarasX/llvm-bindings

[Bug]llvm-bindings@0.4.2 postinstall: `cmake-js compile`

Closed this issue · 5 comments

Your environment

  • OS version: windows10 64
  • Node.js version: v14.17.6.
  • LLVM version: 13.0.1

Could not find a configuration file for package "LLVM" that is compatible
with requested version "14".

Expected behavior

A clear and concise description of what you expected to happen.

I speculate the problem is that
'npm config set cmake_LLVM_DIR C:\Users\dev\llvm-13.0.1.src\build\lib\cmake\llvm'
i dont know how to verify if it right.

CMake Error at cmake/CMakeJS.cmake:31 (string):
string sub-command FIND: unknown last parameter
Call Stack (most recent call first):
cmake/CMakeJS.cmake:55 (get_variable)
CMakeLists.txt:9 (include)

CMake Error at cmake/LLVM.cmake:8 (find_package):
Could not find a configuration file for package "LLVM" that is compatible
with requested version "14".

The following configuration files were considered but not accepted:

C:/Users/dev/llvm-13.0.1.src/llvm-13.0.1.src/build/lib/cmake/llvm/LLVMConfig.cmake, version: 13.0.1
C:/Users/dev/llvm-13.0.1.src/llvm-13.0.1.src/build/lib/cmake/llvm/llvm-config.cmake, version: unknown

Call Stack (most recent call first):
CMakeLists.txt:11 (include)

You need to update your LLVM to 14 for llvm-bindings@v0.4.2 to work.

Please refer to https://github.com/ApsarasX/llvm-bindings#compatibility for details.

I have instelled teh new LLVM 14.0.6 by LLVM-14.0.6-win64.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found NPM
-- Found CMake.js
CMake Error at cmake/CMakeJS.cmake:31 (string):
string sub-command FIND: unknown last parameter
Call Stack (most recent call first):
cmake/CMakeJS.cmake:55 (get_variable)
CMakeLists.txt:9 (include)

CMake Error at cmake/LLVM.cmake:8 (find_package):
Could not find a package configuration file provided by "LLVM" (requested
version 14) with any of the following names:

LLVMConfig.cmake
llvm-config.cmake

Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:11 (include)

This problem has nothing to do with llvm-bindings, it has to do with how you installed LLVM.
The LLVM-14.0.6-win64.exe is a slim package so that you need to compile from source code if you want to use LLVM.