Skip to content
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

bazel build error with gcc-5 and gcc-7 #3

Closed
gongmeteor opened this issue Aug 22, 2019 · 3 comments
Closed

bazel build error with gcc-5 and gcc-7 #3

gongmeteor opened this issue Aug 22, 2019 · 3 comments

Comments

@gongmeteor
Copy link

firstly I compiled with gcc-5 and get error log as:
WARNING: /home/chris/.cache/bazel/_bazel_chris/b2fd8959c85968b8f97fc8dbb85c5c52/external/local_config_tf/BUILD:3823:1: target 'libtensorflow_framework.so' is both a rule and a file; please choose another name for the rule
INFO: Analyzed 62 targets (0 packages loaded, 0 targets configured).
INFO: Found 62 targets...
ERROR: /home/chris/work/waymo-od/waymo_open_dataset/math/BUILD:58:1: C++ compilation of rule '//waymo_open_dataset/math:polygon2d' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 46 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
waymo_open_dataset/math/polygon2d.cc: In static member function 'static std::string waymo::open_dataset::Polygon2d::PrintPointsToString(const std::vectorwaymo::open_dataset::Vec2d&, bool)':
waymo_open_dataset/math/polygon2d.cc:484:59: error: 'DECIMAL_DIG' was not declared in this scope
::absl::StrAppendFormat(&result, "{%.*e, %.*e},\n", DECIMAL_DIG,
^
INFO: Elapsed time: 1.334s, Critical Path: 1.25s
INFO: 3 processes: 3 linux-sandbox.
FAILED: Build did NOT complete successfully

then I upgrade gcc to v7, the compile still cannot pass:
WARNING: /home/chris/.cache/bazel/_bazel_chris/b2fd8959c85968b8f97fc8dbb85c5c52/external/local_config_tf/BUILD:3823:1: target 'libtensorflow_framework.so' is both a rule and a file; please choose another name for the rule
INFO: Analyzed 62 targets (0 packages loaded, 0 targets configured).
INFO: Found 62 targets...
ERROR: /home/chris/work/waymo-od/waymo_open_dataset/math/BUILD:76:1: undeclared inclusion(s) in rule '//waymo_open_dataset/math:segment2d':
this rule is missing dependency declarations for the following files included by 'waymo_open_dataset/math/segment2d.cc':
'/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h'
'/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h'
'/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h'
'/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h'
'/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/syslimits.h'
INFO: Elapsed time: 1.341s, Critical Path: 1.25s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

@peisun1115
Copy link
Contributor

  1. I have fixed the build failure for gcc-5 in 9c66311

  2. Your build failure for gcc-7 does not seem to be related to our code. It seems that you cannot find header files from standard libs. We were not able to reproduce it in gcc-7. Try 'bazel clean'? If that does not work, do you think you can use our dockerfile and give it a try? It will be great if we can reproduce it in a docker.

@Okkband
Copy link

Okkband commented Aug 23, 2019

  1. I have fixed the build failure for gcc-5 in 9c66311
  2. Your build failure for gcc-7 does not seem to be related to our code. It seems that you cannot find header files from standard libs. We were not able to reproduce it in gcc-7. Try 'bazel clean'? If that does not work, do you think you can use our dockerfile and give it a try? It will be great if we can reproduce it in a docker.

Thanks, gcc5.4 build is ok after I checkout the branch. But gcc-7 still has some problems, so I change the gcc version to 5.4 at last. Thank you.

@peisun1115
Copy link
Contributor

Glad to hear that it is working for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants