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

Failed to Build Envoy on Mac OS #37003

Closed
pawandeep2155 opened this issue Nov 6, 2024 · 3 comments
Closed

Failed to Build Envoy on Mac OS #37003

pawandeep2155 opened this issue Nov 6, 2024 · 3 comments
Labels
area/build area/macos bug stale stalebot believes this issue/PR has not been touched recently

Comments

@pawandeep2155
Copy link

pawandeep2155 commented Nov 6, 2024

Failed to Build Envoy from the latest main on Mac OS

System Info:
Mac OS version: 14.6.1
bazelisk version: 7.4.0
Bazel version: 7.4.0
Clang version: clang-1500.3.9.4

% bazel build //source/exe:envoy-static 
CC='/private/var/tmp/_bazel_pawandeep/a4ae3f21748e4a7ba7d3bf05d923eba8/sandbox/darwin-sandbox/1577/execroot/envoy/external/local_config_cc/cc_wrapper.sh'
AR='/usr/bin/libtool'
CFLAGS='-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 '
CPPFLAGS=''
DEFS='-DHAVE_CONFIG_H'
ARFLAGS='-static -s -o'
LDFLAGS='-rdynamic -Wl,-S -undefined dynamic_lookup -headerpad_max_install_names -lc++ -lm -undefined error'
ALLOCA=''
LOADLIBES='  '
REMOTE='stub'
OBJEXT='o'
EXEEXT=''
+ ./build.sh
config.status: creating ./lib/alloca.h__
config.status: creating ./lib/fnmatch.h__
config.status: creating ./lib/glob.h__
compiling lib/concat-filename.c...
compiling lib/findprog-in.c...
./lib/findprog-in.c:148:25: error: call to undeclared function 'eaccess'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                    if (eaccess (progpathname, X_OK) == 0)
                        ^
./lib/findprog-in.c:148:25: note: did you mean 'access'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:431:6: note: 'access' declared here
int      access(const char *, int);
         ^
./lib/findprog-in.c:300:21: error: call to undeclared function 'eaccess'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                if (eaccess (progpathname, X_OK) == 0)
                    ^
2 errors generated.
Compilation failed.
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/private/make_tool_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/private/make_tool_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/private/make_tool_foreign_cc/BootstrapGNUMake.log

Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 206.106s, Critical Path: 54.77s
INFO: 2904 processes: 1133 internal, 1769 darwin-sandbox, 1 local, 1 worker.
FAILED: Build did NOT complete successfully

I have also tried building with % bazel build -c opt envoy, but getting the same error.

@pawandeep2155 pawandeep2155 added bug triage Issue requires triage labels Nov 6, 2024
@phlax
Copy link
Member

phlax commented Nov 6, 2024

hi @pawandeep2155 i think this is an issue with the llvm/clang version, libc++ version, or more likely with your Xcode install or setup (see eg bazel-contrib/rules_foreign_cc#859)

@phlax phlax added area/build area/macos and removed triage Issue requires triage labels Nov 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Dec 6, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build area/macos bug stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

2 participants