bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.26k stars 4.08k forks source link

collect2: fatal error: cannot find 'ld' with build --incompatible_strict_action_env #21334

Open agluszak opened 9 months ago

agluszak commented 9 months ago

Description of the bug:

Seems to be related to #20834

When I enable build --incompatible_strict_action_env in .bazelrc building our project fails with the following error:

➜  kotlin git:(agluszak/refactor-spaghetti) ✗ bazel build //... --sandbox_debug                                          
INFO: Analyzed 150 targets (0 packages loaded, 7 targets configured).
DEBUG: Sandbox debug output for CppLink @@protobuf~21.7//:protoc:
1707844200.104456969: src/main/tools/linux-sandbox.cc:156: calling pipe(2)...
1707844200.104511302: src/main/tools/linux-sandbox.cc:165: Netns is 0
1707844200.104513667: src/main/tools/linux-sandbox.cc:176: calling clone(2)...
1707844200.105022932: src/main/tools/linux-sandbox.cc:185: linux-sandbox-pid1 has PID 80651
1707844200.105051827: src/main/tools/linux-sandbox-pid1.cc:700: Pid1Main started
1707844200.105319123: src/main/tools/linux-sandbox-pid1.cc:302: bind mount: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/execroot -> /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-execroot
1707844200.105360231: src/main/tools/linux-sandbox-pid1.cc:302: bind mount: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/execroot -> /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-working-directory
1707844200.105373727: src/main/tools/linux-sandbox-pid1.cc:302: bind mount: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools -> /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/0
1707844200.105393635: src/main/tools/linux-sandbox-pid1.cc:302: bind mount: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools~cc_configure_extension~local_config_cc -> /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/1
1707844200.105407010: src/main/tools/linux-sandbox-pid1.cc:302: bind mount: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp -> /tmp
1707844200.105425235: src/main/tools/linux-sandbox-pid1.cc:311: writable: /dev/shm
1707844200.105436987: src/main/tools/linux-sandbox-pid1.cc:311: writable: /tmp
1707844200.105454781: src/main/tools/linux-sandbox-pid1.cc:311: writable: /tmp/bazel-execroot/_main
1707844200.105465631: src/main/tools/linux-sandbox-pid1.cc:327: working dir: /tmp/bazel-working-directory/_main
1707844200.105580890: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /
1707844200.105589215: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /dev
1707844200.105595107: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /dev/pts
1707844200.105601248: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /dev/shm
1707844200.105606588: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /dev/hugepages
1707844200.105612490: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /dev/mqueue
1707844200.105619072: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run
1707844200.105625053: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/lock
1707844200.105630794: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/credentials/systemd-sysusers.service
1707844200.105636886: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/qemu
1707844200.105642567: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/user/1000
1707844200.105649129: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/user/1000/gvfs
1707844200.105692892: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/user/1000/doc
1707844200.105699324: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /run/docker/netns/f38912d93c2c
1707844200.105703352: src/main/tools/linux-sandbox-pid1.cc:427: remount(nullptr, /run/docker/netns/f38912d93c2c, nullptr, 4129, nullptr) failure (Permission denied) ignored
1707844200.105712730: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys
1707844200.105718380: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/firmware/efi/efivars
1707844200.105729321: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/kernel/security
1707844200.105750030: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/fs/cgroup
1707844200.105757975: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/fs/pstore
1707844200.105764367: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/fs/bpf
1707844200.105770820: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/kernel/debug
1707844200.105777412: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/kernel/tracing
1707844200.105784055: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/fs/fuse/connections
1707844200.105791569: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /sys/kernel/config
1707844200.105798192: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /proc
1707844200.105803432: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /proc/sys/fs/binfmt_misc
1707844200.105813982: src/main/tools/linux-sandbox-pid1.cc:427: remount(nullptr, /proc/sys/fs/binfmt_misc, nullptr, 2101281, nullptr) failure (Operation not permitted) ignored
1707844200.105854238: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /proc/sys/fs/binfmt_misc
1707844200.105861712: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /recovery
1707844200.105866732: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /boot/efi
1707844200.105891278: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /var/lib/docker/overlay2/f8d24e86254fc80e1069e49e0e17b4ac571ff497cb87bf0590dbd5d86ec9add3/merged
1707844200.105896468: src/main/tools/linux-sandbox-pid1.cc:427: remount(nullptr, /var/lib/docker/overlay2/f8d24e86254fc80e1069e49e0e17b4ac571ff497cb87bf0590dbd5d86ec9add3/merged, nullptr, 2101281, nullptr) failure (Permission denied) ignored
1707844200.105899704: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/.mount_jetbrasqy1gx
1707844200.105915123: src/main/tools/linux-sandbox-pid1.cc:427: remount(nullptr, /tmp/.mount_jetbrasqy1gx, nullptr, 2101287, nullptr) failure (No such file or directory) ignored
1707844200.105919051: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-execroot
1707844200.105925743: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-working-directory
1707844200.105950019: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/0
1707844200.105956882: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/1
1707844200.105962754: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /tmp
1707844200.105967643: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-execroot
1707844200.105972612: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-working-directory
1707844200.105977221: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-source-roots/0
1707844200.105982391: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-source-roots/1
1707844200.105987691: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /dev/shm
1707844200.105992610: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /tmp
1707844200.105997099: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-execroot
1707844200.106009552: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-working-directory
1707844200.106014261: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-source-roots/0
1707844200.106019261: src/main/tools/linux-sandbox-pid1.cc:405: remount ro: /tmp/bazel-source-roots/1
1707844200.106024090: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /tmp/bazel-execroot/_main
1707844200.106029079: src/main/tools/linux-sandbox-pid1.cc:405: remount rw: /tmp/bazel-working-directory/_main
1707844200.106194844: src/main/tools/linux-sandbox.cc:202: done manipulating pipes
1707844200.106516263: src/main/tools/linux-sandbox-pid1.cc:496: calling fork...
1707844200.106983849: src/main/tools/linux-sandbox-pid1.cc:533: child started with PID 2
1707844200.131119984: src/main/tools/linux-sandbox-pid1.cc:550: wait returned pid=2, status=0x100
1707844200.131138990: src/main/tools/linux-sandbox-pid1.cc:568: child exited normally with code 1
1707844200.131745710: src/main/tools/linux-sandbox.cc:243: child exited normally with code 1

