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

unqualified call to llvm-config #497

Closed
anbe42 opened this issue Oct 30, 2023 · 2 comments
Closed

unqualified call to llvm-config #497

anbe42 opened this issue Oct 30, 2023 · 2 comments
Assignees

Comments

@anbe42
Copy link

anbe42 commented Oct 30, 2023

Commit 1cde56c in branch ocl-open-170 added a call to llvm-config --libs all without checking where llvm-config resides ... on Debian it is not in the path (only llvm-config-17 is) but probably in ${LLVM_TOOLS_BINARY_DIR}.

cmake will complain about too few arguments to REGEX REPLACE as the last argument is empty if the llvm-config call failed.

Maybe you need

find_program(LLVM_CONFIG_EXE "llvm-config" ${LLVM_TOOLS_BINARY_DIR})

(untested, modeled after llvm-tblgen usage)

@wenju-he
Copy link
Contributor

wenju-he commented Oct 30, 2023

@anbe42 thank you for reporting the issue. You're right that we should use find_program. Will be fixed by #500 #501 #502

@wenju-he wenju-he self-assigned this Oct 30, 2023
wenju-he added a commit that referenced this issue Oct 31, 2023
llvm-config may have a different name in the default path, see #497.
On Ubuntu 22.04,
* https://apt.llvm.org/llvm.sh installs llvm-config-{VERSION} to
  /usr/bin folder. It is a symlink to /usr/lib/llvm-{VERSION}/bin/llvm-config.
* If latest llvm is built from source, the name is /usr/local/bin/llvm-config.
wenju-he added a commit to wenju-he/opencl-clang that referenced this issue Oct 31, 2023
llvm-config may have a different name in the default path, see intel#497.
On Ubuntu 22.04,
* https://apt.llvm.org/llvm.sh installs llvm-config-{VERSION} to
  /usr/bin folder. It is a symlink to /usr/lib/llvm-{VERSION}/bin/llvm-config.
* If latest llvm is built from source, the name is /usr/local/bin/llvm-config.

(cherry picked from commit 8304021)
wenju-he added a commit to wenju-he/opencl-clang that referenced this issue Oct 31, 2023
llvm-config may have a different name in the default path, see intel#497.
On Ubuntu 22.04,
* https://apt.llvm.org/llvm.sh installs llvm-config-{VERSION} to
  /usr/bin folder. It is a symlink to /usr/lib/llvm-{VERSION}/bin/llvm-config.
* If latest llvm is built from source, the name is /usr/local/bin/llvm-config.

(cherry picked from commit 8304021)
wenju-he added a commit that referenced this issue Oct 31, 2023
llvm-config may have a different name in the default path, see #497.
On Ubuntu 22.04,
* https://apt.llvm.org/llvm.sh installs llvm-config-{VERSION} to
  /usr/bin folder. It is a symlink to /usr/lib/llvm-{VERSION}/bin/llvm-config.
* If llvm is built from source, the name is /usr/local/bin/llvm-config.

(cherry picked from commit 8304021)
wenju-he added a commit that referenced this issue Oct 31, 2023
llvm-config may have a different name in the default path, see #497.
On Ubuntu 22.04,
* https://apt.llvm.org/llvm.sh installs llvm-config-{VERSION} to
  /usr/bin folder. It is a symlink to /usr/lib/llvm-{VERSION}/bin/llvm-config.
* If llvm is built from source, the name is /usr/local/bin/llvm-config.

(cherry picked from commit 8304021)
@wenju-he
Copy link
Contributor

PRs are merged into 16/17/main branches. Closing this issue.

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

2 participants