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

ocloc (without suffix) missing from compute-runtime builds #768

Open
ph0b opened this issue Oct 10, 2024 · 1 comment
Open

ocloc (without suffix) missing from compute-runtime builds #768

ph0b opened this issue Oct 10, 2024 · 1 comment
Labels
distro Distribution specific questions

Comments

@ph0b
Copy link

ph0b commented Oct 10, 2024

Since bbe1120, there are only suffixed versions of ocloc being built.

Some distribution package specific code calls update-alternatives at install time to then symlink a version of ocloc:

update-alternatives --quiet --install /usr/bin/ocloc ocloc /usr/bin/ocloc-%{NEO_OCL_VERSION_MAJOR}.%{NEO_OCL_VERSION_MINOR}.%{NEO_OCLOC_VERSION_MODE} %{NEO_OCL_VERSION_MAJOR}%{NEO_OCL_VERSION_MINOR}%{NEO_OCLOC_VERSION_MODE}
so on such distributions, after installing built packages, calling "ocloc" works.

However:

  1. compute-runtime can't be compiled and used in-place (by toolchains like DPC++ that call ocloc on path) unless locally installed with a package manager. With Blender I had to patch it out: https://projects.blender.org/blender/blender/src/branch/blender-v4.3-release/build_files/build_environment/patches/ocloc.diff
  2. not all distributions support such model with update-alternatives - as an example, archlinux doesn't.

Will there be a new ocloc entry point able to use both new and legacy ocloc at the same time? Until then, can you support building a binary called ocloc without suffix, or an ocloc symlink to the version that supports current platforms being built?

Ideally this should be the default, and the update-alternatives method could be enabled behind a CMake flag instead.

@svenstaro
Copy link

As a point of reference, this is me adding a manual symlink on Arch Linux.

@JablonskiMateusz JablonskiMateusz added the distro Distribution specific questions label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distro Distribution specific questions
Projects
None yet
Development

No branches or pull requests

3 participants