Run this command to start an interactive shell in an identical sandboxed environment:
(exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
    PWD=/proc/self/cwd \
    TMPDIR=/tmp \
    ZERO_AR_DATE=1 \
  /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/install/14fb027596f626f2526df4873ea20b8b/linux-sandbox -W /tmp/bazel-working-directory/_main -t 15 -w /dev/shm -w /tmp -w /tmp/bazel-execroot/_main -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/execroot -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-execroot -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/execroot -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-working-directory -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/0 -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools~cc_configure_extension~local_config_cc -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/1 -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp -m /tmp -S /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/stats.out -D /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/debug.out -- /bin/sh -i)
ERROR: /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/protobuf~21.7/BUILD.bazel:457:10: Linking external/protobuf~21.7/protoc [for tool] failed: (Exit 1): linux-sandbox failed: error executing CppLink command 
  (cd /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/execroot/_main && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
    PWD=/proc/self/cwd \
    TMPDIR=/tmp \
    ZERO_AR_DATE=1 \
  /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/install/14fb027596f626f2526df4873ea20b8b/linux-sandbox -W /tmp/bazel-working-directory/_main -t 15 -w /dev/shm -w /tmp -w /tmp/bazel-execroot/_main -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/execroot -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-execroot -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/execroot -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-working-directory -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/0 -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/external/bazel_tools~cc_configure_extension~local_config_cc -m /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp/bazel-source-roots/1 -M /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/_hermetic_tmp -m /tmp -S /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/stats.out -D /home/andrzej.gluszak/.cache/bazel/_bazel_andrzej.gluszak/1c60d9a8d822a2b05451e359eb75781d/sandbox/linux-sandbox/319/debug.out -- /usr/bin/gcc @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/protoc-2.params)
collect2: fatal error: cannot find 'ld'
compilation terminated.
INFO: Elapsed time: 0.190s, Critical Path: 0.04s
INFO: 2 processes: 2 internal.
ERROR: Build did NOT complete successfully

Code is available here: https://github.com/JetBrains/bazel-bsp/commit/8a876006fafacf53a5bcd9e574af5724b42e2189

Which category does this issue belong to?

C++ Rules, Core, Local Execution

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?

Ubuntu

What is the output of bazel info release?

release 7.0.2

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

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

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

fmeum commented 9 months ago

Could you share the contents of the param file passed to gcc? And where is ld located on your machine?

