Skip to content

Commit

Permalink
Fix build error with maxmind if http3 is disabled
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.

Signed-off-by: Jonh Wendell <[email protected]>
  • Loading branch information
jwendell committed Apr 17, 2024
1 parent b26b02c commit e7e9c15
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 @@ -1471,7 +1471,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_darwin",
)
2 changes: 1 addition & 1 deletion source/extensions/geoip_providers/maxmind/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ envoy_cc_library(
"//conditions:default": [],
}),
hdrs = ["geoip_provider.h"],
external_deps = ["maxmind"],
tags = ["skip_on_windows"],
deps = [
"//bazel/foreign_cc:maxmind_linux_darwin",
"//envoy/geoip:geoip_provider_driver_interface",
"@envoy_api//envoy/extensions/geoip_providers/maxmind/v3:pkg_cc_proto",
],
Expand Down

0 comments on commit e7e9c15

Please sign in to comment.