You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrap zig cc manually and build with either Bazel or CMake works fine but failed to run with hermetic_cc_toolchain neither via traditional WORKSPACE nor via bzlmod.
Reproduce steps
git clone https://github.com/google/googletest.git
cd googletest
git checkout 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2
cat >.bazelrc <<EOFcommon --enable_platform_specific_configbuild --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1build:linux --sandbox_add_mount_pair=/tmpbuild:macos --sandbox_add_mount_pair=/var/tmpbuild:windows --sandbox_add_mount_pair=C:\TempEOF
cat >>MODULE.bazel <<EOFbazel_dep( name = "hermetic_cc_toolchain", version = "3.1.0",)toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")use_repo(toolchains, "zig_sdk")register_toolchains( "@zig_sdk//toolchain:linux_amd64_gnu.2.31", "@zig_sdk//toolchain:linux_arm64_gnu.2.31", "@zig_sdk//toolchain:windows_amd64", "@zig_sdk//toolchain:windows_arm64",)EOF
bazel test //googletest/test:gtest_skip_test
I can execute bazel-bin/googletest/test/gtest_skip_test directly but failed to run with bazel command. The logs shows:
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //googletest/test:gtest_skip_test
-----------------------------------------------------------------------------
/home/shuaiz/.cache/bazel/_bazel_shuaiz/6aeaeb0ed356c77557cf38dba9bcd145/sandbox/linux-sandbox/577/execroot/_main/bazel-out/k8-fastbuild/bin/googletest/test/gtest_skip_test.runfiles/_main/googletest/test/gtest_skip_test: error while loading shared libraries: bazel-out/k8-fastbuild/bin/_solib_k8/liblibgtest_Umain.so: cannot open shared object file: No such file or directory
An initial triage with bazel run //googletest/test:gtest_skip_test --run_under="ldd" shows:
INFO: Running command line: external/bazel_tools/tools/test/test-setup.sh /bin/bash -c '"$@"' /bin/bash ldd googletest/test/gtest_skip_test
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //googletest/test:gtest_skip_test
-----------------------------------------------------------------------------
linux-vdso.so.1 (0x00007ffce21ca000)
bazel-out/k8-fastbuild/bin/_solib_k8/liblibgtest_Umain.so => not found
bazel-out/k8-fastbuild/bin/_solib_k8/liblibgtest.so => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc92ca16000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc92c7ed000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc92ca27000)
Wrap zig cc manually and build with either Bazel or CMake works fine but failed to run with hermetic_cc_toolchain neither via traditional WORKSPACE nor via bzlmod.
Reproduce steps
I can execute
bazel-bin/googletest/test/gtest_skip_test
directly but failed to run with bazel command. The logs shows:An initial triage with
bazel run //googletest/test:gtest_skip_test --run_under="ldd"
shows:A correct version for comparison:
The text was updated successfully, but these errors were encountered: