-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
nocopts
seems not woking in some cases
#5033
Comments
Hmm cannot reproduce, is it an option to create a small repro case? What I tried:
and I don't see -fno-exceptions on the command line. |
Hi @mhlopko |
Hi @mhlopko , I'm really sorry for the laaaaaaaate reply. Actually, I have such a macro: def tf_cc_test_mkl(srcs, deps, name="", linkstatic=0, tags=[], size="medium", args=None):
for src in srcs:
native.cc_test(
name=src_to_test_name(src),
srcs=if_mkl([src]) + tf_binary_additional_srcs(),
copts=tf_copts(),
linkopts=select({
clean_dep("//tensorflow:android"): [
"-pie",
],
clean_dep("//tensorflow:windows"): [],
clean_dep("//tensorflow:windows_msvc"): [],
"//conditions:default": [
"-lpthread",
"-lm"
],
}) + _rpath_linkopts(src_to_test_name(src)),
deps=deps + if_mkl(
[
"//third_party/mkl:intel_binary_blob",
],
),
linkstatic=linkstatic,
tags=tags,
size=size,
args=args,
nocopts="-fno-exceptions") which copied from the ERROR: /home/shilei/Documents/dl_framework-tensorflow_sh/tensorflow/core/kernels/BUILD:273:1: C++ compilation of rule '//tensorflow/core/kernels:mkl_ops_testutil' failed (Exit 1): gcc failed: error executing command
(cd /home/shilei/.cache/bazel/_bazel_shilei/9006bf5c0b27f0545f123e5dfa278bea/execroot/org_tensorflow && \
exec env - \
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
PWD=/proc/self/cwd \
PYTHON_BIN_PATH=/usr/bin/python \
PYTHON_LIB_PATH=/usr/lib/python2.7/site-packages \
TF_DOWNLOAD_CLANG=0 \
TF_NEED_CUDA=0 \
TF_NEED_OPENCL_SYCL=0 \
/usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -DINTEL_MKL_DNN '-std=c++0x' -I/home/shilei/.local/include -MD -MF bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/mkl_ops_testutil/tensorflow/core/kernels/mkl_ops_testutil.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/mkl_ops_testutil/tensorflow/core/kernels/mkl_ops_testutil.o' -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DTENSORFLOW_USE_ABSL -DTF_USE_SNAPPY -iquote . -iquote bazel-out/k8-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/k8-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/k8-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/k8-opt/genfiles/external/local_config_sycl -iquote external/com_google_absl -iquote bazel-out/k8-opt/genfiles/external/com_google_absl -iquote external/nsync -iquote bazel-out/k8-opt/genfiles/external/nsync -iquote external/gif_archive -iquote bazel-out/k8-opt/genfiles/external/gif_archive -iquote external/jpeg -iquote bazel-out/k8-opt/genfiles/external/jpeg -iquote external/protobuf_archive -iquote bazel-out/k8-opt/genfiles/external/protobuf_archive -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-opt/genfiles/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-opt/genfiles/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-opt/genfiles/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-opt/genfiles/external/highwayhash -iquote external/png_archive -iquote bazel-out/k8-opt/genfiles/external/png_archive -iquote external/zlib_archive -iquote bazel-out/k8-opt/genfiles/external/zlib_archive -iquote external/double_conversion -iquote bazel-out/k8-opt/genfiles/external/double_conversion -iquote external/mkl_linux -iquote bazel-out/k8-opt/genfiles/external/mkl_linux -iquote external/mkl_dnn -iquote bazel-out/k8-opt/genfiles/external/mkl_dnn -iquote external/com_google_googletest -iquote bazel-out/k8-opt/genfiles/external/com_google_googletest -isystem external/bazel_tools/tools/cpp/gcc3 -isystem third_party/eigen3/mkl_include -isystem bazel-out/k8-opt/genfiles/third_party/eigen3/mkl_include -isystem external/eigen_archive -isystem bazel-out/k8-opt/genfiles/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/k8-opt/genfiles/external/nsync/public -isystem external/gif_archive/lib -isystem bazel-out/k8-opt/genfiles/external/gif_archive/lib -isystem external/protobuf_archive/src -isystem bazel-out/k8-opt/genfiles/external/protobuf_archive/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-opt/genfiles/external/farmhash_archive/src -isystem external/png_archive -isystem bazel-out/k8-opt/genfiles/external/png_archive -isystem external/zlib_archive -isystem bazel-out/k8-opt/genfiles/external/zlib_archive -isystem external/double_conversion -isystem bazel-out/k8-opt/genfiles/external/double_conversion -isystem external/mkl_linux/include -isystem bazel-out/k8-opt/genfiles/external/mkl_linux/include -isystem external/mkl_dnn/include -isystem bazel-out/k8-opt/genfiles/external/mkl_dnn/include -isystem external/mkl_dnn/src -isystem bazel-out/k8-opt/genfiles/external/mkl_dnn/src -isystem external/mkl_dnn/src/common -isystem bazel-out/k8-opt/genfiles/external/mkl_dnn/src/common -isystem external/mkl_dnn/src/cpu -isystem bazel-out/k8-opt/genfiles/external/mkl_dnn/src/cpu -isystem external/mkl_dnn/src/cpu/xbyak -isystem bazel-out/k8-opt/genfiles/external/mkl_dnn/src/cpu/xbyak -isystem external/com_google_googletest/googlemock -isystem bazel-out/k8-opt/genfiles/external/com_google_googletest/googlemock -isystem external/com_google_googletest/googlemock/include -isystem bazel-out/k8-opt/genfiles/external/com_google_googletest/googlemock/include -isystem external/com_google_googletest/googletest -isystem bazel-out/k8-opt/genfiles/external/com_google_googletest/googletest -isystem external/com_google_googletest/googletest/include -isystem bazel-out/k8-opt/genfiles/external/com_google_googletest/googletest/include -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-ftemplate-depth=900' '-DINTEL_MKL=1' -DEIGEN_USE_VML -fopenmp -msse3 -pthread '-DINTEL_MKL=1' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/core/kernels/mkl_ops_testutil.cc -o bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/mkl_ops_testutil/tensorflow/core/kernels/mkl_ops_testutil.o)
In file included from ./tensorflow/core/util/mkl_util.h:41:0,
from ./tensorflow/core/kernels/mkl_ops_testutil.h:21,
from tensorflow/core/kernels/mkl_ops_testutil.cc:17:
external/mkl_dnn/include/mkldnn.hpp: In static member function 'static void mkldnn::error::wrap_c_api(mkldnn_status_t, std::string, mkldnn_primitive**)':
external/mkl_dnn/include/mkldnn.hpp:190:62: error: exception handling disabled, use -fexceptions to enable
throw error(status, message, *error_primitive); |
I'm wondering whether this issue only exists in the rule of |
nocopts was removed #8706 |
Description of the problem / feature request:
The
nocopts
has been set correctly, but there are still flags which are in thenocopts
appearing in the running command. For example, given the following rule, the opts-fno-exceptions
still exists in the final running command, although I've set the argnocopts
explicitly.What operating system are you running Bazel on?
macOS High Sierra 10.13.4
What's the output of
bazel info release
?release 0.12.0-homebrew
Have you found anything relevant by searching the web?
Nope.
The text was updated successfully, but these errors were encountered: