Skip to content

update envoy and fix build #6121

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

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Conversation

zirain
Copy link
Member

@zirain zirain commented Feb 12, 2025

fixes: #6111

@zirain zirain requested a review from a team as a code owner February 12, 2025 04:12
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 12, 2025
@istio-testing istio-testing merged commit ea9a9f9 into istio:release-1.25 Feb 12, 2025
7 checks passed
@zirain zirain deleted the fix-build branch February 12, 2025 06:24
@leosarra
Copy link

I'm having some issues in building envoy in Istio 1.25.1 after this commit (found via git bisect).

�[32mAnalyzing:�[0m target //:envoy (126 packages loaded, 774 targets configured)

�[32mINFO: �[0mRepository local_config_cc instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:181:13: in <toplevel>
  /tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/cc_configure.bzl:149:16: in cc_configure
Repository rule cc_autoconf defined at:
  /tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/cc_configure.bzl:109:30: in <toplevel>
�[31m�[1mERROR: �[0m/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:112:9: An error occurred during the fetch of repository 'local_config_cc':
   Traceback (most recent call last):
	File "/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/cc_configure.bzl", line 91, column 33, in cc_autoconf_impl
		configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools)
	File "/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 351, column 17, in configure_unix_toolchain
		cc = find_cc(repository_ctx, overriden_tools)
	File "/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 315, column 23, in find_cc
		cc = _find_generic(repository_ctx, "gcc", "CC", overriden_tools)
	File "/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 311, column 32, in _find_generic
		auto_configure_fail(msg)
	File "/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, column 9, in auto_configure_fail
		fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: 
�[0;31mAuto-Configuration Error:�[0m Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
�[31m�[1mERROR: �[0mno such package '@@local_config_cc//': 
�[0;31mAuto-Configuration Error:�[0m Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
�[31m�[1mERROR: �[0m/tmp/home/.cache/bazel/_bazel_adpuser/ccbcef1e345c666ad54a8b240746f4c3/external/bazel_tools/tools/cpp/BUILD:119:6: @@bazel_tools//tools/cpp:toolchain depends on @@local_config_cc//:toolchain in repository @@local_config_cc which failed to fetch. no such package '@@local_config_cc//': 
�[0;31mAuto-Configuration Error:�[0m Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
�[31m�[1mERROR: �[0m/tmp/home/proxy/BUILD:41:16: errors encountered resolving select() keys for //:envoy
�[31m�[1mERROR: �[0mAnalysis of target '//:envoy' failed; build aborted
�[32mINFO: �[0mElapsed time: 23.060s, Critical Path: 0.56s
�[32mINFO: �[0m1 process: 1 internal.
�[31m�[1mERROR: �[0mBuild did NOT complete successfully

I suspect this is due to the LLVM path being hardcoded to "/usr/lib/llvm/bin" in build:linux --action_env=PATH=/usr/lib/llvm/bin:/usr/local/bin:/bin:/usr/bin.
This path is different from where I store my LLVM files. After updating the .bazelrc to match my LLVM path, it works fine.
Do you think the handling could be generalized so that the hardcoded path is no longer needed?

@zirain zirain mentioned this pull request Apr 11, 2025
@zirain
Copy link
Member Author

zirain commented Apr 11, 2025

you can send a PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants