Closed kamathhrishi closed 5 years ago
I was building the custom op using Docker. This is what I got.
INFO: SHA256 (https://boringssl.googlesource.com/boringssl/+archive/afc30d43eef92979b05776ec0963c9cede5fb80f.tar.gz) = e2e87a32861bceee0d5508e65175da756116ff4c8e1e16288a136d24146b515f WARNING: /root/.cache/bazel/_bazel_root/6a072cedc59c5d9384722d447b964014/external/local_config_tf/BUILD:5:12: in hdrs attribute of cc_library rule @local_config_tf//:tf_header_lib: file '_api_implementation.so' from target '@local_config_tf//:tf_header_include' is not allowed in hdrs WARNING: /root/.cache/bazel/_bazel_root/6a072cedc59c5d9384722d447b964014/external/local_config_tf/BUILD:5:12: in hdrs attribute of cc_library rule @local_config_tf//:tf_header_lib: file '_message.so' from target '@local_config_tf//:tf_header_include' is not allowed in hdrs INFO: Analysed target //:model_enclave_op.so (21 packages loaded). INFO: Found 1 target... INFO: From SkylarkAction external/com_github_grpc_grpc/src/proto/grpc/reflection/v1alpha/reflection.pb.h: bazel-out/k8-fastbuild/genfiles/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist. INFO: From SkylarkAction external/com_github_grpc_grpc/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h: bazel-out/k8-fastbuild/genfiles/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist. ERROR: /opt/my-project/tf_trusted_custom_op/BUILD:17:1: C++ compilation of rule '//:model_enclave_op.so' failed (Exit 1): gcc failed: error executing command (cd /root/.cache/bazel/_bazel_root/6a072cedc59c5d9384722d447b964014/execroot/tf_trusted_custom_op && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ PWD=/proc/self/cwd \ TF_HEADER_DIR=/usr/local/lib/python2.7/dist-packages/tensorflow/include \ TF_SHARED_LIBRARY_DIR=/usr/local/lib/python2.7/dist-packages/tensorflow \ /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 '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/_objs/model_enclave_op.so/model_enclave_op.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/_objs/model_enclave_op.so/model_enclave_op.pic.o' -fPIC '-DPB_FIELD_32BIT=1' -DCARES_STATICLIB -iquote . -iquote bazel-out/k8-fastbuild/genfiles -iquote external/local_config_tf -iquote bazel-out/k8-fastbuild/genfiles/external/local_config_tf -iquote external/bazel_tools -iquote bazel-out/k8-fastbuild/genfiles/external/bazel_tools -iquote external/com_github_grpc_grpc -iquote bazel-out/k8-fastbuild/genfiles/external/com_github_grpc_grpc -iquote external/com_github_madler_zlib -iquote bazel-out/k8-fastbuild/genfiles/external/com_github_madler_zlib -iquote external/com_github_nanopb_nanopb -iquote bazel-out/k8-fastbuild/genfiles/external/com_github_nanopb_nanopb -iquote external/com_github_cares_cares -iquote bazel-out/k8-fastbuild/genfiles/external/com_github_cares_cares -iquote external/boringssl -iquote bazel-out/k8-fastbuild/genfiles/external/boringssl -iquote external/com_google_protobuf -iquote bazel-out/k8-fastbuild/genfiles/external/com_google_protobuf -isystem external/local_config_tf/include -isystem bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include -isystem bazel-out/k8-fastbuild/bin/external/local_config_tf/include -isystem external/com_github_grpc_grpc/include -isystem bazel-out/k8-fastbuild/genfiles/external/com_github_grpc_grpc/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/include -isystem external/com_github_madler_zlib -isystem bazel-out/k8-fastbuild/genfiles/external/com_github_madler_zlib -isystem bazel-out/k8-fastbuild/bin/external/com_github_madler_zlib -isystem external/com_github_cares_cares -isystem bazel-out/k8-fastbuild/genfiles/external/com_github_cares_cares -isystem bazel-out/k8-fastbuild/bin/external/com_github_cares_cares -isystem external/com_github_grpc_grpc/third_party/address_sorting/include -isystem bazel-out/k8-fastbuild/genfiles/external/com_github_grpc_grpc/third_party/address_sorting/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/third_party/address_sorting/include -isystem external/boringssl/src/include -isystem bazel-out/k8-fastbuild/genfiles/external/boringssl/src/include -isystem bazel-out/k8-fastbuild/bin/external/boringssl/src/include -isystem external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/genfiles/external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src -isystem cpp_model_proto_pb -isystem bazel-out/k8-fastbuild/genfiles/cpp_model_proto_pb -isystem bazel-out/k8-fastbuild/bin/cpp_model_proto_pb -pthread '-std=c++11' '-D_GLIBCXX_USE_CXX11_ABI=0' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c model_enclave_op.cc -o bazel-out/k8-fastbuild/bin/_objs/model_enclave_op.so/model_enclave_op.pic.o) In file included from model_enclave_op.cc:2:0: model_enclave_grpc.h: In member function 'bool ModelClient::GetModelPredict(std::string, const float*, int, T*, int)': model_enclave_grpc.h:114:103: error: no matching function for call to 'google::protobuf::RepeatedField<long int>::ExtractSubrange(int, int, tensorflow::int64*)' res.mutable_int64_result()->ExtractSubrange(0, res.float_result_size(), (int64*)output); ^ model_enclave_grpc.h:114:103: note: candidate is: In file included from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/wire_format_lite_inl.h:44:0, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/map_type_handler.h:35, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/map.h:49, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/generated_message_table_driven.h:34, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/tensorflow/core/framework/op_def.pb.h:25, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/tensorflow/core/framework/op_def_builder.h:24, from bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/tensorflow/core/framework/op.h:23, from model_enclave_grpc.h:1, from model_enclave_op.cc:2: bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/repeated_field.h:1204:6: note: void google::protobuf::RepeatedField<Element>::ExtractSubrange(int, int, Element*) [with Element = long int] <near match> void RepeatedField<Element>::ExtractSubrange( ^ bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/google/protobuf/repeated_field.h:1204:6: note: no known conversion for argument 3 from 'tensorflow::int64* {aka long long int*}' to 'long int*' Target //:model_enclave_op.so failed to build INFO: Elapsed time: 277.132s, Critical Path: 21.07s INFO: 1066 processes: 1066 local. FAILED: Build did NOT complete successfully
I was building the custom op using Docker. This is what I got.