agluszak commented 9 months ago
➜  bazel-bsp git:(agluszak/refactor-spaghetti) cat bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/protoc-2.params                                                                                
-o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/protoc
-Wl,-S
-fuse-ld=lld
-B/usr/bin
-Wl,-no-as-needed
-Wl,-z,relro,-z,now
-pass-exit-codes
-Wl,--gc-sections
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc/main.o
-Wl,--start-lib
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/code_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/command_line_interface.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/enum.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/enum_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/extension.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/file.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/helpers.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/map_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/message_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/padding_optimizer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/parse_function_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/primitive_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/service.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/0/string_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_doc_comment.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_enum.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_enum_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_field_base.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_helpers.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_map_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_message_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_primitive_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_reflection_class.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_repeated_enum_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_repeated_message_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_repeated_primitive_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_source_generator_base.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/csharp_wrapper_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/context.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/doc_comment.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/enum.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/enum_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/enum_field_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/enum_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/extension.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/extension_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/file.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/generator_factory.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/helpers.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/kotlin_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/map_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/map_field_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/message_builder.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/message_builder_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/message_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/message_field_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/message_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/name_resolver.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/primitive_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/primitive_field_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/service.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/shared_code_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/1/string_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/string_field_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_enum.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_enum_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_extension.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_file.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_helpers.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_map_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_message_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_oneof.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/objectivec_primitive_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/php_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/plugin.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/plugin.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/2/generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/2/helpers.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/pyi_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/ruby_generator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/subprocess.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protoc_lib/zip_writer.o
-Wl,--end-lib
-Wl,--start-lib
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/any.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/any.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/api.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/importer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/parser.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/descriptor.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/descriptor.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/descriptor_database.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/duration.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/dynamic_message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/empty.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/extension_set_heavy.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/field_mask.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/generated_message_bases.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/generated_message_reflection.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/generated_message_tctable_full.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/gzip_stream.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/printer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/tokenizer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/map_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/reflection_ops.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/service.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/source_context.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/struct.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/substitute.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/text_format.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/timestamp.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/type.pb.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/unknown_field_set.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/delimited_message_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/field_comparator.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/field_mask_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/datapiece.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/default_value_objectwriter.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/error_listener.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/field_mask_utility.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/json_escaping.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/json_objectwriter.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/json_stream_parser.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/object_writer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/proto_writer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/protostream_objectsource.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/protostream_objectwriter.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/type_info.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/utility.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/json_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/message_differencer.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/time_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/type_resolver_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/wire_format.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf/wrappers.pb.o
-Wl,--end-lib
-Wl,--start-lib
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/any_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/arena.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/arenastring.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/arenaz_sampler.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/extension_set.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/generated_enum_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/generated_message_tctable_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/generated_message_util.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/implicit_weak_message.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/inlined_string_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/coded_stream.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/io_win32.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/strtod.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/zero_copy_stream.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/zero_copy_stream_impl.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/zero_copy_stream_impl_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/map.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/message_lite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/parse_context.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/repeated_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/repeated_ptr_field.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/bytestream.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/common.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/int128.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/status.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/statusor.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/stringpiece.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/stringprintf.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/structurally_valid.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/strutil.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/time.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/protobuf~21.7/_objs/protobuf_lite/wire_format_lite.o
-Wl,--end-lib
-Wl,--start-lib
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/adler32.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/compress.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/crc32.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/deflate.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/gzclose.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/gzlib.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/gzread.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/gzwrite.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/infback.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/inffast.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/inflate.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/inftrees.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/trees.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/uncompr.o
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/zlib~1.3/_objs/zlib/zutil.o
-Wl,--end-lib
-lpthread
-lm
-lpthread
-lm
-lpthread
-lm
-lpthread
-lm
-Wl,--push-state,-as-needed
-lstdc++
-Wl,--pop-state
-Wl,--push-state,-as-needed
-lm
-Wl,--pop-state
➜  bazel-bsp git:(agluszak/refactor-spaghetti) which ld   
/usr/bin/ld
➜  bazel-bsp git:(agluszak/refactor-spaghetti) ld --version
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public Licence version 3 or (at your option) a later version.
This program has absolutely no warranty.

I noticed -fuse-ld=lld, so I'm also pasting this

➜  ~ which lld
/home/linuxbrew/.linuxbrew/opt/llvm@14/bin/lld
➜  ~ lld --version
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
➜  ~ ld.lld --version
Homebrew LLD 14.0.6 (compatible with GNU linkers)
➜  ~ echo $PATH
/home/linuxbrew/.linuxbrew/opt/llvm@14/bin:/home/linuxbrew/.linuxbrew/opt/llvm@15/bin:/home/linuxbrew/.linuxbrew/opt/openjdk@17/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/andrzej.gluszak/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/andrzej.gluszak/bin:/home/linuxbrew/.linuxbrew/opt/openjdk@17/libexec/bin:/home/linuxbrew/.linuxbrew/opt/python@3.11/libexec/bin:/home/andrzej.gluszak/.local/share/JetBrains/Toolbox/scripts
fmeum commented 9 months ago

This part is buggy:

-fuse-ld=lld
-B/usr/bin

Bazel's toolchain forces use of lld, but adds the path to ld to the search path.

coeuvre commented 8 months ago

cc @comius

gregestren commented 8 months ago

@joeleba what's the configurability tie here? i.e. is the toolchain issue about the generic toolchain API or C++-specific?