Repository navigation
bazel compile error #82
Copy link
Copy link
Closed
Description
with gcc (GCC) 4.8.2.
git clone ;
cd bazel ;
./compile.sh;
Is there any requirement of gcc version?
I get this:
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing. INFO: Found 1 target... INFO: From Compiling src/main/tools/build-runfiles.cc: gcc: unrecognized option '-no-canonical-prefixes' src/main/tools/build-runfiles.cc: In member function 'void RunfilesCreator::EnsureDirReadAndWritePerms(const std::string&)': src/main/tools/build-runfiles.cc:342: warning: comparison between signed and unsigned integer expressions At global scope: cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object" INFO: From Compiling src/main/cpp/util/port.cc: gcc: unrecognized option '-no-canonical-prefixes' INFO: From Compiling src/main/cpp/util/errors.cc: gcc: unrecognized option '-no-canonical-prefixes' INFO: From Compiling src/main/native/process.cc: gcc: unrecognized option '-no-canonical-prefixes' INFO: From Linking src/main/tools/build-runfiles: gcc: unrecognized option '-no-canonical-prefixes' INFO: From Compiling src/main/cpp/util/strings.cc: gcc: unrecognized option '-no-canonical-prefixes' src/main/cpp/util/strings.cc: In function 'void blaze_util::JoinStrings(const std::vector, std::allocator >, std::allocator, std::allocator > > >&, char, std::string*)': src/main/cpp/util/strings.cc:90: error: expected initializer before ':' token src/main/cpp/util/strings.cc:305: error: expected primary-expression at end of input src/main/cpp/util/strings.cc:305: error: expected ';' at end of input src/main/cpp/util/strings.cc:305: error: expected primary-expression at end of input src/main/cpp/util/strings.cc:305: error: expected ')' at end of input src/main/cpp/util/strings.cc:305: error: expected statement at end of input src/main/cpp/util/strings.cc:89: warning: unused variable 'first' src/main/cpp/util/strings.cc:305: error: expected '}' at end of input src/main/cpp/util/strings.cc: At global scope: src/main/cpp/util/strings.cc:305: error: expected '}' at end of input cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object" ERROR: /data/qianmin/project/bazel/src/main/cpp/util/BUILD:31:1: C++ compilation of rule '//src/main/cpp/util:strings' 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 '-std=c++0x' -DBLAZE_OPENSOURCE -iquote . ... (remaining 18 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. Target //src:bazel failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 7.541s, Critical Path: 1.41s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jendap commentedon Nov 10, 2015
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].
davidzchen commentedon Nov 10, 2015
Bazel contributor here. As @jendap mentioned, feel free to report any Bazel-related issues you encounter at https://github.com/bazelbuild/bazel/issues
piergiaj commentedon Nov 11, 2015
I get a similar error using gcc 4.8.1 when I run the command
I 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:
jendap commentedon Nov 11, 2015
@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.
qm1004 commentedon Nov 11, 2015
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".
jendap commentedon Nov 11, 2015
You're welcome!
Yes, the hardcoded default paths should be (will be) changed to pick the one on $PATH.
piergiaj commentedon Nov 11, 2015
@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
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.
Merge pull request tensorflow#82 from tensorflow/dask
nzamb1 commentedon Feb 28, 2017
I have the same issue on RHEL with gcc 4.4.7
saurabhvyas commentedon Mar 26, 2017
I have the same issue just following this tutorial https://www.tensorflow.org/tutorials/image_retraining
diegobrunoLRM commentedon Apr 19, 2017
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
Merge pull request tensorflow#82 from lissyx/merge-master-20181004
Fix AffineExpr::simplifyAdd bug
add model_list for renet xla test (tensorflow#82)
Add security advisory for vuln #82 in 2022
PR #74845: Adds TfLite Stablehlo Shift Left and Stablehlo And Operations
PR #74845: Adds TfLite Stablehlo Shift Left and Stablehlo And Operations
PR #74845: Adds TfLite Stablehlo Shift Left and Stablehlo And Operations
PR #74845: Adds TfLite Stablehlo Shift Left and Stablehlo And Operations
TfLite stablehlo add shift_left_op (#56) (#82)