Installation of sandboxed-api on Fedora 29

114 views
Skip to first unread message

Neeraj Pal

unread,
Mar 22, 2019, 2:20:56 PM3/22/19
to sandboxed-api-users
Hello there,

I have tried to install sandboxed-api on Fedora 29 but facing some issues during the step:

  • bazel build ...

Following are the dependencies which I have installed before installing API:

  • python-typing
  • python-clang
  • glibc-devel
  • bazel


OS Details:

[bsdboy@localhost sandboxed-api]$ uname -a
Linux localhost.localdomain 4.20.16-200.fc29.x86_64 #1 SMP Thu Mar 14 15:10:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


Errors:

[bsdboy@localhost sandboxed-api]$ bazel build ...
DEBUG: Rule 'com_google_absl' modified arguments {"sha256": "a983d9ceedd5eb349a300934e36195f2f7195ce04fc604c96e7e8b0e7d7197b9"}
DEBUG: Rule 'com_google_absl_py' modified arguments {"sha256": "64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c"}
DEBUG: Rule 'com_google_benchmark' modified arguments {"sha256": "a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048"}
INFO: Analysed 172 targets (0 packages loaded, 0 targets configured).
INFO: Found 172 targets...
INFO: From Compiling sandboxed_api/var_abstract.cc:
sandboxed_api/var_abstract.cc: In member function 'virtual sapi::Status sapi::v::Var::TransferToSandboxee(sapi::RPCChannel*, pid_t)':
sandboxed_api/var_abstract.cc:88:11: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   if (ret != GetSize()) {
       ~~~~^~~~~~~~~~~~
sandboxed_api/var_abstract.cc: In member function 'virtual sapi::Status sapi::v::Var::TransferFromSandboxee(sapi::RPCChannel*, pid_t)':
sandboxed_api/var_abstract.cc:123:11: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   if (ret != GetSize()) {
       ~~~~^~~~~~~~~~~~
INFO: From Compiling sandboxed_api/sandbox2/mounts.cc:
sandboxed_api/sandbox2/mounts.cc: In member function 'sapi::Status sandbox2::Mounts::AddMappingsForBinary(const string&, absl::string_view)':
sandboxed_api/sandbox2/mounts.cc:303:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
       for (int hw_cap = 0; hw_cap < hw_cap_paths.size(); ++hw_cap) {
                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
ERROR: /home/bsdboy/sandox/sandboxed-api/sandboxed_api/sandbox2/testcases/BUILD.bazel:124:1: Linking of rule '//sandboxed_api/sandbox2/testcases:personality' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -o bazel-out/k8-fastbuild/bin/sandboxed_api/sandbox2/testcases/personality -Wl,--whole-archive -Wl,-lpthread -Wl,--no-whole-archive -Wl,-S '-fuse-ld=gold' -Wl,-no-as-needed ... (remaining 5 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: cannot find -lc
/usr/bin/ld.gold: error: cannot find -lpthread
/usr/bin/ld.gold: error: cannot find -lstdc++
/usr/bin/ld.gold: error: cannot find -lm
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_csu_fini'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_csu_init'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_start_main'
bazel-out/k8-fastbuild/bin/sandboxed_api/sandbox2/testcases/_objs/personality/personality.pic.o:personality.cc:function main: error: undefined reference to 'syscall'
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 11.190s, Critical Path: 4.83s
INFO: 55 processes: 55 linux-sandbox.
FAILED: Build did NOT complete successfully





[bsdboy@localhost sandboxed-api]$ bazel build ...
DEBUG: Rule 'com_google_absl' modified arguments {"sha256": "a983d9ceedd5eb349a300934e36195f2f7195ce04fc604c96e7e8b0e7d7197b9"}
DEBUG: Rule 'com_google_absl_py' modified arguments {"sha256": "64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c"}
DEBUG: Rule 'com_google_benchmark' modified arguments {"sha256": "a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048"}
INFO: Analysed 172 targets (0 packages loaded, 0 targets configured).
INFO: Found 172 targets...
ERROR: /home/bsdboy/sandox/sandboxed-api/sandboxed_api/sandbox2/testcases/BUILD.bazel:124:1: Linking of rule '//sandboxed_api/sandbox2/testcases:personality' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -o bazel-out/k8-fastbuild/bin/sandboxed_api/sandbox2/testcases/personality -Wl,--whole-archive -Wl,-lpthread -Wl,--no-whole-archive -Wl,-S '-fuse-ld=gold' -Wl,-no-as-needed ... (remaining 5 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: cannot find -lc
/usr/bin/ld.gold: error: cannot find -lpthread
/usr/bin/ld.gold: error: cannot find -lstdc++
/usr/bin/ld.gold: error: cannot find -lm
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_csu_fini'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_csu_init'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o:function _start: error: undefined reference to '__libc_start_main'
bazel-out/k8-fastbuild/bin/sandboxed_api/sandbox2/testcases/_objs/personality/personality.pic.o:personality.cc:function main: error: undefined reference to 'syscall'
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 0.467s, Critical Path: 0.12s
INFO: 3 processes: 3 linux-sandbox.
FAILED: Build did NOT complete successfully


[bsdboy@localhost sandboxed-api]$ bazel build ...
DEBUG: Rule 'com_google_absl' modified arguments {"sha256": "a983d9ceedd5eb349a300934e36195f2f7195ce04fc604c96e7e8b0e7d7197b9"}
DEBUG: Rule 'com_google_absl_py' modified arguments {"sha256": "64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c"}
DEBUG: Rule 'com_google_benchmark' modified arguments {"sha256": "a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048"}
INFO: Analysed 172 targets (0 packages loaded, 0 targets configured).
INFO: Found 172 targets...
ERROR: /home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/BUILD:59:1: Generating sandboxed_api/tools/generator2/tests_sapi_generator.sapi.h from 2 header files. failed (Exit 1) sapi_generator failed: error executing command bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator --sapi_name Tests --sapi_out bazel-out/k8-fastbuild/genfiles/sandboxed_api/tools/generator2/tests_sapi_generator.sapi.h --sapi_embed_dir ... (remaining 16 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/2/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 72, in <module>
    app.run(main)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/2/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/2/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/2/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 62, in main
    FLAGS.sapi_embed_name)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 688, in generate
    related_types = self._get_related_types(function_names)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 746, in _get_related_types
    fn_related_types = f.get_related_types()
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 525, in get_related_types
    result.update(a.get_related_types(processed))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 243, in get_related_types
    return self._get_related_types_of_elaborated(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 287, in _get_related_types_of_elaborated
    result.update(Type(self._tu, f.type).get_related_types(result))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 243, in get_related_types
    return self._get_related_types_of_elaborated(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 287, in _get_related_types_of_elaborated
    result.update(Type(self._tu, f.type).get_related_types(result))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 240, in get_related_types
    return self.get_pointee().get_related_types(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 255, in get_related_types
    raise ValueError('Unkhandled kind: {}'.format(self._clang_type.kind))
ValueError: Unkhandled kind: TypeKind.UNEXPOSED
INFO: Elapsed time: 0.689s, Critical Path: 0.33s
INFO: 4 processes: 4 linux-sandbox.
FAILED: Build did NOT complete successfully


[bsdboy@localhost sandboxed-api]$ bazel build ...
DEBUG: Rule 'com_google_absl' modified arguments {"sha256": "a983d9ceedd5eb349a300934e36195f2f7195ce04fc604c96e7e8b0e7d7197b9"}
DEBUG: Rule 'com_google_absl_py' modified arguments {"sha256": "64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c"}
DEBUG: Rule 'com_google_benchmark' modified arguments {"sha256": "a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048"}
INFO: Analysed 172 targets (0 packages loaded, 0 targets configured).
INFO: Found 172 targets...
ERROR: /home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/BUILD:59:1: Generating sandboxed_api/tools/generator2/tests_sapi_generator.sapi.h from 2 header files. failed (Exit 1) sapi_generator failed: error executing command bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator --sapi_name Tests --sapi_out bazel-out/k8-fastbuild/genfiles/sandboxed_api/tools/generator2/tests_sapi_generator.sapi.h --sapi_embed_dir ... (remaining 16 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/1/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 72, in <module>
    app.run(main)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/1/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/1/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/2e0b7339f8ac66f0337dc1c48c5b1bc3/sandbox/linux-sandbox/1/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 62, in main
    FLAGS.sapi_embed_name)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 688, in generate
    related_types = self._get_related_types(function_names)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 746, in _get_related_types
    fn_related_types = f.get_related_types()
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 525, in get_related_types
    result.update(a.get_related_types(processed))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 243, in get_related_types
    return self._get_related_types_of_elaborated(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 287, in _get_related_types_of_elaborated
    result.update(Type(self._tu, f.type).get_related_types(result))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 243, in get_related_types
    return self._get_related_types_of_elaborated(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 287, in _get_related_types_of_elaborated
    result.update(Type(self._tu, f.type).get_related_types(result))
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 240, in get_related_types
    return self.get_pointee().get_related_types(result, skip_self)
  File "/home/bsdboy/sandox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 255, in get_related_types
    raise ValueError('Unkhandled kind: {}'.format(self._clang_type.kind))
ValueError: Unkhandled kind: TypeKind.UNEXPOSED
INFO: Elapsed time: 0.716s, Critical Path: 0.36s
INFO: 8 processes: 8 linux-sandbox.
FAILED: Build did NOT complete successfully 


Please let me know if I forgot to do anything.

Thanks,
Neeraj Pal




Christian Blichmann

unread,
Mar 25, 2019, 8:35:26 AM3/25/19
to Neeraj Pal, sandboxed-api-users
Hi there,

Looking through the error messages you posted, it seems that you are missing the static libraries that Sandboxed API requires to link against. Context: We use statically linked executables that are embedded into the resulting binaries.
Running this on Fedora 29 worked for me:

# Install Bazel
sudo dnf install dnf-plugins-core
sudo dnf copr enable vbatts/bazel
sudo dnf install bazel

# Install necessary development tools
sudo dnf install patch gcc-c++ glibc-static libstdc++-static clang-devel \
  python2-clang python2-typing

# Force the use of the Gold linker
sudo alternatives --config ld
[ Select /usr/bin/ld.gold ]

Hope this helps!

Christian


--
You received this message because you are subscribed to the Google Groups "sandboxed-api-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandboxed-api-u...@googlegroups.com.
To post to this group, send email to sandboxed...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sandboxed-api-users/2f9844e0-3603-4f59-9302-247f183d069e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Christian Blichmann | Software Engineer | Google™ | m: +41 79 7 18 79 43 | cblic...@google.com

Neeraj Pal

unread,
Mar 25, 2019, 10:26:18 PM3/25/19
to Christian Blichmann, sandboxed-api-users
Hi Christian,

Thank you for help but I am not sure why I am still facing some issues.

After installing the above-mentioned dependencies, I have done the fresh clone but still facing issues.

git clone https://github.com/google/sandboxed-api && cd sandboxed-api
bazel build ...


Errors:

[bsdboy@localhost sandboxed-api]$ bazel build ...
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/google/benchmark/archive/master.zip) = a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048
DEBUG: Rule 'com_google_benchmark' modified arguments {"sha256": "a61d5ef87ed4ff3cd7a3c2168f17d0ce9a48a56ce95e0f620dbe1fef94a6f048"}
INFO: SHA256 (https://github.com/abseil/abseil-py/archive/master.zip) = 64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c
DEBUG: Rule 'com_google_absl_py' modified arguments {"sha256": "64646b57f3e61e939cfdbe61155b97f21d42c1944ed5f271da4a93b174028c5c"}
INFO: SHA256 (https://github.com/abseil/abseil-cpp/archive/master.zip) = 561daad5aeff6894d2b657e2444ddf55c675ff2fb027d5ff2a9cd67e5ff27ecc
DEBUG: Rule 'com_google_absl' modified arguments {"sha256": "561daad5aeff6894d2b657e2444ddf55c675ff2fb027d5ff2a9cd67e5ff27ecc"}
INFO: Analysed 172 targets (70 packages loaded, 1925 targets configured).
INFO: Found 172 targets...
INFO: From Compiling external/com_google_protobuf/src/google/protobuf/descriptor.cc [for host]:
external/com_google_protobuf/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::Symbol google::protobuf::DescriptorPool::NewPlaceholderWithMutexHeld(const string&, google::protobuf::DescriptorPool::PlaceholderType) const':
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3893:58: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_enum, 0, sizeof(*placeholder_enum));
                                                          ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:885:26: note: 'class google::protobuf::EnumDescriptor' declared here
 class LIBPROTOBUF_EXPORT EnumDescriptor {
                          ^~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3907:60: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumValueDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_value, 0, sizeof(*placeholder_value));
                                                            ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1040:26: note: 'class google::protobuf::EnumValueDescriptor' declared here
 class LIBPROTOBUF_EXPORT EnumValueDescriptor {
                          ^~~~~~~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3926:64: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::Descriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_message, 0, sizeof(*placeholder_message));
                                                                ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:223:26: note: 'class google::protobuf::Descriptor' declared here
 class LIBPROTOBUF_EXPORT Descriptor {
                          ^~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::FileDescriptor* google::protobuf::DescriptorPool::NewPlaceholderFileWithMutexHeld(const string&) const':
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3960:46: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::FileDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
   memset(placeholder, 0, sizeof(*placeholder));
                                              ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1283:26: note: 'class google::protobuf::FileDescriptor' declared here
 class LIBPROTOBUF_EXPORT FileDescriptor {
                          ^~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-writable-strings'
INFO: From Compiling external/com_google_protobuf/src/google/protobuf/descriptor.cc:
external/com_google_protobuf/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::Symbol google::protobuf::DescriptorPool::NewPlaceholderWithMutexHeld(const string&, google::protobuf::DescriptorPool::PlaceholderType) const':
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3893:58: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_enum, 0, sizeof(*placeholder_enum));
                                                          ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:885:26: note: 'class google::protobuf::EnumDescriptor' declared here
 class LIBPROTOBUF_EXPORT EnumDescriptor {
                          ^~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3907:60: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumValueDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_value, 0, sizeof(*placeholder_value));
                                                            ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1040:26: note: 'class google::protobuf::EnumValueDescriptor' declared here
 class LIBPROTOBUF_EXPORT EnumValueDescriptor {
                          ^~~~~~~~~~~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3926:64: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::Descriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(placeholder_message, 0, sizeof(*placeholder_message));
                                                                ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:223:26: note: 'class google::protobuf::Descriptor' declared here
 class LIBPROTOBUF_EXPORT Descriptor {
                          ^~~~~~~~~~
external/com_google_protobuf/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::FileDescriptor* google::protobuf::DescriptorPool::NewPlaceholderFileWithMutexHeld(const string&) const':
external/com_google_protobuf/src/google/protobuf/descriptor.cc:3960:46: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::FileDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
   memset(placeholder, 0, sizeof(*placeholder));
                                              ^
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
                 from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1283:26: note: 'class google::protobuf::FileDescriptor' declared here
 class LIBPROTOBUF_EXPORT FileDescriptor {
                          ^~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-writable-strings'
INFO: From Compiling sandboxed_api/sandbox2/util/minielf.cc:
sandboxed_api/sandbox2/util/minielf.cc: In member function 'sapi::StatusOr<std::__cxx11::basic_string<char> > sandbox2::ElfParser::ReadSectionContents(int)':
sandboxed_api/sandbox2/util/minielf.cc:272:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Elf64_Shdr>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   if (idx < 0 || idx >= section_headers_.size()) {
                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
sandboxed_api/sandbox2/util/minielf.cc: In member function 'sapi::Status sandbox2::ElfParser::ReadSymbolsFromSymtab(const Elf64_Shdr&)':
sandboxed_api/sandbox2/util/minielf.cc:356:22: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (symbol_entries > kMaxSymbolEntries - symbol_entries_read) {
       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sandboxed_api/sandbox2/util/minielf.cc: In member function 'sapi::Status sandbox2::ElfParser::ReadImportedLibrariesFromDynamic(const Elf64_Shdr&)':
sandboxed_api/sandbox2/util/minielf.cc:414:15: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (entries > kMaxDynamicEntries - dynamic_entries_read) {
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling sandboxed_api/var_abstract.cc:
sandboxed_api/var_abstract.cc: In member function 'virtual sapi::Status sapi::v::Var::TransferToSandboxee(sapi::RPCChannel*, pid_t)':
sandboxed_api/var_abstract.cc:88:11: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   if (ret != GetSize()) {
       ~~~~^~~~~~~~~~~~
sandboxed_api/var_abstract.cc: In member function 'virtual sapi::Status sapi::v::Var::TransferFromSandboxee(sapi::RPCChannel*, pid_t)':
sandboxed_api/var_abstract.cc:123:11: warning: comparison of integer expressions of different signedness: 'ssize_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   if (ret != GetSize()) {
       ~~~~^~~~~~~~~~~~
INFO: From Compiling sandboxed_api/sandbox2/mounts.cc:
sandboxed_api/sandbox2/mounts.cc: In member function 'sapi::Status sandbox2::Mounts::AddMappingsForBinary(const string&, absl::string_view)':
sandboxed_api/sandbox2/mounts.cc:303:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
       for (int hw_cap = 0; hw_cap < hw_cap_paths.size(); ++hw_cap) {
                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling sandboxed_api/rpcchannel.cc:
In file included from ./sandboxed_api/rpcchannel.h:24,
                 from sandboxed_api/rpcchannel.cc:15:
./sandboxed_api/util/statusor.h: In instantiation of 'T sapi::StatusOr<T>::ValueOrDie() && [with T = sapi::FuncRet]':
sandboxed_api/rpcchannel.cc:33:3:   required from here
./sandboxed_api/util/statusor.h:86:5: note: the ABI of passing union with long double has changed in GCC 4.4
   T ValueOrDie() && {
     ^~~~~~~~~~
INFO: From Compiling sandboxed_api/client.cc:
In file included from sandboxed_api/client.cc:23:
bazel-out/k8-fastbuild/bin/external/com_google_glog/_virtual_includes/glog/glog/logging.h: In instantiation of 'std::__cxx11::string* google::Check_EQImpl(const T1&, const T2&, const char*) [with T1 = long unsigned int; T2 = long int; std::__cxx11::string = std::__cxx11::basic_string<char>]':
sandboxed_api/client.cc:377:7:   required from here
bazel-out/k8-fastbuild/bin/external/com_google_glog/_virtual_includes/glog/glog/logging.h:717:32: warning: comparison of integer expressions of different signedness: 'const long unsigned int' and 'const long int' [-Wsign-compare]
 DEFINE_CHECK_OP_IMPL(Check_EQ, ==)  // Compilation error with CHECK_EQ(NULL, x)?
                                ^
bazel-out/k8-fastbuild/bin/external/com_google_glog/_virtual_includes/glog/glog/logging.h:148:53: note: in definition of macro 'GOOGLE_PREDICT_TRUE'
 #define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
                                                     ^
bazel-out/k8-fastbuild/bin/external/com_google_glog/_virtual_includes/glog/glog/logging.h:717:1: note: in expansion of macro 'DEFINE_CHECK_OP_IMPL'
 DEFINE_CHECK_OP_IMPL(Check_EQ, ==)  // Compilation error with CHECK_EQ(NULL, x)?
 ^~~~~~~~~~~~~~~~~~~~
INFO: From Compiling sandboxed_api/sandbox2/testcases/namespace.cc:
sandboxed_api/sandbox2/testcases/namespace.cc: In function 'int main(int, char**)':
sandboxed_api/sandbox2/testcases/namespace.cc:69:20: warning: comparison of integer expressions of different signedness: '__uid_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
       if (getuid() != atoi(argv[2])        // NOLINT(runtime/deprecated_fn)
           ~~~~~~~~~^~~~~~~~~~~~~~~~
sandboxed_api/sandbox2/testcases/namespace.cc:70:23: warning: comparison of integer expressions of different signedness: '__gid_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
           || getgid() != atoi(argv[3])) {  // NOLINT(runtime/deprecated_fn)
              ~~~~~~~~~^~~~~~~~~~~~~~~~
ERROR: /home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/examples/zlib/BUILD.bazel:21:1: Generating sandboxed_api/examples/zlib/zlib-sapi.sapi.h from 11 header files. failed (Exit 1) sapi_generator failed: error executing command bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator --sapi_name Zlib --sapi_out bazel-out/k8-fastbuild/genfiles/sandboxed_api/examples/zlib/zlib-sapi.sapi.h --sapi_embed_dir ... (remaining 24 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/866b036592aadf74558f8913e84d1f1e/sandbox/linux-sandbox/616/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 72, in <module>
    app.run(main)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/866b036592aadf74558f8913e84d1f1e/sandbox/linux-sandbox/616/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/866b036592aadf74558f8913e84d1f1e/sandbox/linux-sandbox/616/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_absl_py/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/home/bsdboy/.cache/bazel/_bazel_bsdboy/866b036592aadf74558f8913e84d1f1e/sandbox/linux-sandbox/616/execroot/com_google_sandboxed_api/bazel-out/host/bin/sandboxed_api/tools/generator2/sapi_generator.runfiles/com_google_sandboxed_api/sandboxed_api/tools/generator2/sapi_generator.py", line 62, in main
    FLAGS.sapi_embed_name)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 688, in generate
    related_types = self._get_related_types(function_names)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 746, in _get_related_types
    fn_related_types = f.get_related_types()
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 525, in get_related_types
    result.update(a.get_related_types(processed))
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 243, in get_related_types
    return self._get_related_types_of_elaborated(result, skip_self)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 287, in _get_related_types_of_elaborated
    result.update(Type(self._tu, f.type).get_related_types(result))
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 234, in get_related_types
    return self._get_related_types_of_typedef(result)
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 273, in _get_related_types_of_typedef
    result.update(t.get_related_types(result, skip_child))
  File "/home/bsdboy/test_sandbox/sandboxed-api/sandboxed_api/tools/generator2/code.py", line 255, in get_related_types
    raise ValueError('Unkhandled kind: {}'.format(self._clang_type.kind))
ValueError: Unkhandled kind: TypeKind.UNEXPOSED
INFO: Elapsed time: 264.430s, Critical Path: 26.02s
INFO: 617 processes: 617 linux-sandbox.
FAILED: Build did NOT complete successfully
[bsdboy@localhost sandboxed-api]$


Thanks,
Neeraj Pal


--

Thank you!
Sincere regards;

Neeraj Pal
Reply all
Reply to author
Forward
Message has been deleted
0 new messages