Skip to content
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

envoy 1.33.0 #205269

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

codefromthecrypt
Copy link
Contributor

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added CI-linux-self-hosted Build on Linux self-hosted runner long build Set a long timeout for formula testing labels Jan 23, 2025
@codefromthecrypt
Copy link
Contributor Author

Failures both in CI and on Apple Silicon (my laptop)

Linux

     Run Build Command(s):/tmp/envoy-20250123-6365-t3ulyk/envoy-1.33.0/.brew_home/_bazel/4cb00a9ce9500ddca1635e23047afae1/sandbox/processwrapper-sandbox/2409/execroot/envoy/external/ninja_1.12.1_linux/ninja cmTC_da46d && [1/2] Building C object CMakeFiles/cmTC_da46d.dir/testCCompiler.c.o
      [2/2] Linking C executable cmTC_da46d
      FAILED: cmTC_da46d 
      : && /home/linuxbrew/.linuxbrew/Cellar/llvm/19.1.7/bin/clang-19 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 -D_FORTIFY_SOURCE=1 -DNDEBUG -ffunction-sections -fdata-sections -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -DABSL_MIN_LOG_LEVEL=4 -fdebug-types-section -fPIC -Wno-deprecated-declarations -Wno-thread-safety-reference-return -fexceptions -Wl,--gdb-index -fuse-ld=/usr/bin/ld.gold -B/home/linuxbrew/.linuxbrew/Cellar/llvm/19.1.7/bin -Wl,-no-as-needed -Wl,-z,relro,-z,now -lm -Wl,--gc-sections -l:libstdc++.a -fuse-ld=lld CMakeFiles/cmTC_da46d.dir/testCCompiler.c.o -o cmTC_da46d   && :
      clang-19: error: invalid linker name in argument '-fuse-ld=lld'
      ninja: build stopped: subcommand failed.
      
      
  
    
  
    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:15 (PROJECT)
  
  
  -- Configuring incomplete, errors occurred!
  See also "/tmp/envoy-20250123-6365-t3ulyk/envoy-1.33.0/.brew_home/_bazel/4cb00a9ce9500ddca1635e23047afae1/sandbox/processwrapper-sandbox/2409/execroot/envoy/bazel-out/k8-opt/bin/bazel/foreign_cc/ares.build_tmpdir/CMakeFiles/CMakeOutput.log".
  See also "/tmp/envoy-20250123-6365-t3ulyk/envoy-1.33.0/.brew_home/_bazel/4cb00a9ce9500ddca1635e23047afae1/sandbox/processwrapper-sandbox/2409/execroot/envoy/bazel-out/k8-opt/bin/bazel/foreign_cc/ares.build_tmpdir/CMakeFiles/CMakeError.log".
  _____ END BUILD LOGS _____
  rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/bazel/foreign_cc/ares_foreign_cc/wrapper_build_script.sh
  rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/bazel/foreign_cc/ares_foreign_cc/build_script.sh
  rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/bazel/foreign_cc/ares_foreign_cc/CMake.log
  rules_foreign_cc: Keeping these below directories for debug, but note that the directories inside a sandbox
  rules_foreign_cc: are still cleaned unless you specify the --sandbox_debug Bazel command line flag.
  rules_foreign_cc: Build Dir: /tmp/envoy-20250123-6365-t3ulyk/envoy-1.33.0/.brew_home/_bazel/4cb00a9ce9500ddca1635e23047afae1/sandbox/processwrapper-sandbox/2409/execroot/envoy/bazel-out/k8-opt/bin/bazel/foreign_cc/ares.build_tmpdir
  rules_foreign_cc: Deps Dir: /tmp/envoy-20250123-6365-t3ulyk/envoy-1.33.0/.brew_home/_bazel/4cb00a9ce9500ddca1635e23047afae1/sandbox/processwrapper-sandbox/2409/execroot/envoy/bazel-out/k8-opt/bin/bazel/foreign_cc/ares.ext_build_deps
  
  [7,288 / 16,340] checking cached actions
  Target //source/exe:envoy-static.stripped failed to build
  INFO: Elapsed time: 411.798s, Critical Path: 82.35s
  INFO: 7288 processes: 4885 internal, 1 local, 2401 processwrapper-sandbox, 1 worker.
  ERROR: Build did NOT complete successfully

