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

CMake failing when libLLVMCore CONFIG has multiple values such as DEBUG;RELEASE #136

Closed
pvelesko opened this issue Sep 8, 2022 · 2 comments
Milestone

Comments

@pvelesko
Copy link
Collaborator

pvelesko commented Sep 8, 2022

Not sure what the minimum should be but 3.16 is too low

cmake .. -DCMAKE_PREFIX_PATH=~/local -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/home/ptu1/packages

-- Using llvm-config: /home/ptu1/packages/bin/llvm-config

-- Using llvm-link: /home/ptu1/packages/bin/llvm-link

-- Using llvm-spirv: /home/ptu1/packages/bin/llvm-spirv

-- Using clang-offload-bundler: /home/ptu1/packages/bin/clang-offload-bundler

-- OpenCL_LIBRARY: /soft/libraries/khronos/loader/master-2022.05.18/lib64/libOpenCL.so

-- LevelZero_LIBRARY: /soft/restricted/CNDA/emb/libraries/intel-level-zero/api_+_loader/20220711.1/lib64/libze_loader.so

-- Buiding CHIP-SPV as a shared library

-- CHIP-SPV will be installed to: /home/ptu1/packages

-- LLVM CMake directory: /home/ptu1/packages/lib/cmake/llvm

-- LLVM built with static libraries -> adding workaround for issue #102

CMake Error at llvm_passes/CMakeLists.txt:69 (get_target_property):

  get_target_property called with incorrect number of arguments

 

 

-- libLLVMCore CONFIG: DEBUG;RELEASE

-- libLLVMCore PATH:

ar: No such file or directory

CMake Error at llvm_passes/CMakeLists.txt:77 (message):

  ar command on failed

 

 

-- Configuring incomplete, errors occurred!

See also "/home/ptu1/workspace/chip-spv/build/CMakeFiles/CMakeOutput.log".

See also "/home/ptu1/workspace/chip-spv/build/CMakeFiles/CMakeError.log".

 

@pvelesko pvelesko changed the title CMake minimum too low CMake failing when 'ar' is not found Sep 8, 2022
@pvelesko pvelesko changed the title CMake failing when 'ar' is not found CMake failing when libLLVMCore CONFIG has multiple values such as DEBUG;RELEASE Sep 9, 2022
@pvelesko
Copy link
Collaborator Author

pvelesko commented Sep 9, 2022

When there are multiple values such as DEBUG;RELEASE, RELEASE becomes an additional argument causing get_target_property called with incorrect number of arguments error

@pvelesko
Copy link
Collaborator Author

Fixed in #130 by picking up the first configuration only:

  get_target_property(LLVMCORE_CONF LLVMCore IMPORTED_CONFIGURATIONS)
  string(REPLACE ";.*$" "" LLVMCORE_CONF "${LLVMCORE_CONF}")
  get_target_property(LLVMCORE_PATH LLVMCore IMPORTED_LOCATION_${LLVMCORE_CONF})

@pjaaskel @franz let me know this is ok

@pvelesko pvelesko added this to the 0.9 - the first release milestone Sep 12, 2022
pvelesko added a commit that referenced this issue Sep 12, 2022
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