Description of the problem / feature request:
fully_static_link is broken.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
WORKSPACE
BUILD
cc_binary(
name = "a",
srcs = ["a.cc"],
)
a.cc
Build command and output:
% bazel build --features=fully_static_link :a
INFO: Analyzed target //:a (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /usr/local/google/home/iceboy/tmp/hellobazel/BUILD:1:1: Linking of rule '//:a' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc @bazel-out/k8-fastbuild/bin/a-2.params
Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/k8-fastbuild/bin/_objs/a/a.pic.o:a.cc:function main: error: undefined reference to 'operator new(unsigned long)'
collect2: error: ld returned 1 exit status
Target //:a failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.190s, Critical Path: 0.10s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
What operating system are you running Bazel on?
Linux
What's the output of bazel info release?
release 0.27.0
Any other information, logs, or outputs that you want to share?
Could you also share the state-of-the-art way of doing mostly static build? That is, linking libc and libm dynamically while linking other libraries (including libstdc++) statically?
Description of the problem / feature request:
fully_static_linkis broken.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
WORKSPACE
BUILD
a.cc
Build command and output:
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release?release 0.27.0Any other information, logs, or outputs that you want to share?
Could you also share the state-of-the-art way of doing mostly static build? That is, linking
libcandlibmdynamically while linking other libraries (includinglibstdc++) statically?