Description of the bug:
We need to pass some environment variables like "$CPATH" to the compiler when building TensorFlow with Bazel. This is cumbersome itself and has led to hard-to-debug issues like #12059 in the past already.
Now we again see failures caused by action-env values not passed to the compiler invocation in TensorFlow 2.8.4 which I tracked down to tensorflow/tensorflow@07cbc7b which changes cfg = "host" to cfg = "exec"
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build TensorFlow 2.8.4 with Bazel 4.2.2 passing --action-env=CPATH and observe that it is not passed to some compiler invocations resulting in e.g.:
In file included from bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/framework/dataset_options.pb.cc:4:
bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/framework/dataset_options.pb.h:10:10: fatal error: google/protobuf/port_def.inc: No such file or directory
10 | #include <google/protobuf/port_def.inc>
So can you provide information on how to use --action-env (or similar) in such circumstances?
An explanation on what is actually being done with the change to "exec" from "host" would also be very welcome. In our case we are not cross-compiling so host, target and build machine are all the same.
I would clearly classify this behavior as a bug because the documentation states:
Specifies the set of environment variables available during the execution of all actions.
But obviously there are now actions where those are missing but they should be in "all actions"
Which operating system are you running Bazel on?
REHL 7
Description of the bug:
We need to pass some environment variables like "
$CPATH" to the compiler when building TensorFlow with Bazel. This is cumbersome itself and has led to hard-to-debug issues like #12059 in the past already.Now we again see failures caused by action-env values not passed to the compiler invocation in TensorFlow 2.8.4 which I tracked down to tensorflow/tensorflow@07cbc7b which changes
cfg = "host"tocfg = "exec"What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build TensorFlow 2.8.4 with Bazel 4.2.2 passing
--action-env=CPATHand observe that it is not passed to some compiler invocations resulting in e.g.:So can you provide information on how to use
--action-env(or similar) in such circumstances?An explanation on what is actually being done with the change to "exec" from "host" would also be very welcome. In our case we are not cross-compiling so host, target and build machine are all the same.
I would clearly classify this behavior as a bug because the documentation states:
But obviously there are now actions where those are missing but they should be in "all actions"
Which operating system are you running Bazel on?
REHL 7