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

[liburing] create a new port #17623

Merged
merged 10 commits into from
Jul 16, 2021
Merged

[liburing] create a new port #17623

merged 10 commits into from
Jul 16, 2021

Conversation

luncliff
Copy link
Contributor

@luncliff luncliff commented May 2, 2021

What does your PR fix?

There was no port request for this library. But I think some Linux people are interested in it.

https://github.com/axboe/liburing (It requires kernel version 5.1+.)

Which triplets are supported/not supported? Have you updated the CI baseline?

Targets Linux triplets.

  • x64-linux

Wish other contributors who use Linux with ARM processor can check this works for those triplets.
Seems like CC/CXX/BUILD_ARCH customization is required.

  • arm-linux
  • arm64-linux

Does your PR follow the maintainer guide?

Checked.

I saw Docker images target Linux Kernel 4.x in late 2019.
Considering to check the kernel version in the portfile and warn it.

@JackBoosY JackBoosY added the category:new-port The issue is requesting a new library to be added; consider making a PR! label May 2, 2021
@luncliff luncliff marked this pull request as draft May 2, 2021 15:51
@NancyLi1013
Copy link
Contributor

Is there anything else that needs to be done for this PR @luncliff?

@luncliff
Copy link
Contributor Author

luncliff commented May 13, 2021 via email

* with CMake module: FindPkgConfig
@luncliff
Copy link
Contributor Author

luncliff commented May 17, 2021

I tested build/link of this port with both VCPKG_LIBRARY_LINKAGE static/dynamic.
Should be like below.

user@host:build-dbg$ ldd ./test_suite 
        linux-vdso.so.1 (0x00007fff1a14f000)
        liburing.so.2 => /.../vcpkg/installed/x64-linux/debug/lib/pkgconfig/../../lib/liburing.so.2 (0x00007ffbe4c1e000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ffbe4be5000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ffbe4a04000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffbe48b5000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ffbe489a000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffbe46a8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffbe4d7e000)

Plus, I added usage for CMake FindPkgConfig module.
There was no existing references for FindPkgConfig integration so I wrote it.
Any suggestion for it will be welcomed. :D

user@host:vcpkg$ ./vcpkg install liburing
...
Building package liburing[core]:x64-linux... done
Installing package liburing[core]:x64-linux...
Installing package liburing[core]:x64-linux... done
Elapsed time for package liburing:x64-linux: 8.618 s

Total elapsed time: 8.954 s

The package liburing can be imported via CMake FindPkgConfig module:

    include(FindPkgConfig)
    pkg_check_modules(URING liburing>=2.0)

    target_include_directories(main PRIVATE ${URING_INCLUDE_DIRS})
    target_link_libraries(main PRIVATE ${URING_LINK_LIBRARIES})

If you are using CMake v3.13 or higher:

    target_link_directories(main PRIVATE ${URING_LIBRARY_DIRS})

@luncliff luncliff marked this pull request as ready for review May 17, 2021 05:34
ports/liburing/portfile.cmake Outdated Show resolved Hide resolved
ports/liburing/portfile.cmake Show resolved Hide resolved
ports/liburing/portfile.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test the usage?

@luncliff
Copy link
Contributor Author

@JackBoosY Yeap. with #17623 (comment)

@NancyLi1013 NancyLi1013 added the info:reviewed Pull Request changes follow basic guidelines label May 31, 2021
@NancyLi1013
Copy link
Contributor

LGTM now, thanks for your adding this new port @luncliff.

ports/liburing/usage Outdated Show resolved Hide resolved
ports/liburing/usage Outdated Show resolved Hide resolved
@strega-nil-ms
Copy link
Contributor

@luncliff could you make the versions changes? I apparently can't push to your branch...

@NancyLi1013 NancyLi1013 removed the info:reviewed Pull Request changes follow basic guidelines label Jun 10, 2021
@luncliff
Copy link
Contributor Author

@luncliff could you make the versions changes? I apparently can't push to your branch...

Of course! Thanks for the check and commit. :)
I will update the part and check import steps again.

* update git-tree SHA
@luncliff
Copy link
Contributor Author

luncliff commented Jul 1, 2021

@strega-nil-ms please ping me when it's reviewed. :)

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Jul 2, 2021
@vicroms vicroms merged commit bbe9763 into microsoft:master Jul 16, 2021
@luncliff luncliff deleted the port/liburing branch July 16, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants