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

Integrate with vcpkg #858

Open
MMitsuha opened this issue Jan 28, 2023 · 5 comments
Open

Integrate with vcpkg #858

MMitsuha opened this issue Jan 28, 2023 · 5 comments

Comments

@MMitsuha
Copy link

Integrate LIEF with vcpkg could really help me with Visual Studio development and CI like Github Action and etc.
Please intergtate LIEF with vcpkg

@romainthomas
Copy link
Member

There were is PR from last year: microsoft/vcpkg#21213 for which @ekilmer also did some improvements in the LIEF's CMake files.

@ekilmer
Copy link
Contributor

ekilmer commented Jan 30, 2023

The main issue (if you read the vcpkg PR) is that vcpkg won't update dependencies unless everything else also builds with that updated dependency. In this case, MbedTLS maintains two LTS branches across major versions, and vcpkg uses the older LTS branch (v2), whereas LIEF uses the newer LTS branch (v3). Upgrading MbedTLS to v3 in vcpkg breaks other dependencies that don't offer support for v3, so it's a bit stuck.

However, you can maintain your own overlay ports for vcpkg to build LIEF and updated MbedTLS. I have some rough package definitions for LIEF [1] and updated MbedTLS [2] that might be helpful, but they haven't been thoroughly tested like what you would expect from official vcpkg repo definitions.

[1] https://github.com/lifting-bits/cxx-common/tree/b7cce1bc71efa1c2e3d7e361e87af0c7435e1bcf/ports/lief
[2] https://github.com/lifting-bits/cxx-common/tree/b7cce1bc71efa1c2e3d7e361e87af0c7435e1bcf/ports/mbedtls

@romainthomas
Copy link
Member

Thank you @ekilmer for your feedback on this. Do you think it could be relevant to have a maintained version of vcpkg packaging in LIEF repo?

@ekilmer
Copy link
Contributor

ekilmer commented Feb 5, 2023

Yes! I'd recommend using and maintaining compatibility with a package manager like vcpkg in the LIEF repo.

Unfortunately, since vcpkg is a source-based dependency manager, there could be long build times in CI if you don't use caching. While vcpkg has binary caching and an example for GitHub Actions, it's a bit clunky (in my opinion), but it works.

I haven't experimented as much as I'd like with integrating vcpkg into a Python packaging workflow, so I can't offer concrete recommendations there 😞. It's on my todo-list, and I will circle-back here if/when I make more progress.

@romainthomas
Copy link
Member

Ok great, I'll also start to have a look at this vcpkg integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants