You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cmake --install . --prefix umf_install succeed.
Details
The root cause of the issue is the following:
The macro FetchContent_MakeAvailable, used to fetch L0 loader, includes a subproject using the add_subdirectory command. As a result the L0 loader added as a subproject. And it is added to the installation rules, but it should not because we do not want to install L0 as a part of UMF installation.
When we call FetchContent_MakeAvailable macro the EXCLUDE_FROM_ALL argument is provided which should fix the issue. But it was added in version 3.28. That is why the issue is reproduced only with cmake < 3.28. I caught the issue with cmake 3.22.1 on one machine, but it works with cmake 3.30.2 on another.
There is a discussion on StackOverflow about the same issue. It describes, as a possible solution for cmake < 3.28, exactly what we had in the past in our cmake config:
Environment Information
Please provide a reproduction of the bug:
How often bug is revealed:
Always when these two conditions are true:
UMF_LEVEL_ZERO_INCLUDE_DIR
is not specified and we fetch the Level Zero loader at the build time.Actual behavior:
The
cmake --install . --prefix umf_install
fails with the following error:-- Install configuration: "Release" -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/ze_api.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/ze_ddi.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/zes_api.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/zes_ddi.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/zet_api.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/zet_ddi.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/layers/zel_tracing_api.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/layers/zel_tracing_ddi.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/layers/zel_tracing_register_cb.h -- Installing: /workdir/umf_repo/build/umf_install/./include/level_zero/loader/ze_loader.h -- Installing: /workdir/umf_repo/build/umf_install/lib/libze_loader.so.1.19.2 -- Installing: /workdir/umf_repo/build/umf_install/lib/libze_loader.so.1 -- Installing: /workdir/umf_repo/build/umf_install/lib/libze_loader.so CMake Error at _deps/level-zero-loader-build/source/cmake_install.cmake:99 (file): file cannot create directory: /usr/local/lib/pkgconfig. Maybe need administrative privileges. Call Stack (most recent call first): _deps/level-zero-loader-build/cmake_install.cmake:70 (include) cmake_install.cmake:47 (include)
Expected behavior:
The
cmake --install . --prefix umf_install
succeed.Details
The root cause of the issue is the following:
FetchContent_MakeAvailable
, used to fetch L0 loader, includes a subproject using theadd_subdirectory
command. As a result the L0 loader added as a subproject. And it is added to the installation rules, but it should not because we do not want to install L0 as a part of UMF installation.FetchContent_MakeAvailable
macro theEXCLUDE_FROM_ALL
argument is provided which should fix the issue. But it was added in version 3.28. That is why the issue is reproduced only with cmake < 3.28. I caught the issue with cmake 3.22.1 on one machine, but it works with cmake 3.30.2 on another.There is a discussion on StackOverflow about the same issue. It describes, as a possible solution for cmake < 3.28, exactly what we had in the past in our cmake config:
But we switched to the
FetchContent_MakeAvailable
macro because theFetchContent_Populate
is deprecated (see #734 and #814).Additional information about Priority and Help Requested:
Are you willing to submit a pull request with a proposed change? No. I do not know what is the right solution.
Requested priority: (Showstopper, High, Medium, Low)
The text was updated successfully, but these errors were encountered: