Repository navigation
bazel compile error #82
Description
Activity
It should work with gcc 4.8.1 as it is the one in ubuntu 14.04 LTS which is definitely supported.
Have you tried to compile it from master branch or have you run
git checkout tags/0.1.0after clone?If you have problems compile bazel you can try download their binaries (no copilation needed) [https://github.com/bazelbuild/bazel/releases]. And if bazel does not build on latest ubuntu lts (gcc 4.8.1) you should report it to [https://github.com/bazelbuild/bazel/issues].
Bazel contributor here. As @jendap mentioned, feel free to report any Bazel-related issues you encounter at https://github.com/bazelbuild/bazel/issues
I get a similar error using gcc 4.8.1 when I run the command
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainerI have built bazel 0.1.0 following the instructions and it didn't give any errors. It successfully clones all the repos, but as soon as it starts to compile I get these errors:
INFO: Found 1 target... INFO: From Compiling google/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc: gcc: unrecognized option '-no-canonical-prefixes' cc1plus: error: unrecognized command line option "-Wunused-but-set-parameter" cc1plus: error: unrecognized command line option "-Wno-free-nonheap-object" cc1plus: error: unrecognized command line option "-Wno-builtin-macro-redefined" tensorflow/google/protobuf/BUILD:63:1: C++ compilation of rule '//google/protobuf:protobuf' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections ... (remaining 31 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. Target //tensorflow/cc:tutorials_example_trainer failed to build@piergiaj that is weird. Don't you have two gcc version in the system? Quick googling for those flags are old. They are around for many years before gcc 4.8.1.
BTW: They are warnings, you can simply comment them out in third_party/gpus/crosstool/CROSSTOOL. But you can expect a lot more problems since it seems to be picking some very old compiler.
Thank you @jendap .
I found I have 2 gcc in my system.
My default gcc is 4.8.2. But in /usr/bin/gcc is 4.4.2.
I found there are some hard code in compile file which use "gcc:/usr/bin/gcc".You're welcome!
Yes, the hardcoded default paths should be (will be) changed to pick the one on $PATH.
@jendap I do have several versions of gcc on my system. The default one is 4.8.1, but the one in /usr/bin/gcc is 4.3.4
This seems to be caused because of the settings in tools/cpp/CROSSTOOL
tool_path { name: "gcc" path: "/usr/bin/gcc" } cxx_flag: "-std=c++0x" linker_flag: "-lstdc++" linker_flag: "-B/usr/bin/" TODO(bazel-team): In theory, the path here ought to exactly match the path used by gcc. That works because bazel currently doesn't track files at absolute locations and has no remote execution, yet. However, this will need to be fixed, maybe with auto-detection?After I changed those to point to gcc 4.8.1, it compiled several files until it failed compiling protobuf (which is a separate issue). This seems to be a known bazel issue.
- added a commit that references this issue
on Mar 9, 2016 I have the same issue on RHEL with gcc 4.4.7
I have the same issue just following this tutorial https://www.tensorflow.org/tutorials/image_retraining
How to solve this problem? I need help
E tensorflow/examples/label_image/main.cc:305] Running model failed: Not found: FeedInputs: unable to find feed output input
Thank you
- added a commit that references this issue
on Oct 11, 2018 - added a commit that references this issue
on Aug 20, 2019 - added a commit that references this issue
on Mar 16, 2022 - added a commit that references this issue
on May 17, 2022 - added 5 commits that reference this issue
on Sep 5, 2024
with gcc (GCC) 4.8.2.
git clone ;
cd bazel ;
./compile.sh;
Is there any requirement of gcc version?
I get this: