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

osx "bazel test" fails with "dyld: Symbol not found: _program_invocation_name" #121

Open
chadm-sq opened this issue Apr 20, 2020 · 4 comments

Comments

@chadm-sq
Copy link

OSX 10.15.4

bazel: stable 3.0.0 (bottled)

-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
$ bazel test //:echo2_integration_test

DEBUG: _/private/var/tmp/_bazeluser/a9fc29333019096f53a1d7073ad2f2d9/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:9:_
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:9:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
DEBUG: /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:9:
Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
INFO: Analyzed target //:echo2_integration_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
FAIL: //:echo2_integration_test (see /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/execroot/envoy_filter_example/bazel-out/darwin-fastbuild/testlogs/echo2_integration_test/test.log)
Target //:echo2_integration_test up-to-date:
  bazel-bin/echo2_integration_test
INFO: Elapsed time: 0.591s, Critical Path: 0.18s
INFO: 2 processes: 2 darwin-sandbox.
INFO: Build completed, 1 test FAILED, 2 total actions
//:echo2_integration_test                                                FAILED in 0.1s
  /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/execroot/envoy_filter_example/bazel-out/darwin-fastbuild/testlogs/echo2_integration_test/test.log

INFO: Build completed, 1 test FAILED, 2 total actions
$ cat /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/execroot/envoy_filter_example/bazel-out/darwin-fastbuild/testlogs/echo2_integration_test/test.log
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:echo2_integration_test
-----------------------------------------------------------------------------
dyld: Symbol not found: _program_invocation_name
  Referenced from: /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/sandbox/darwin-sandbox/4181/execroot/envoy_filter_example/bazel-out/darwin-fastbuild/bin/echo2_integration_test.runfiles/envoy_filter_example/echo2_integration_test
  Expected in: flat namespace
 in /private/var/tmp/_bazel_user/a9fc29333019096f53a1d7073ad2f2d9/sandbox/darwin-sandbox/4181/execroot/envoy_filter_example/bazel-out/darwin-fastbuild/bin/echo2_integration_test.runfiles/envoy_filter_example/echo2_integration_test
external/bazel_tools/tools/test/test-setup.sh: line 310: 19225 Abort trap: 6
@chadm-sq
Copy link
Author

See also envoyproxy/envoy#10478

@mygityf
Copy link

mygityf commented Apr 22, 2020

Temporarily add 'char *program_invocation_name;' to the source/exe/main.cc, wait for official solution.

@amitc-agr
Copy link

i too facing the same issue...i have changed source/exe/main.cc and add 'char *program_invocation_name;' ...but with no luck

@LisaLudique
Copy link

I would try installing XCode (the application; CommandLineTools alone is insufficient) and seeing if that solves your problem.

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

No branches or pull requests

4 participants