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

Could NOT find IntelSycl (missing: IntelSycl_SYCL_LIBRARY #1153

Open
yurivict opened this issue Apr 2, 2023 · 1 comment
Open

Could NOT find IntelSycl (missing: IntelSycl_SYCL_LIBRARY #1153

yurivict opened this issue Apr 2, 2023 · 1 comment

Comments

@yurivict
Copy link

yurivict commented Apr 2, 2023

cmake first finds IntelSycl and then fails:

===>  Building for py39-dpctl-0.14.2
* Getting build dependencies for wheel...
* Building wheel...


--------------------------------------------------------------------------------
-- Trying 'Ninja' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/libexec/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is Clang 14.0.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/libexec/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Ninja' generator - success
--------------------------------------------------------------------------------

Configuring Project
  Working directory:
    /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_skbuild/freebsd-13.1-STABLE-amd64-3.9/cmake-build
  Command:
    /usr/local/bin/cmake /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_skbuild/freebsd-13.1-STABLE-amd64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.16 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPYTHON_LIBRARY:PATH=/usr/local/lib/libpython3.9.so -DPython_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPython_ROOT_DIR:PATH=/usr/local -DPython_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPython_FIND_REGISTRY:STRING=NEVER -DPython_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.9/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPython3_ROOT_DIR:PATH=/usr/local -DPython3_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.9/site-packages/numpy/core/include -DCMAKE_BUILD_TYPE:STRING=Release

-- The CXX compiler identification is Clang 14.0.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/libexec/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Echo from /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/IntelDPCPPConfig.cmake
-- The SYCL compiler is /usr/local/libexec/ccache/c++
-- The SYCL Flags are -fsycl 
-- The SYCL Language Version is 202001
-- Found IntelDPCPP: /usr/local/include (found version "202001") 
-- The C compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/libexec/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/local/bin/git (found version "2.40.0") 
-- Echo from /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/libsyclinterface/IntelDPCPPConfig.cmake
-- The SYCL compiler is /usr/local/libexec/ccache/c++
-- The SYCL Flags are -fsycl 
-- The SYCL Language Version is 202001
-- Echo from /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/libsyclinterface/IntelDPCPPConfig.cmake
-- The SYCL compiler is /usr/local/libexec/ccache/c++
-- The SYCL Flags are -fsycl 
-- The SYCL Language Version is 202001
-- dpcpp ver[0]: FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
-- dpcpp ver[1]: Target: x86_64-unknown-freebsd13.1
-- dpcpp ver[2]: Thread model: posix
-- dpcpp ver[3]: InstalledDir: /usr/bin
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find IntelSycl (missing: IntelSycl_SYCL_LIBRARY
  IntelSycl_OPENCL_LIBRARY)
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  libsyclinterface/cmake/modules/FindIntelSycl.cmake:160 (find_package_handle_standard_args)
  libsyclinterface/CMakeLists.txt:49 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_skbuild/freebsd-13.1-STABLE-amd64-3.9/cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 634, in setup
    env = cmkr.configure(
  File "/usr/local/lib/python3.9/site-packages/skbuild/cmaker.py", line 332, in configure
    raise SKBuildError(

An error occurred while configuring with CMake.
  Command:
    /usr/local/bin/cmake /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_skbuild/freebsd-13.1-STABLE-amd64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.16 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPYTHON_LIBRARY:PATH=/usr/local/lib/libpython3.9.so -DPython_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPython_ROOT_DIR:PATH=/usr/local -DPython_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPython_FIND_REGISTRY:STRING=NEVER -DPython_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.9/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/usr/local/bin/python3.9 -DPython3_ROOT_DIR:PATH=/usr/local -DPython3_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.9/site-packages/numpy/core/include -DCMAKE_BUILD_TYPE:STRING=Release
  Source directory:
    /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2
  Working directory:
    /usr/ports/misc/py-dpctl/work-py39/dpctl-0.14.2/_skbuild/freebsd-13.1-STABLE-amd64-3.9/cmake-build
Please see CMake's output for more information.

ERROR Backend subprocess exited when trying to invoke build_wheel
*** Error code 1

Version: 0.14.2
opensycl-0.9.4
cmake-3.25.1
Python-3.9
FreeBSD 13.1

@oleksandr-pavlyk
Copy link
Collaborator

@yurivict Thank you for the report. It appears that our cmake script is failing to locate libraries libsycl.so and libOpenCL.so in the folder SYCL_LIBRARY_DIR as set by find_package(IntelDPCPP REQUIRED).

The SYCL_LIBRARY_DIR is found as follows:

  find_file(SYCL_LIBRARY_DIR
    NAMES
      lib lib64
    HINTS
      ${SYCL_PACKAGE_DIR} $ENV{SYCL_LIBRARY_DIR_HINT}
    NO_DEFAULT_PATH
      )

Where the SYCL_PACKAGE_DIR is the parent folder of the bin/ folder containing the compiler executable.

The expected compiler layout is aligned with that of oneAPI DPC++, or open-source SYCL bundle downloadable from https://github.com/intel/llvm/releases

If the opensycl layout is different, perhaps use SYCL_LIBRARY_DIR_HINT environment variable to assist cmake in locating the library directory.

Please do let us know if you are running into additional issues.

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