google / cdc-file-transfer

Tools for synching and streaming files from Windows to Linux
Apache License 2.0
2.97k stars 85 forks source link

problem with comping in SLES 12sp5 gcc7 #99

Open amadis opened 1 year ago

amadis commented 1 year ago

Hi team! Have a problem with comping in SLES 12sp5 Installed gcc7, using procedure described here :

linux-kazu:~/cdc-file-transfer # bazel build --config linux --compilation_mode=opt --linkopt=-Wl,--strip-all --copt=-fdata-sections --copt=-ffunction-sections --linkopt=-Wl,--gc-sections //cdc_rsync_server
Starting local Bazel server and connecting to it...
INFO: Analyzed target //cdc_rsync_server:cdc_rsync_server (46 packages loaded, 1269 targets configured).
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/770fd58f11d597af46d8de95d1f6a2d3/external/com_google_protobuf/BUILD:470:10: Compiling src/google/protobuf/compiler/main.cc failed: undeclared inclusion(s) in rule '@com_google_protobuf//:protoc':
this rule is missing dependency declarations for the following files included by 'src/google/protobuf/compiler/main.cc':
  '/usr/lib64/gcc/x86_64-suse-linux/7/include/stdarg.h'
  '/usr/lib64/gcc/x86_64-suse-linux/7/include/stddef.h'
  '/usr/lib64/gcc/x86_64-suse-linux/7/include/stdint.h'
  '/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed/limits.h'
  '/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed/syslimits.h'
Target //cdc_rsync_server:cdc_rsync_server failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 10.227s, Critical Path: 0.77s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully

Do you have any suggestions?

ljusten commented 1 year ago

Hi, this error indicates that one of the third-party dependencies we're using, Google Protobuf, does not compile. It's complaining that the build target for main.cc (which is this: https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/BUILD.bazel#L107) does not specify dependencies that include some standard system libraries. Now the weird thing is, the standard system libraries usually don't need explicit dependencies. One explanation could be that your Linux variant is not properly supported by Google Protobuf. You could check out https://github.com/protocolbuffers/protobuf and see if it mentions anything in that direction.