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

Build linux-x64 in a CentOS 7 container for backwards compatibility #274

Merged
merged 1 commit into from
May 25, 2022

Conversation

jgiannuzzi
Copy link
Member

This PR aims at fixing #273 by building the linux-x64 native library within a CentOS 7 container with GCC 7. This allows linking with older versions of the system libraries, widening the Linux distributions supported by our NuGet package.

Please note that the linux-arm64 native library is still built on Ubuntu 18.04, as there is no recent cross-compiler available on CentOS 7. We will probably need to first get self-hosted linux-arm64 runners before we can support this. All of this being said, I don't expect many people to use old Linux distributions on arm64.

Copy link
Contributor

@adamreeve adamreeve left a comment

Choose a reason for hiding this comment

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

Looks good thanks Jonathan 👍

It would be nice if we could cache the centos image with the build dependencies installed but that might be fairly complicated and it doesn't look like the container setup step takes too long

@jgiannuzzi
Copy link
Member Author

Indeed it would be a bit more complex and with no real advantage as it's already faster than the Windows build, which is usually the last to finish before we can move on with the workflow.

@marcin-krystianc
Copy link
Contributor

I think there is one small issue here with vcpkg caching and the cmake version. We will use runner's cmake version as part of the cache key, but the actual compilation occurs on the CentOS which uses different cmake.

@jgiannuzzi
Copy link
Member Author

@marcin-krystianc we install the same version of cmake in the container as on the host for that exact reason

@marcin-krystianc
Copy link
Contributor

@marcin-krystianc we install the same version of cmake in the container as on the host for that exact reason

Ah, indeed. I've missed that. Perfect!

@jgiannuzzi jgiannuzzi merged commit b47abdd into G-Research:master May 25, 2022
@jgiannuzzi jgiannuzzi deleted the linux-x64-compat-build branch May 25, 2022 10:52
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

Successfully merging this pull request may close these issues.

3 participants