Skip to content

Commit

Permalink
[bp/1.28] Fix build error with maxmind if http3 is disabled (#33638)
Browse files Browse the repository at this point in the history
`maxmind` is causing the build to not honor the flag `--//bazel:http3=False`: The
define `ENVOY_ENABLE_QUIC` is still being passed to the compiler. This
causes code that rely on the presence (or not) of that define to behave
wrongly.

I am not 100% sure of what causes it, but Bazel doc says 1) to not use
`bind` and 2) that `bind` and `select` do not play well together: https://bazel.build/reference/be/workspace#bind

By removing the `bind` and pointing directly to the actual dependency in
`maxmind` BUILD file, we fix this issue.

Backport of #33638

Signed-off-by: Jonh Wendell <jwendell@redhat.com>
  • Loading branch information
jwendell authored and phlax committed Apr 18, 2024
1 parent a7907b3 commit 0cb060d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,3 @@ def _com_github_maxmind_libmaxminddb():
name = "com_github_maxmind_libmaxminddb",
build_file_content = BUILD_ALL_CONTENT,
)
native.bind(
name = "maxmind",
actual = "@envoy//bazel/foreign_cc:maxmind_linux",
)
2 changes: 1 addition & 1 deletion source/extensions/geoip_providers/maxmind/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ envoy_cc_library(
"//conditions:default": [],
}),
hdrs = ["geoip_provider.h"],
external_deps = ["maxmind"],
tags = ["skip_on_windows"],
deps = [
"//bazel/foreign_cc:maxmind_linux",
"//envoy/geoip:geoip_provider_driver_interface",
"@envoy_api//envoy/extensions/geoip_providers/maxmind/v3:pkg_cc_proto",
],
Expand Down

0 comments on commit 0cb060d

Please sign in to comment.