Apple Silicon Laptop

$ HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source ./Formula/e/envoy.rb 
==> Tapping homebrew/core
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 2426782, done.
remote: Counting objects: 100% (891/891), done.
remote: Compressing objects: 100% (379/379), done.
remote: Total 2426782 (delta 812), reused 523 (delta 512), pack-reused 2425891 (from 3)
Receiving objects: 100% (2426782/2426782), 864.39 MiB | 17.52 MiB/s, done.
Resolving deltas: 100% (1770988/1770988), done.
Tapped 4 commands and 7387 formulae (7,727 files, 949MB).
Error: Failed to load cask: ./Formula/e/envoy.rb
Cask 'envoy' is unreadable: wrong constant name #<Class:0x000000012507d2a0>
Warning: Treating ./Formula/e/envoy.rb as a formula.
==> Fetching envoy
==> Downloading https://github.com/envoyproxy/envoy/archive/refs/tags/v1.33.0.tar.gz
Already downloaded: /Users/adriancole/Library/Caches/Homebrew/downloads/26afd869be9911abf8d74a38a0eab07f29d6283a520d16136ac8c9c056d06ce1--envoy-1.33.0.tar.gz
==> python3 tools/github/write_current_source_version.py --skip_error_in_git
==> /opt/homebrew/opt/bazelisk/bin/bazelisk build --compilation_mode=opt --curses=no --verbose_failures --action_env=PATH=/opt/homebrew/bin:/usr/bin:/bin --host_action_env=PATH=/opt/homebrew/bin:/usr/bin:/bin //source/exe:envoy-static.stripped
Last 15 lines from /Users/adriancole/Library/Logs/Homebrew/envoy/02.bazelisk:
ninja: error: '/tmp/envoy-20250123-78804-k916qp/envoy-1.md3.0/.brew_home/_bazel/e90466d61d2291d9882e55b68cd941e1/sandbox/processwrapper-sandbox/3257/execroot/envoy/bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl.build_tmpdir/docs/libcurl/libcurl-symbols.md', needed by 'docs/libcurl/curl_easy_cleanup.3', missing and no known rule to make it
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl_foreign_cc/CMake.log
rules_foreign_cc: Keeping these below directories for debug, but note that the directories inside a sandbox
rules_foreign_cc: are still cleaned unless you specify the --sandbox_debug Bazel command line flag.
rules_foreign_cc: Build Dir: /private/tmp/envoy-20250123-78804-k916qp/envoy-1.33.0/.brew_home/_bazel/e90466d61d2291d9882e55b68cd941e1/sandbox/processwrapper-sandbox/3257/execroot/envoy/bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl.build_tmpdir
rules_foreign_cc: Deps Dir: /private/tmp/envoy-20250123-78804-k916qp/envoy-1.33.0/.brew_home/_bazel/e90466d61d2291d9882e55b68cd941e1/sandbox/processwrapper-sandbox/3257/execroot/envoy/bazel-out/darwin_arm64-opt/bin/bazel/foreign_cc/curl.ext_build_deps

Target //source/exe:envoy-static.stripped failed to build
INFO: Elapsed time: 614.173s, Critical Path: 480.75s
INFO: 14514 processes: 9715 internal, 1 local, 4797 processwrapper-sandbox, 1 worker.
ERROR: Build did NOT complete successfully

Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

@codefromthecrypt
Copy link
Contributor Author

@zirain I saw you ran into this in istio. If you have a chance, can you recommend any way to proceed this in homebrew for envoy? istio/proxy#5154

@zirain
Copy link
Contributor

zirain commented Jan 23, 2025

@codefromthecrypt I can build on my macm1(with clang 16).

@mathetake
Copy link
Contributor

yep, clang version must be the old version like 14 or 16 (i think 14 is the one currently envoy is using for all platform (mac/ubuntu))

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 24, 2025
@zirain
Copy link
Contributor

zirain commented Jan 24, 2025

