Skip to content

Conversation

carlocab
Copy link

@carlocab carlocab commented Aug 26, 2025

Without these changes, the build fails with unresolved symbol failures.

Presumably, this is because dns/CAresResolver.cpp and
dns/CachingDNSResolver.cpp are referenced in other files that are
being compiled.

We then need to link cares because it is used in the two files added
to PROXYGEN_CORO_SOURCES.

Finally, we need to replace the #error macro with a static_assert,
because (at least as of c-ares version 1.34.5) ARES_SUCCESS and
ARES_EREFUSED are enum constants, and therefore not visible to the
preprocessor.

We also drop the reference to TraceFieldType::TXT because this
reference doesn't seem to be generated at build time, presumably because
this is not a type included in lib/utils/samples/TraceFieldType.txt.

Fixes #573

Without these changes, the build fails with unresolved symbol failures.

Presumably, this is because `dns/CAresResolver.cpp` and
`dns/CachingDNSResolver.cpp` are referenced in other files that are
being compiled.

We then need to link `cares` because it is used in the two files added
to `PROXYGEN_CORO_SOURCES`.

Finally, we need to replace the `#error` macro with a `static_assert`,
because (at least as of `c-ares` version `1.34.5`) `ARES_SUCCESS` and
`ARES_EREFUSED` are `enum` constants, and therefore not visible to the
preprocessor.

We also drop the reference to `TraceFieldType::TXT` because this
reference doesn't seem to be generated at build time, presumably because
this is not a type included in `lib/utils/samples/TraceFieldType.txt`.
@envolution
Copy link

@carlocab thanks, this solves the build-tests option as well

@facebook-github-bot
Copy link
Contributor

@hanidamlaj has imported this pull request. If you are a Meta employee, you can view this in D81097087.

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

Successfully merging this pull request may close these issues.

Build failure - undefined reference errors during linking - proxygen->cares
3 participants