-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Install Bazel on CentOS 6.7 for Syntaxnet #1357
Comments
Please refer to http://www.bazel.io/docs/install.html |
@meteorcloudy Thanks for the reply. I get the following errors when I run ./compile.sh: [sree@ds1 bazel]$ ./compile.sh [sree@ds1 bazel]$ whereis java [sree@ds1 bazel]$ which java My PATH variable: Can you help me why it is not able to find the correct path to working JAVA? I even tried creating a link with the instruction: sudo ln -s /opt/jdk1.8.0_91/bin /opt/jdk1.8.0_9 |
Please set |
Oops, that was a typo. I have the following error now: ERROR: /home/sree/bazel/src/main/cpp/util/BUILD:4:1: C++ compilation of rule '//src/main/cpp/util:util' failed: gcc failed: error executing command |
Is there any more specific error message? I don't know why this command failed, looks good to me. |
This is the entire log:
Not even sure why it is showing syntax errors in src/main/cpp/util/file.cc. |
Can you try to execute these command manually? And see what happens.
|
Sorry for the delay. Here is the output: src/main/cpp/util/file.cc: In function ‘std::string blaze_util::Which(const std::string&)’: |
What version of gcc are you using? It looks like it doesn't recognize for-each loops. |
I still have no idea why there is syntax error.
is probably caused by my commit 828a9e2, and I tried to fix it at cc993c2. Looks like something is still missing. I'll fix it tomorrow! |
@kchodorow Hi, my GCC version is 4.8.4. I originally had 4.4.7 but I tried upgrading it to 4.8 uisng a tutorial given in: http://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos. FYI: [sree@ds1 ~]$ ldd --version @meteorcloudy, @kchodorow is this upgrade causing any trouble? I know upgrading gcc is a dangerous thing to do, but since the answer was upvoted by so many people, I did it. |
No, that gcc should be recent enough to support auto! Just to make sure, can you try running |
Looks like you are right. This does shows the old version: How and where do I change the path? |
Theoretically you can just replace it with the one you want: http://askubuntu.com/questions/269257/how-to-activate-gcc-4-7-version. (But rm-ing gcc always makes me nervous, so if I were you, I'd just move it to /usr/bin/gcc.bak or something.) |
@kchodorow I created a link sudo ln -s /opt/centos/devtoolset-1.1/root/usr/bin/ /usr/bin/gcc to point it to the newer gcc. Now when I run ./compile.sh, i get the following: ERROR: /home/sree/bazel/src/main/cpp/util/BUILD:4:1: C++ compilation of rule '//src/main/cpp/util:util' failed: gcc failed: error executing command |
You can't use a symlink, just copy the file. Bazel creates a sandbox for each build action, so /usr/bin/gcc is in the sandbox but /opt/centos/devtoolset-2/root/usr/bin/gcc isn't. So the symlink points to a non-existent location during the build. |
Sorry for my ignorance, but could you be more clear? DO you want me to move the /opt/centos/devtoolset-2/root/usr/bin/gcc to /usr/bin/?? and move usr/bin/gcc to somewhere else?? |
Yeah, do something like:
|
Thanks. Now for some reason, my gcc version has changed to 4.7.2. Will that still work or do I have to upgrade again? And ./compile.sh gives: |
Did you intend to close this? |
@kchodorow Yes, I figured it out myself. I have bazel running now. Thanks for the support. Really appreciate. |
Great, glad it worked out! |
Hi @kchodorow, I am also getting same error in CentOS 6.7 with gcc 4.4.7, Could you please update me how did you fix the issue. ? I have 4.4.7 alone, |
@kskp how did you solve this problem in the end? |
FTR, we maintain a sucessful build of Bazel on CentOS using a newer gcc, here: With that docker file you should be able to build bazel (test command is there: https://github.com/bazelbuild/bazel/blob/master/tools/cpp/test/BUILD#L53) So taking the current docker file, install steps for CentOS should look like: # Install the dependencies of Bazel
yum install java-1.8.0-openjdk-devel wget which findutils binutils gcc tar gzip zip unzip java java-devel git clang zlib-devel gcc-c++
# Install a newer gcc
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
# Set the path to java and gcc
export JAVA_HOME=/usr/lib/jvm/java-1.8.0
export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
# Clone the repository
git clone https://github.com/bazelbuild/bazel /tmp/bazel
# Compile bazel
cd /tmp/bazel; ./compile.sh
# Copy the bazel binary to some binary directory
cp /tmp/bazel/output/bazel ~/bin |
FWIW, I added a wiki page for it: https://github.com/bazelbuild/bazel/wiki/Installing-Bazel-on-CentOS-6.7 |
Seeing below error during bazel compilation. |
https://gist.github.com/truatpasteurdotfr/d541cd279b9f7bf38ce967aa3743dfcb for an updated version, and the corresponding Dockerfile |
Hi All,
I have tried lot of resources to install Bazel and Build Syntaxnet on my machine with the following configuration:
OS:
[sree@ds1 ~]$ cat /proc/version
Linux version 2.6.32-504.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014
Python:
[sree@ds1 ~]$ python
Python 2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Java:
[sree@ds1 ~]$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
GCC:
[sree@ds1 ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)
[sree@ds1 ~]$ ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Can someone please give me a step by step procedure on how to install and configure bazel on my system. I am not very well versed with Linux, so please consider my lack of knowledge and provide a detailed solution to my problem.
The text was updated successfully, but these errors were encountered: