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

ccache: invalid option -- U #24795

Open
love1angel opened this issue Dec 24, 2024 · 3 comments
Open

ccache: invalid option -- U #24795

love1angel opened this issue Dec 24, 2024 · 3 comments

Comments

@love1angel
Copy link

Description of the bug:

$ bazel --version
bazel 7.4.1-homebrew

macbook m1 chip.

use this release: https://github.com/bazelbuild/bazel/releases/download/7.3.2/bazel-7.3.2-dist.zip
according to this PR: Homebrew/homebrew-core@c8ba5b8

Which category does this issue belong to?

C++ Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

macos sequia 15.0

What is the output of bazel info release?

release 7.4.1-homebrew

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@sgowroji
Copy link
Member

Hi @love1angel, Could you please provide complete steps to reproduce this issue?

@love1angel
Copy link
Author

Hi @love1angel, Could you please provide complete steps to reproduce this issue?

Hi, @sgowroji. I just upgrade brew package. then use this bazel 7.4.1 version always build failed like this issue when cc_library.

@love1angel
Copy link
Author

bazel test --cxxopt=-std=c++14 --test_output=all //:hello_test
INFO: Analyzed target //:hello_test (2 packages loaded, 10 targets configured).
ERROR: /private/var/tmp/_bazel_heli/52d66b265c1c9644daf749dbb8242bd0/external/googletest~/BUILD.bazel:86:11: Compiling googletest/src/gtest.cc failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target @@googletest~//:gtest) external/bazel_toolscc_configure_extensionlocal_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 39 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ccache: invalid option -- U
ERROR: /Users/heli/github/gt/BUILD:1:8: Compiling hello_test.cc failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target //:hello_test) external/bazel_toolscc_configure_extensionlocal_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 46 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ccache: invalid option -- U
ERROR: /private/var/tmp/_bazel_heli/52d66b265c1c9644daf749dbb8242bd0/external/googletest~/BUILD.bazel:170:11: Compiling googlemock/src/gmock_main.cc failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target @@googletest~//:gtest_main) external/bazel_toolscc_configure_extensionlocal_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 38 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ccache: invalid option -- U
Target //:hello_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.268s, Critical Path: 0.08s
INFO: 11 processes: 11 internal.
ERROR: Build did NOT complete successfully
//:hello_test FAILED TO BUILD

Executed 0 out of 1 test: 1 fails to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants