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

[level-zero] v1.20.0 version #43054

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ilya-lavrenov
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov commented Jan 2, 2025

Required for #43053 to use vcpkg's level-zero via pkg-config

@MonicaLiu0311 MonicaLiu0311 changed the title level-zero: fixed pkg-config generation [level-zero] fixed pkg-config generation Jan 2, 2025
@MonicaLiu0311 MonicaLiu0311 added the category:port-bug The issue is with a library, which is something the port should already support label Jan 2, 2025
@MonicaLiu0311
Copy link
Contributor

No pkgconfig file was found in the lib/ folder after installation:
image

@MonicaLiu0311 MonicaLiu0311 marked this pull request as draft January 3, 2025 08:41
@ilya-lavrenov
Copy link
Contributor Author

ilya-lavrenov commented Jan 6, 2025

No pkgconfig file was found in the lib/ folder after installation: image

Looks like it's expected as per https://github.com/oneapi-src/level-zero/blob/master/source/CMakeLists.txt#L52-L66

Created PR to upstream oneapi-src/level-zero#254 to have pkg-config files on all platforms and update vcpkg patch.

@ilya-lavrenov ilya-lavrenov marked this pull request as ready for review January 6, 2025 11:52
@MonicaLiu0311
Copy link
Contributor

When testing usage, the following error occurs:

error C1083: Cannot open include file: 'level-zero/ze_api.h': No such file or directory [E:\test_usage\cmakeUsage\build\main.vcxproj]
test.cpp
#include <iostream>
#include "level-zero/ze_api.h"

using namespace std;

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

set(CMAKE_TOOLCHAIN_FILE "E:/level-zero/scripts/buildsystems/vcpkg.cmake")

project ("test")

add_library (main "test.cpp")

find_package(PkgConfig REQUIRED)
pkg_check_modules(TEST REQUIRED IMPORTED_TARGET level-zero)
target_include_directories(main PRIVATE ${TEST_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${TEST_LIBRARIES})

@ilya-lavrenov
Copy link
Contributor Author

#include "level-zero/ze_api.h"

Include directory is incorrect, must be #include "level_zero/ze_api.h"

I wonder why has vcpkg_fixup_pkgconfig not fixed pkgconfig file for debug build? I had to patch it manually

@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Jan 8, 2025

#include "level-zero/ze_api.h"

Include directory is incorrect, must be #include "level_zero/ze_api.h"

I wonder why has vcpkg_fixup_pkgconfig not fixed pkgconfig file for debug build? I had to patch it manually

It assumes that prefix is ​​defined in the .pc file and computes other paths depending on the value of prefix: vcpkg_fixup_pkgconfig.cmake

@MonicaLiu0311
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ilya-lavrenov
Copy link
Contributor Author

@MonicaLiu0311
could you please help with Check For Common Mistakes / Check (pull_request) ?

@ilya-lavrenov
Copy link
Contributor Author

BTW, upstream patch has been merged

@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Jan 10, 2025

The header file is found via the .pc file on x64-windows.

@MonicaLiu0311 MonicaLiu0311 added the info:reviewed Pull Request changes follow basic guidelines label Jan 10, 2025
@ilya-lavrenov ilya-lavrenov changed the title [level-zero] fixed pkg-config generation [level-zero] v1.20.0 version Jan 10, 2025
@ilya-lavrenov
Copy link
Contributor Author

@MonicaLiu0311 an official release came out where my patch is present.
Please, update labels to reflect PR status.

@MonicaLiu0311 MonicaLiu0311 removed the category:port-bug The issue is with a library, which is something the port should already support label Jan 10, 2025
@MonicaLiu0311 MonicaLiu0311 added the category:port-update The issue is with a library, which is requesting update new revision label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants