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: extract c-ares version from header file #2478

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Oct 8, 2024

before this change, we get c-ares's version with pkg-config, but this could be wrong if we have multiple c-ares version installed into the system, and the one to be used is specified using CMake variable of c-ares_ROOT via the command line like:

cmake -Dc-ares_ROOT=install-path/of/c-ares

as pkg_check_modules() does not respect the c-ares_ROOT variable, it always find the .pc file in the default paths.

in order to get the version of the c-ares library specified by the c-ares_ROOT variable, let's extract the version number in the header file. this should fix the build of seastar on fedora 41 with both c-ares 1.33 shipped by the fedora 41, and c-ares 1.32 installed manually.

before this change, we get c-ares's version with pkg-config, but this
could be wrong if we have multiple c-ares version installed into the
system, and the one to be used is specified using CMake variable of
`c-ares_ROOT` via the command line like:

```console
cmake -Dc-ares_ROOT=install-path/of/c-ares
```

as `pkg_check_modules()` does not respect the `c-ares_ROOT` variable,
it always find the .pc file in the default paths.

in order to get the version of the c-ares library specified by the
`c-ares_ROOT` variable, let's extract the version number in the
header file. this should fix the build of seastar on fedora 41 with
both c-ares 1.33 shipped by the fedora 41, and c-ares 1.32 installed
manually.

Signed-off-by: Kefu Chai <[email protected]>
@avikivity avikivity merged commit 5d53fb6 into scylladb:master Oct 8, 2024
15 checks passed
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.

2 participants