@codefromthecrypt during my debuging on #205289, looks like this related to curl upgrade from 8.4 to 8.9, not 100% sure about it, hope this give you some hint.

I cannot set up a test locally, as my ruby broken on my mac.

@cho-m
Copy link
Member

cho-m commented Jan 24, 2025

Envoy could just disable curl man pages (BUILD_LIBCURL_DOCS=OFF1) somewhere around https://github.com/envoyproxy/envoy/blob/main/bazel/foreign_cc/BUILD#L266-L304

Footnotes

  1. https://github.com/curl/curl/blob/curl-8_9_1/CMakeLists.txt#L317

@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 24, 2025
Formula/e/envoy.rb Outdated Show resolved Hide resolved
phlax pushed a commit to envoyproxy/envoy that referenced this pull request Jan 24, 2025
This should be turned off as it's not needed.
Ref Homebrew/homebrew-core#205269

Fix #37470

Signed-off-by: Takeshi Yoneda <[email protected]>
Formula/e/envoy.rb Outdated Show resolved Hide resolved
@cho-m cho-m added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Jan 24, 2025
@cho-m cho-m force-pushed the envoy-1.33.0 branch 2 times, most recently from e62d400 to c185ca6 Compare January 24, 2025 14:22
@cho-m
Copy link
Member

cho-m commented Jan 24, 2025

ARM macOS passes.

Linux is going to take some time to start but based on prior run (https://github.com/Homebrew/homebrew-core/actions/runs/12942003180/job/36099164302#step:4:352) it will fail:

  /tmp/envoy-20250124-6365-ce9zxa/envoy-1.33.0/.brew_home/_bazel/191eec01bee7243a5ade92d9b73a01f5/sandbox/processwrapper-sandbox/1066/execroot/envoy/external/net_zlib/gzlib.c:242:9: error: call to undeclared function 'lseek'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    242 |         LSEEK(state->fd, 0, SEEK_END);  /* so gzoffset() is correct */
        |         ^
  /tmp/envoy-20250124-6365-ce9zxa/envoy-1.33.0/.brew_home/_bazel/191eec01bee7243a5ade92d9b73a01f5/sandbox/processwrapper-sandbox/1066/execroot/envoy/external/net_zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
     14 | #  define LSEEK lseek
        |                 ^

Closest upstream reports were:

Not sure but guessing that compiling with LLVM Clang and linking to GCC libstdc++ isn't behaving well in newer Envoy versions (or newer versions of Clang may have elevated warning to error).

In Homebrew, --config=libc++ isn't an ideal option as we usually avoid statically linking to C++ libraries, https://github.com/envoyproxy/envoy/blob/main/.bazelrc#L219:

build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a

EDIT: If error still occurs, could try reducing error. May also want to check if issue with GCC still occurs (I had to switch build to clang/lld back in https://github.com/Homebrew/homebrew-core/pull/166177/files)

Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt
Copy link
Contributor Author

@cho-m thanks for the help and I hope I didn't lose any of your work on rebase. Ack that disabling libcurl docs and removing installation of examples worked for me locally.

FWIW macOS is the most important OS to have working, but also ideal if we can keep linux working also. Great job so far!

@codefromthecrypt
Copy link
Contributor Author

@zirain this is mostly a self-note for me in case we force push it out later on envoy-1.33.1, but I often forget patch syntax here and we occasionally need it for envoy. Here's what's working to use something not landed, yet.

  stable do
    url "https://github.com/envoyproxy/envoy/archive/refs/tags/v1.33.0.tar.gz"
    sha256 "fd726135761ea163f0312d49960c602c9b4fcb78ca3c36600975fed16e0787c4"

    # Backport disabling libcurl docs to fix build. Remove in the next release.
    patch do
      url "https://github.com/envoyproxy/envoy/commit/ae6cb3254cbf98999993d0120d289a207a57f825.patch?full_index=1"
      sha256 "a5c25bad6884f382909036ac9e8c812c5d3ba3104f2f1d24f5035acf705b0d74"
    end
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-linux-self-hosted Build on Linux self-hosted runner CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. long build Set a long timeout for formula testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants