Skip to content

Conversation

@carlocab
Copy link
Contributor

@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.

facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request Aug 30, 2025
Summary:
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 facebook/proxygen#573

X-link: facebook/proxygen#572

Reviewed By: lnicco

Differential Revision: D81097087

Pulled By: hanidamlaj

fbshipit-source-id: 7ed331685fd9c7743b7fcc9be7807e0f48db4019
@facebook-github-bot
Copy link
Contributor

@hanidamlaj merged this pull request in a238ec5.

mszabo-wikia added a commit to mszabo-wikia/proxygen that referenced this pull request Sep 22, 2025
List input files as dependencies for add_custom_command() calls.
This avoids failures in incremental builds if e.g. TraceFieldType.txt
changes, since CMake will be able to mark the output as out of date
and regenerate it as needed.

Follows-up facebook#572
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