Bazel: failed to install bazel on Red Hat 6.7

Created on 8 Jan 2016  ·  110Comments  ·  Source: bazelbuild/bazel

I would like to install bazel from source, and use bazel to compile tensorflow on a cluster running redhat 6.7. When I try to install bazel, the glibc version (2.12) is too old. I do not have root access to the cluster. Is it possible to install tensorflow in this case?

My system information:

-bash-4.1$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
-bash-4.1$ which gcc
/usr/bin/gcc
-bash-4.1$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/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-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) 
-bash-4.1$ ldd --version
ldd (GNU libc) 2.12

The system has newer gcc installed as well. I tried using it, bazel still won't compile.

-bash-4.1$ /usr/local/gcc/4.8.4/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/4.8.4/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local/gcc/4.8.4
Thread model: posix
gcc version 4.8.4 (GCC) 

When I was compiling bazel using gcc 4.8.4, I got the following error:

bazel-0.1.1/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found

How can I install the missing dependency locally, and have bazel pick up the right version of glib? What part of tools/cpp/CROSSTOOL should I modify? What environment variables should I set before ./compile.sh

I am trying to install bazel-0.1.1 instead of bazel-0.1.2 because the latter does not compile tensorflow.
https://github.com/tensorflow/tensorflow/issues/469

P2 other team-Configurability bug

Most helpful comment

Why can't bazel simply respect my PATH?

Such was what I kept screaming to google until it led me to this issue. When I set up my compiler tool chain, I expect the first cc and ld found in my PATH to be the working combination. Yet bazel secretly used my cc and instructed my cc to pick a funny ld.

All 110 comments

Have you updated the path to GCC / libraris in the tools/cpp/CROSSTOOL file?
You should also set correctly CXX, CC, LDFLAGS environment variables and co.

@damienmg Yes, I have tried. But there are many entries in tools/cpp/CROSSTOOl. I am not sure I have updated everything.

I tried the following but it didn't work.

In CROSSTOOL, I changed cpp path, gcc path and added cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib64/", cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib/"

toolchain {
  abi_version: "local"
                       abi_libc_version: "local"
                       builtin_sysroot: ""
  compiler: "compiler"
  host_system_name: "local"
  needsPic: true
  supports_gold_linker: false
  supports_incremental_linker: false
  supports_fission: false
  supports_interface_shared_objects: false
  supports_normalizing_ar: false
  supports_start_end_lib: false
  supports_thin_archives: false
  target_libc: "local"
  target_cpu: "local" 
  target_system_name: "local"
  toolchain_identifier: "local_linux"

  tool_path { name: "ar" path: "/usr/bin/ar" }
  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
  tool_path { name: "cpp" path: "/usr/local/gcc/4.8.4/bin/g++" }
  tool_path { name: "dwp" path: "/usr/bin/dwp" }
  tool_path { name: "gcc" path: "/usr/local/gcc/4.8.4/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?
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib64/"
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib/"
  cxx_builtin_include_directory: "/usr/lib/gcc/"
  cxx_builtin_include_directory: "/usr/local/include"
  cxx_builtin_include_directory: "/usr/include"
  tool_path { name: "gcov" path: "/usr/bin/gcov" }

  # C(++) compiles invoke the compiler (as that is the one knowing where
  # to find libraries), but we provide LD so other rules can invoke the linker.
  tool_path { name: "ld" path: "/usr/bin/ld" }

  tool_path { name: "nm" path: "/usr/bin/nm" }
  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
  objcopy_embed_flag: "-I"
  objcopy_embed_flag: "binary"
  tool_path { name: "objdump" path: "/usr/bin/objdump" }
  tool_path { name: "strip" path: "/usr/bin/strip" }

  # Anticipated future default.
  unfiltered_cxx_flag: "-no-canonical-prefixes"

  # Make C++ compilation deterministic. Use linkstamping instead of these
  # compiler symbols.
  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""

  # Security hardening on by default.
  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
  # We need to undef it before redefining it as some distributions now have
  # it enabled by default.
  compiler_flag: "-U_FORTIFY_SOURCE"
  compiler_flag: "-D_FORTIFY_SOURCE=1"
  compiler_flag: "-fstack-protector"
  compiler_flag: "-fPIE"
  linker_flag: "-pie"
  linker_flag: "-Wl,-z,relro,-z,now"

  # Enable coloring even if there's no attached terminal. Bazel removes the
  # escape sequences if --nocolor is specified. This isn't supported by gcc
  # on Ubuntu 14.04.
  # compiler_flag: "-fcolor-diagnostics"

  # All warnings are enabled. Maybe enable -Werror as well?
  compiler_flag: "-Wall"
  # Enable a few more warnings that aren't part of -Wall.
  compiler_flag: "-Wunused-but-set-parameter"
  # But disable some that are problematic.
  compiler_flag: "-Wno-free-nonheap-object" # has false positives

  # Keep stack frames for debugging, even in opt mode.
  compiler_flag: "-fno-omit-frame-pointer"

  # Anticipated future default.
  linker_flag: "-no-canonical-prefixes"
  # Have gcc return the exit code from ld.
  linker_flag: "-pass-exit-codes"
  # Stamp the binary with a unique identifier.
  linker_flag: "-Wl,--build-id=md5"
  linker_flag: "-Wl,--hash-style=gnu"
  # Gold linker only? Can we enable this by default?
  # linker_flag: "-Wl,--warn-execstack"
  # linker_flag: "-Wl,--detect-odr-violations"

  compilation_mode_flags {
    mode: DBG
    # Enable debug symbols.
    compiler_flag: "-g"
  }
  compilation_mode_flags {
    mode: OPT

    # No debug symbols.
    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
    # even generally? However, that can't happen here, as it requires special
    # handling in Bazel.
    compiler_flag: "-g0"

    # Conservative choice for -O
    # -O3 can increase binary size and even slow down the resulting binaries.
    # Profile first and / or use FDO if you need better performance than this.
    compiler_flag: "-O2"

    # Disable assertions
    compiler_flag: "-DNDEBUG"

    # Removal of unused code and data at link time (can this increase binary size in some cases?).
    compiler_flag: "-ffunction-sections"
    compiler_flag: "-fdata-sections"
    linker_flag: "-Wl,--gc-sections"
  }
}

I set the environment variable and compile

-bash-4.1$ JAVA_HOME=/usr/local/java/1.8.0_60 CXX=/usr/local/gcc/4.8.4/bin/c++  CC=/usr/local/gcc/4.8.4/bin/gcc LDFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"  ./compile.sh 

I got errors.

INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh build /path/to/bazel
Building Bazel from scratch............
Building Bazel with Bazel.
bazel/bazel-0.1.1/output/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by bazel/bazel-0.1.1/output/bazel)
bazel/bazel-0.1.1/output/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by bazel/bazel-0.1.1/output/bazel)

It seems bazel is not picking up the right library. What else should I update in tools/cpp/CROSSTOOL? Am I using the run time environment variables correctly?

There you are failing at the first step you should export CXX, CC, LDFLAGS and CXXFLAGS

I am removing the need for this, but it's still there for now.

@damienmg

Tried again I still got the same error.

export JAVA_HOME=/usr/local/java/1.8.0_60
export CXX=/usr/local/gcc/4.8.4/bin/c++
export CC=/usr/local/gcc/4.8.4/bin/gcc
export LDFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
export CXXFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
./compile.sh

Like exactly the same (at the same place, concerning output/bazel)?

Also can you try a more recent version of bazel (0.1.3 should work nicely)

@damienmg The error was exactly the same. I also tried 0.1.3. After I export flags and update CROSSTOOL, I got the same error again.

bazel/bazel-0.1.3/output/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by bazel/bazel-0.1.3/output/bazel)
bazel/bazel-0.1.3/output/bazel: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by bazel/bazel-0.1.3/output/bazel)

I suspect I did not update CROSSTOOL correctly. I only changed the following lines:

  tool_path { name: "cpp" path: "/usr/local/gcc/4.8.4/bin/cpp" }
  tool_path { name: "gcc" path: "/usr/local/gcc/4.8.4/bin/gcc" }
  linker_flag: "-lstdc++ -L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"

and add following lines

  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib64/"
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib/"

is there other places I need to update on CROSSTOOLS?

@damienmg It always search for default libstdc++ in /usr/lib64, not matter how I export environment variable or update CROSSTOOLS. It seems the same problem was observed by other guys (https://github.com/bazelbuild/bazel/issues/590).

:( By the end of the week my changes for the bootstrap part should be in so it should go further. I have no idea why it is happening though.

@damienmg I made some progress. I am getting different errors after I do

export LD_LIBRARY_PATH=/usr/local/gcc/4.8.4/lib:/usr/local/gcc/4.8.4/lib64

But now I am getting:

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...
ERROR: /home/pc/bazel/bazel-0.1.3/src/main/tools/BUILD:26:1: undeclared inclusion(s) in rule '//src/main/tools:build-runfiles':
this rule is missing dependency declarations for the following files included by 'src/main/tools/build-runfiles.cc':
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/map'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_tree.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_algobase.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/c++config.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/os_defines.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/cpu_defines.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/functexcept.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/exception_defines.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/cpp_type_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/ext/type_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/ext/numeric_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_pair.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/move.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/concept_check.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/type_traits'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_iterator_base_types.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_iterator_base_funcs.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/debug/debug.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_iterator.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/allocator.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/c++allocator.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/ext/new_allocator.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/new'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/exception'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/atomic_lockfree_defines.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/exception_ptr.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/nested_exception.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/memoryfwd.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_function.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/backward/binders.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/alloc_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/ptr_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_map.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/initializer_list'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/tuple'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/utility'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_relops.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/array'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/stdexcept'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/string'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stringfwd.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/char_traits.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/postypes.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cwchar'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cstdint'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/localefwd.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/c++locale.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/clocale'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/iosfwd'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cctype'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/ostream_insert.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/cxxabi_forced.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/range_access.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/basic_string.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/ext/atomicity.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/gthr.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/gthr-default.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu/bits/atomic_word.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/ext/string_conversions.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cstdlib'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cstdio'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/cerrno'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/functional_hash.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/hash_bytes.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/basic_string.tcc'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/uses_allocator.h'
  '/usr/local/gcc/4.8.4/include/c++/4.8.4/bits/stl_multimap.h'.
Target //src:bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 11.692s, Critical Path: 1.30s

Building output/bazel

Where should I put --ignore_unsupported_sandboxing to disable sandbox? Is sandbox is the culprit?

@damienmg have you finished the bootstrap part? Maybe I can test it on redhat 6.7?

@digitalsword I am still trying to get them merged, some changes have landed already (0a7a3d2 and 12c68a) but there are more to do. It should land next week. Then I can concentrate on the auto-configuration mechanism for Bazel.

For your specific issue, you need to add /usr/local/gcc/4.8.4/include/c++/4.8.4/ to the tools/cpp/CROSSTOOL file as a cxx_builtin_include_directory (that the kind of thing I want to handle by the auto configuration mechanism)

@damienmg I am running into the glib version issue again. When you finish auto-configuration part, can you give me instructions on using auto configuration on Redhat 6.7? Thanks!

Sure but this will take a few more months before being ready :(

@damienmg I am able to compile the head version of bazel, however, when I try to compile tensorflow, I get glib error again.

/tmp/tensorflow_head/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /tmp/tensorflow_head/_bin/build-runfiles)

I used these commands to compile tensorflow

export JAVA_HOME=/usr/local/java/1.8.0_60
export CXX=/usr/local/gcc/4.8.4/bin/c++
export CC=/usr/local/gcc/4.8.4/bin/gcc
export LDFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
export CXXFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
export LD_LIBRARY_PATH=/usr/local/gcc/4.8.4/lib:/usr/local/gcc/4.8.4/lib64

bazel --output_base /tmp/ build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer

Is there any environment variable to be set when using bazel to compile tensorflow, in other words how can I force bazel to use the newer glib library.

With the latest change, if you pass compile.sh then only the CROSSTOOL files change should be important. How did you modified your CROSSTOOL file?

@damienmg

change CROSSTOOL file to:

 tool_path { name: "ar" path: "/usr/bin/ar" }
  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
  tool_path { name: "cpp" path: "/usr/local/gcc/4.8.4/bin/cpp" }
  tool_path { name: "dwp" path: "/usr/bin/dwp" }
  tool_path { name: "gcc" path: "/usr/local/gcc/4.8.4/bin/gcc" }
  cxx_flag: "-std=c++0x"
  linker_flag: "-lstdc++ -L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
  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?
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/include/c++/4.8.4/"
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib64/"
  cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib/"
  cxx_builtin_include_directory: "/usr/lib/gcc/"
  cxx_builtin_include_directory: "/usr/local/include"
  cxx_builtin_include_directory: "/usr/include"
  tool_path { name: "gcov" path: "/usr/bin/gcov" }

and just compile with:

export JAVA_HOME=/usr/local/java/1.8.0_60
export CXX=/usr/local/gcc/4.8.4/bin/c++
export CC=/usr/local/gcc/4.8.4/bin/gcc
export LDFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
export CXXFLAGS="-L/usr/local/gcc/4.8.4/lib -L/usr/local/gcc/4.8.4/lib64"
export LD_LIBRARY_PATH=/usr/local/gcc/4.8.4/lib:/usr/local/gcc/4.8.4/lib64
./compile.sh

Invoking @ulfjack who knows more about C++.

Tricky, since I can't reproduce the issue. I tried downloading a docker image for rhel6.7, but I can't seem to figure out how to install stuff on it.

The env variables are ignored by Bazel, and the compile.sh should no longer compile any C++ code. Therefore, any errors you get have to be from a run of Bazel itself, and the only way to fix them is to change the CROSSTOOL file.

If you have a C++ binary that tries to load the wrong dynamic library, try running ldd on it, and see what that says. The dynamic linker by default uses a search path baked into the binary, and it would be good if we could check that. If that needs to be changed, we'll have to figure out how to do that. I don't know of the top of my head.

(not all the env variable are ignored, JAVA_HOME is used)

@ulfjack @damienmg thank you for your replies. It is mentioned that

The env variables are ignored by Bazel...

I think that's the reason that bazel ignores GLIBCXX placed in directories among $LD_LIBRARY_PATH.

I worked on Cent OS 6.x. This issue happens when I built bazel 0.1.4 from source with gcc/g++ and libstdc++.so in non-standard directories.

Customization made to CROSSTOOL

I specify gcc and necessary header files.

-  tool_path { name: "gcc" path: "/usr/bin/gcc" }
+  tool_path { name: "gcc" path: "/lustre/usr/gcc/4.9/bin/gcc" }

+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include"
+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed"
+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/include/c++/4.9.3"

Error messages

GCC and JDK I use:

$ which gcc; gcc --version
/lustre/usr/gcc/4.9/bin/gcc
gcc (GCC) 4.9.3
Copyright (C) 2015 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.


$ which javac; javac -version
/lustre/usr/jdk/1.8/bin/javac
javac 1.8.0_60

Build:

$ pkill java; rm -rf ~/.cache/bazel ;  ./compile.sh
...
.Extracting Bazel installation...
..........
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 Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles:
/lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles)
ERROR: /tmp/bazel/src/tools/android/java/com/google/devtools/build/android/idlclass/BUILD:10:1: Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles failed: build-runfiles failed: error executing command /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles ... (remaining 2 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: 11.112s, Critical Path: 4.48s

Building output/bazel

Complaints about GLIBCXX_3.4.14 arises. build-runfiles seems to use the default and outdated C++ lib in /usr/lib64/libstdc++.so.6. However, ldd indicates that the proper lib is available out there.

$ echo $LD_LIBRARY_PATH 
/lustre/usr/gcc/4.9/lib64

$ strings /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 | grep '3.4.14'
GLIBCXX_3.4.14

$ ldd /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles
        linux-vdso.so.1 =>  (0x00007ffff4dff000)
        libstdc++.so.6 => /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 (0x00002b9213921000)
        libz.so.1 => /lib64/libz.so.1 (0x000000396de00000)
        librt.so.1 => /lib64/librt.so.1 (0x000000396e200000)
        libm.so.6 => /lib64/libm.so.6 (0x000000396d600000)
        libgcc_s.so.1 => /lustre/usr/gcc/4.9/lib64/libgcc_s.so.1 (0x00002b9213c56000)
        libc.so.6 => /lib64/libc.so.6 (0x000000396ce00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x000000396da00000)
        /lib64/ld-linux-x86-64.so.2 (0x000000396ca00000)

Things that may help

I guess there is something wrong when bazel invokes the build-runfiles command. It'll help if bazel prints every action it takes.

Could you try at HEAD? I removed most C++ compilation from the first steps
to build-runfiles should not be build.

On Fri, Jan 22, 2016 at 2:11 PM 健美猫 [email protected] wrote:

@ulfjack https://github.com/ulfjack @damienmg
https://github.com/damienmg thank you for your replies. It is mentioned
that

The env variables are ignored by Bazel...

I think that's the reason that bazel ignores GLIBCXX placed in directories
among $LD_LIBRARY_PATH.

I worked on Cent OS 6.x. This issue happens when I built bazel 0.1.4 from
source with gcc/g++ and libstdc++.so in non-standard directories.
Customization made to CROSSTOOL

I specify gcc and necessary header files.

  • tool_path { name: "gcc" path: "/usr/bin/gcc" }
  • tool_path { name: "gcc" path: "/lustre/usr/gcc/4.9/bin/gcc" }
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include"
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed"
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/include/c++/4.9.3"

Error messages

GCC and JDK I use:

$ which gcc; gcc --version
/lustre/usr/gcc/4.9/bin/gcc
gcc (GCC) 4.9.3
Copyright (C) 2015 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.

$ which javac; javac -version
/lustre/usr/jdk/1.8/bin/javac
javac 1.8.0_60

Build:

$ pkill java; rm -rf ~/.cache/bazel ; ./compile.sh
...
.Extracting Bazel installation...
..........
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 Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles:
/lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles)
ERROR: /tmp/bazel/src/tools/android/java/com/google/devtools/build/android/idlclass/BUILD:10:1: Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles failed: build-runfiles failed: error executing command /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles ... (remaining 2 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: 11.112s, Critical Path: 4.48s

Building output/bazel

Complaints about GLIBCXX_3.4.14 arises. build-runfiles seems to use the
default and outdated C++ lib in /usr/lib64/libstdc++.so.6. However, ldd
indicates that the proper lib _is_ available out there.

$ echo $LD_LIBRARY_PATH
/lustre/usr/gcc/4.9/lib64

$ strings /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 | grep '3.4.14'
GLIBCXX_3.4.14

$ ldd /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles
linux-vdso.so.1 => (0x00007ffff4dff000)
libstdc++.so.6 => /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 (0x00002b9213921000)
libz.so.1 => /lib64/libz.so.1 (0x000000396de00000)
librt.so.1 => /lib64/librt.so.1 (0x000000396e200000)
libm.so.6 => /lib64/libm.so.6 (0x000000396d600000)
libgcc_s.so.1 => /lustre/usr/gcc/4.9/lib64/libgcc_s.so.1 (0x00002b9213c56000)
libc.so.6 => /lib64/libc.so.6 (0x000000396ce00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000396da00000)
/lib64/ld-linux-x86-64.so.2 (0x000000396ca00000)

Things that may help

I guess there is something wrong when bazel invokes the build-runfiles
command. It'll help if bazel prints every action it takes.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-173916694.

For printing all action, use -s. With the compile script, do
EXTRA_BAZEL_ARGS='-s'

On Fri, Jan 22, 2016 at 2:13 PM Damien Martin-guillerez [email protected]
wrote:

Could you try at HEAD? I removed most C++ compilation from the first steps
to build-runfiles should not be build.

On Fri, Jan 22, 2016 at 2:11 PM 健美猫 [email protected] wrote:

@ulfjack https://github.com/ulfjack @damienmg
https://github.com/damienmg thank you for your replies. It is
mentioned that

The env variables are ignored by Bazel...

I think that's the reason that bazel ignores GLIBCXX placed in
directories among $LD_LIBRARY_PATH.

I worked on Cent OS 6.x. This issue happens when I built bazel 0.1.4 from
source with gcc/g++ and libstdc++.so in non-standard directories.
Customization made to CROSSTOOL

I specify gcc and necessary header files.

  • tool_path { name: "gcc" path: "/usr/bin/gcc" }
  • tool_path { name: "gcc" path: "/lustre/usr/gcc/4.9/bin/gcc" }
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include"
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed"
  • cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/include/c++/4.9.3"

Error messages

GCC and JDK I use:

$ which gcc; gcc --version
/lustre/usr/gcc/4.9/bin/gcc
gcc (GCC) 4.9.3
Copyright (C) 2015 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.

$ which javac; javac -version
/lustre/usr/jdk/1.8/bin/javac
javac 1.8.0_60

Build:

$ pkill java; rm -rf ~/.cache/bazel ; ./compile.sh
...
.Extracting Bazel installation...
..........
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 Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles:
/lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles)
ERROR: /tmp/bazel/src/tools/android/java/com/google/devtools/build/android/idlclass/BUILD:10:1: Creating runfiles tree bazel-out/local_linux-fastbuild/bin/src/tools/android/java/com/google/devtools/build/android/idlclass/classes.runfiles failed: build-runfiles failed: error executing command /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles ... (remaining 2 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: 11.112s, Critical Path: 4.48s

Building output/bazel

Complaints about GLIBCXX_3.4.14 arises. build-runfiles seems to use the
default and outdated C++ lib in /usr/lib64/libstdc++.so.6. However, ldd
indicates that the proper lib _is_ available out there.

$ echo $LD_LIBRARY_PATH
/lustre/usr/gcc/4.9/lib64

$ strings /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 | grep '3.4.14'
GLIBCXX_3.4.14

$ ldd /lustre/home/rpm/.cache/bazel/_bazel_rpm/18dbd9f3d77ee103aaae087f6df97588/bazel/_bin/build-runfiles
linux-vdso.so.1 => (0x00007ffff4dff000)
libstdc++.so.6 => /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 (0x00002b9213921000)
libz.so.1 => /lib64/libz.so.1 (0x000000396de00000)
librt.so.1 => /lib64/librt.so.1 (0x000000396e200000)
libm.so.6 => /lib64/libm.so.6 (0x000000396d600000)
libgcc_s.so.1 => /lustre/usr/gcc/4.9/lib64/libgcc_s.so.1 (0x00002b9213c56000)
libc.so.6 => /lib64/libc.so.6 (0x000000396ce00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000396da00000)
/lib64/ld-linux-x86-64.so.2 (0x000000396ca00000)

Things that may help

I guess there is something wrong when bazel invokes the build-runfiles
command. It'll help if bazel prints every action it takes.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-173916694.

I tried the head version(0bf232e). It failed with different messages which are less meaningful compared to version 0.1.4. According to the output given by EXTRA_BAZEL_ARGS='-s', the action taken before the errors arise is //src/main/tools:process-wrapper.

pkill java; rm -rf ~/.cache/bazel ;  ./compile.sh
...
[136 / 461] Writing file src/main/java/com/google/devtools/build/lib/libbazel.jar-2.pa
ERROR: /tmp/bazel/src/main/protobuf/BUILD:22:2: error executing shell command: 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libinvocation_polic...' failed: bash failed: error executing command 
  (cd /tmp/bazel.d8kSsRIw/out/bazel && \
  exec env - \
    PATH=/lustre/usr/jdk/1.8/bin:/lustre/usr/gcc/4.9/bin:/lustre/usr/emacs/24.5/bin:/lustre/home/rpm/.local/bin:/lustre/home/rpm/bin:/usr/local/bin:/usr/local/sbin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/lustre/home/rpm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin \
  /bin/bash -c 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild/
bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output && externa
l/bazel_tools/third_party/protobuf/protoc-linux-x86_64.exe --java_out=bazel-out/local_
linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_o
utput src/main/protobuf/invocation_policy.proto && touch -t 198001010000 $(find bazel-
out/local_linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcj
ar.proto_output) && external/local-jdk/bin/jar cMf bazel-out/local_linux-fastbuild/bin
/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar -C bazel-out/local_linux-f
astbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output .
'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with st
atus 1: bash failed: error executing command 
  (cd /tmp/bazel.d8kSsRIw/out/bazel && \
  exec env - \
    PATH=/lustre/usr/jdk/1.8/bin:/lustre/usr/gcc/4.9/bin:/lustre/usr/emacs/24.5/bin:/l
ustre/home/rpm/.local/bin:/lustre/home/rpm/bin:/usr/local/bin:/usr/local/sbin:/usr/lib
64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/lustr
e/home/rpm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin \
  /bin/bash -c 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libinvoca
tion_policy_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild/
bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output && externa
l/bazel_tools/third_party/protobuf/protoc-linux-x86_64.exe --java_out=bazel-out/local_
linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_o
utput src/main/protobuf/invocation_policy.proto && touch -t 198001010000 $(find bazel-
out/local_linux-fastbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcj
ar.proto_output) && external/local-jdk/bin/jar cMf bazel-out/local_linux-fastbuild/bin
/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar -C bazel-out/local_linux-f
astbuild/bin/src/main/protobuf/libinvocation_policy_proto_srcjar.srcjar.proto_output .
'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with st
atus 1.
Target //src:bazel failed to build
INFO: Elapsed time: 4.559s, Critical Path: 2.36s
$ pkill java; rm -rf ~/.cache/bazel ; export EXTRA_BAZEL_ARGS='-s';  ./compile.sh
...
>>>>> # //src/main/tools:process-wrapper [action 'Linking src/main/tools/process-wrapp
er']
(cd /tmp/bazel.XgjN5zHj/out/bazel && \
  exec env - \
  /lustre/usr/gcc/4.9/bin/gcc -o bazel-out/local_linux-fastbuild/bin/src/main/tools/pr
ocess-wrapper -B/usr/bin/ -Wl,-z,relro,-z,now -no-canonical-prefixes -pass-exit-codes 
'-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-S -Wl,@bazel-out/local_linux-fastbuil
d/bin/src/main/tools/process-wrapper-2.params)
ERROR: /tmp/bazel/src/main/protobuf/BUILD:22:2: error executing shell command: 'rm -rf
 bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libjava_compilation_proto_srcja
r.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild/bin/src/main/protobuf/l
ibjava_compilation_...' failed: bash failed: error executing command
...

can you set EXTRA_BAZEL_ARGS='--verbose_failures' and show a bit more of the output log?

Sure thing. Here it comes. I am planning give it a try, running the long coamnnd exec env... manually.

$ pkill java; rm -rf ~/.cache/bazel ; export EXTRA_BAZEL_ARGS='--verbose_failures';  ./compile.sh
INFO: Found 1 target...
[8 / 76] Writing file src/main/java/com/google/devtools/build/lib/libpython-rules.jar-
[15 / 141] Writing file src/main/java/com/google/devtools/build/lib/libbuild-info.jar-
[61 / 387] Writing file src/main/java/com/google/devtools/build/lib/rules/cpp/libcpp.j
[73 / 392] Writing file src/main/java/com/google/devtools/common/options/liboptions.ja
[77 / 404] Writing file src/main/java/com/google/devtools/build/lib/libpreconditions.j
ERROR: /tmp/bazel/src/main/protobuf/BUILD:22:2: error executing shell command: 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_b...' failed: bash failed: error executing command 
  (cd /tmp/bazel.NSi9zaov/out/bazel && \
  exec env - \
    PATH=/lustre/usr/jdk/1.8/bin:/lustre/usr/gcc/4.9/bin:/lustre/usr/emacs/24.5/bin:/lustre/home/rpm/.local/bin:/lustre/home/rpm/bin:/usr/local/bin:/usr/local/sbin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/lustre/home/rpm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin \
  /bin/bash -c 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild
/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_output && exter
nal/bazel_tools/third_party/protobuf/protoc-linux-x86_64.exe --java_out=bazel-out/loca
l_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.prot
o_output src/main/protobuf/extra_actions_base.proto && touch -t 198001010000 $(find ba
zel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar
.srcjar.proto_output) && external/local-jdk/bin/jar cMf bazel-out/local_linux-fastbuil
d/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar -C bazel-out/local_l
inux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_o
utput .'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited 
with status 1: bash failed: error executing command 
  (cd /tmp/bazel.NSi9zaov/out/bazel && \
  exec env - \
    PATH=/lustre/usr/jdk/1.8/bin:/lustre/usr/gcc/4.9/bin:/lustre/usr/emacs/24.5/bin:/l
ustre/home/rpm/.local/bin:/lustre/home/rpm/bin:/usr/local/bin:/usr/local/sbin:/usr/lib
64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/lustr
e/home/rpm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin \
  /bin/bash -c 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_
actions_base_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild
/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_output && exter
nal/bazel_tools/third_party/protobuf/protoc-linux-x86_64.exe --java_out=bazel-out/loca
l_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.prot
o_output src/main/protobuf/extra_actions_base.proto && touch -t 198001010000 $(find ba
zel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar
.srcjar.proto_output) && external/local-jdk/bin/jar cMf bazel-out/local_linux-fastbuil
d/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar -C bazel-out/local_l
inux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_o
utput .'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited 
with status 1.
Target //src:bazel failed to build

I still cannot spot the error, can you execute the last command outside of bazel:

(cd /tmp/bazel.NSi9zaov/out/bazel && \
  exec env - \
    PATH=/lustre/usr/jdk/1.8/bin:/lustre/usr/gcc/4.9/bin:/lustre/usr/emacs/24.5/bin:/l
ustre/home/rpm/.local/bin:/lustre/home/rpm/bin:/usr/local/bin:/usr/local/sbin:/usr/lib
64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/lustr
e/home/rpm/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin \
  /bin/bash -c 'rm -rf bazel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_
actions_base_proto_srcjar.srcjar.proto_output && mkdir bazel-out/local_linux-fastbuild
/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_output && exter
nal/bazel_tools/third_party/protobuf/protoc-linux-x86_64.exe --java_out=bazel-out/loca
l_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.prot
o_output src/main/protobuf/extra_actions_base.proto && touch -t 198001010000 $(find ba
zel-out/local_linux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar
.srcjar.proto_output) && external/local-jdk/bin/jar cMf bazel-out/local_linux-fastbuil
d/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar -C bazel-out/local_l
inux-fastbuild/bin/src/main/protobuf/libextra_actions_base_proto_srcjar.srcjar.proto_o
utput .')

If it passes, can you try setting --spawn_strategy=standalone --genrule_strategy=standalone to the extra args?

Hmm, I am trying to run the long coammand without basel, finding that some intermedia directories are missing.

  • basel-* (basel-output, basel-bin, ...) are symblic links pointing to temp directories outside basel. These temp directories are generatd during compiling then deleted automatically after exit.
  • There is no external/ directory.

So, the long command seems to exit all the time as it tries to operate on invalid directories.

oh yes, can you try to comment out that line:
https://github.com/bazelbuild/bazel/blob/master/scripts/bootstrap/buildenv.sh#L49

Then rerun the compile.sh script with verbose_failures and again try to run the failing command outside of bazel?

It seems that we are making some progress. I got a very clear error message this time. It is ijar. I run the command successfully outside basel. ijar depends on libstdc++.so.6 which is specified in $LD_LIBRARY_PATH. I guess this environment variable should be send to the process who lauches ijar.

pkill java; rm -rf ~/.cache/bazel ; export EXTRA_BAZEL_ARGS='--verbose_failures';  ./compile.sh compile
ERROR: /home/rpmbuild/tmp/bazel/third_party/BUILD:43:1: Extracting interface //third_party:aether failed: ijar failed: error executing command 
  (cd /tmp/bazel.NqqeEfeO/out/bazel && \
  exec env - \
  bazel-out/host/bin/third_party/ijar/ijar third_party/aether/aether-transport-classpath-1.0.0.v20140518.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/aether/third_party/aether/aether-transport-classpath-1.0.0.v20140518-ijar.jar): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: ijar failed: error executing command 
  (cd /tmp/bazel.NqqeEfeO/out/bazel && \
  exec env - \
  bazel-out/host/bin/third_party/ijar/ijar third_party/aether/aether-transport-classpath-1.0.0.v20140518.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/aether/third_party/aether/aether-transport-classpath-1.0.0.v20140518-ijar.jar): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
$ echo $LD_LIBRARY_PATH
/lustre/usr/gcc/4.9/lib64

$ strings /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 | grep '3.4.14'
GLIBCXX_3.4.14

$ ldd bazel-out/host/bin/third_party/ijar/ijar
        linux-vdso.so.1 =>  (0x00007fffa1b1c000)
        libz.so.1 => /lib64/libz.so.1 (0x000000396de00000)
        libstdc++.so.6 => /lustre/usr/gcc/4.9/lib64/libstdc++.so.6 (0x00002b1050fda000)
        libgcc_s.so.1 => /lustre/usr/gcc/4.9/lib64/libgcc_s.so.1 (0x00002b10512ec000)
        libc.so.6 => /lib64/libc.so.6 (0x000000396ce00000)
        libm.so.6 => /lib64/libm.so.6 (0x000000396d600000)
        /lib64/ld-linux-x86-64.so.2 (0x000000396ca00000)

$ bazel-out/host/bin/third_party/ijar/ijar third_party/maven_model/maven-aether-provider-3.2.3.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/maven_model/third_party/maven_model/maven-aether-provider-3.2.3-ijar.jar
(no output messages)

Try:

export BAZEL_ARGS='--genrule_strategy=standalone --spawn_strategy=standalone'
./compile.sh

export BAZEL_ARGS='--genrule_strategy=standalone --spawn_strategy=standalone' doesn't help. The same issue happens.

$ pkill java; rm -rf ~/.cache/bazel ; export EXTRA_BAZEL_ARGS='--genrule_strategy=standalone --spawn_strategy=standalone';  ./compile.sh compile
ERROR: /home/rpmbuild/tmp/bazel/third_party/BUILD:306:1: Extracting interface //third_party:jsr305 failed: ijar failed: error executing command 
  (cd /tmp/bazel.lHXN1xNd/out/bazel && \
  exec env - \
  bazel-out/host/bin/third_party/ijar/ijar third_party/jsr305/jsr-305.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/jsr305/third_party/jsr305/jsr-305-ijar.jar): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: ijar failed: error executing command 
  (cd /tmp/bazel.lHXN1xNd/out/bazel && \
  exec env - \
  bazel-out/host/bin/third_party/ijar/ijar third_party/jsr305/jsr-305.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/jsr305/third_party/jsr305/jsr-305-ijar.jar): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
INFO: Elapsed time: 5.218s, Critical Path: 3.03s

The solution is probably there:
create a wrapper script around gcc and put it there: tools/cpp/gcc.sh, the script would look like:

#!/bin/bash -eu

LD_LIBRARY_PATH=/lustre/usr/gcc/4.9/lib64
/usr/local/gcc/4.8.4/bin/gcc "$@"

Set its mode to +x then replace gcc here https://github.com/bazelbuild/bazel/blob/master/tools/cpp/CROSSTOOL#L86 and in other place in the CROSSTOOL file too by "gcc.sh".

@damienmg thank you. I'll try your approach and let you know as soon as possible. Before that, I verified that $LD_LIBRARY_PATH may be a direction to fix this.

This script ok.sh works.

#!/bin/sh

cd /tmp/bazel.lHXN1xNd/out/bazel  && \
bazel-out/host/bin/third_party/ijar/ijar third_party/jsr305/jsr-305.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/jsr305/third_party/jsr305/jsr-305-ijar.jar

This scirpt ok-too.sh works too.

#!/bin/sh

cd /tmp/bazel.lHXN1xNd/out/bazel  && \
exec env -i LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
bazel-out/host/bin/third_party/ijar/ijar third_party/jsr305/jsr-305.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/jsr305/third_party/jsr305/jsr-305-ijar.jar

This scirpt bad.sh does NOT work, which hides environment variable $LD_LIBRARY_PATH for the subprocess, leading to the typical GLIBCXX compalin.

#!/bin/sh

cd /tmp/bazel.lHXN1xNd/out/bazel  && \
exec env - \
bazel-out/host/bin/third_party/ijar/ijar third_party/jsr305/jsr-305.jar bazel-out/local_linux-fastbuild/genfiles/third_party/_ijar/jsr305/third_party/jsr305/jsr-305-ijar.jar
bazel-out/host/bin/third_party/ijar/ijar: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by bazel-out/host/bin/third_party/ijar/ijar)

Oh, you might want to force set the environment in the process-wrapper then...

gcc.sh wrapper doesn't work. The same issue persists. So the a feasible solution for RHEL 6.x user would be:

  1. Customize gcc in ools/cpp/CROSSTOOL, pointing it your prefered compiler.
  2. Comment out the line atexit "rm -fr ${DIR}" in bazel/scripts/bootstrap/buildenv.sh.
  3. Add "exec env -i LD_LIBRARY_PATH=$LD_LIBRARY_PATH " for the subprocess.

I don't think /src/main/tools/process-wrapper.c is the right place for 3. Please correct me if I am wrong.

Or simply add -Wl,-R/path/to/dynamiclib/ to the tools/cpp/CROSSTOOL file for linker option.

🎉🎉🎉🎉-Wl,-R works great! Linker rocks! I really appreciate @damienmg 's help on this issue.

In summary, to build bazel with a customized gcc and gcxxlib other than the standard paths, I customized tools/cpp/CROSSTOOL

-  tool_path { name: "gcc" path: "/usr/bin/gcc" }
+  tool_path { name: "gcc" path: "/lustre/usr/gcc/4.9/bin/gcc" }

+  linker_flag: "-Wl,-R/lustre/usr/gcc/4.9/lib64"

+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include"
+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed"
+  cxx_builtin_include_directory: "/lustre/usr/gcc/4.9/include/c++/4.9.3"

Then comment out the atexit line in scripts/bootstrap/buildenv.sh:

-  atexit "rm -fr ${DIR}"

Finally build bazel:

$ for d in `ls | grep 'bazel-'`; do unlink $d; done; pkill java; rm -rf ~/.cache/bazel; export EXTRA_BAZEL_ARGS='--ignore_unsupported_sandboxing -s';  ./compile.sh
...
INFO: Elapsed time: 40.780s, Critical Path: 36.66s

Build successful! Binary is here: /home/rpmbuild/tmp/bazel/output/bazel

@weijianwen Are you able to compile tensorflow? I am also able to build bazel. But when using bazel to compile tensorflow, I got the following error. It seems the bazel binary is invoking the older GCC to compile tensorflow.

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...
ERROR: /nfs/02/h212/.cache/bazel/_bazel_h212/7a2b15405f00fa358f0e0720e30182fe/external/gemmlowp/BUILD:77:1: C++ compilation of rule '@gemmlowp//:eight_bit_int_gemm' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 31 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
gcc: unrecognized option '-no-canonical-prefixes'
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-fno-canonical-system-headers"
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.992s, Critical Path: 1.13s

I also inspected the bazel binary.

-bash-4.1$ ldd bazel_head_latest/output/bazel
    linux-vdso.so.1 =>  (0x00007fffd6386000)
    librt.so.1 => /lib64/librt.so.1 (0x00000032c2e00000)
    libz.so.1 => /lib64/libz.so.1 (0x00000032c2a00000)
    libstdc++.so.6 => /usr/local/gcc/4.8.4/lib64/libstdc++.so.6 (0x00002b82e38cb000)
    libgcc_s.so.1 => /usr/local/gcc/4.8.4/lib64/libgcc_s.so.1 (0x00002b82e3bd4000)
    libc.so.6 => /lib64/libc.so.6 (0x00000032c1a00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00000032c2200000)
    /lib64/ld-linux-x86-64.so.2 (0x00000032c1600000)
    libm.so.6 => /lib64/libm.so.6 (0x00000032c2600000)

@damienmg Do you know why this is happening? When I try to compile tensorflow, the bazel binary does not use the newer gcc, even though the bazel binary was compiled with the newer gcc

What's your version of gcc?

@damienmg gcc 4.8.4

can you use bazel with --verbose_failures and past the output?

@damienmg after I add --verbose_failures, I got the following output. The compiled bazel binary does not call gcc 4.8.4. Instead, it uses the old gcc installed at default path.

Sending SIGTERM to previous Bazel server (pid=18489)... done.                                                                                                                                                     ............
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...
Slow read: a 67361790-byte read from /nfs/gpfs/PAS0774/chen/exp/software/tensorflow_head/third_party/gpus/cuda/include/sobol_direction_vectors.h took 7219ms.
ERROR: /tmp/external/re2/BUILD:9:1: C++ compilation of rule '@re2//:re2' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /tmp/tensorflow_head && \
  exec env - \
    PATH=/usr/local/gcc/4.8.4/bin/:/home/pc/torch/install/bin:/home/pc/software/gnuplot/gnuplot_install/bin:/home/pc/anaconda/bin:/usr/local/cuda/5.5.22/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_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 -fdata-sections -g0 '-std=c++11' -iquote external/re2 -iquote bazel-out/host/genfiles/external/re2 -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/re2 -isystem bazel-out/host/genfiles/external/re2 -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.o' -MD -MF bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.d -c external/re2/util/hash.cc -o bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /tmp/tensorflow_head && \
  exec env - \
    PATH=/usr/local/gcc/4.8.4/bin/:/home/pc/torch/install/bin:/home/pc/software/gnuplot/gnuplot_install/bin:/home/pc/anaconda/bin:/usr/local/cuda/5.5.22/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_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 -fdata-sections -g0 '-std=c++11' -iquote external/re2 -iquote bazel-out/host/genfiles/external/re2 -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/re2 -isystem bazel-out/host/genfiles/external/re2 -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.o' -MD -MF bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.d -c external/re2/util/hash.cc -o bazel-out/host/bin/external/re2/_objs/re2/external/re2/util/hash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
gcc: unrecognized option '-no-canonical-prefixes'
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-fno-canonical-system-headers"
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
Target //tensorflow/cc:tutorials_example_trainer failed to build
INFO: Elapsed time: 29.871s, Critical Path: 22.48s

third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc is the wrapper called around gcc by Tensorflow when using cuda.

https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc#L47

Is setting gcc to /usr/bin/gcc

@damienmg I am able to build tensorflow now. Thanks.

Hi there, we have an experimental feature to do C++ auto-configuration:
https://groups.google.com/d/msg/bazel-discuss/MSunz2ZUOq0/U5tE7uQLJQAJ

Can you try and tell me if it worked for you?

Also will talk to TensorFlow about getting rid of ./configure

I get an error, but am entirely new to bazel, so please let me know if there's an obvious fix here:

🍃  Building Bazel from scratch......
🍃  Building Bazel with Bazel.
.ERROR: /tmp/bazel.MkGMLjg2/out/external/bazel_tools/tools/cpp/cc_configure.bzl:228:80: Implicit string concatenation is forbidden, use the + operator.
ERROR: /tmp/bazel.MkGMLjg2/out/external/bazel_tools/tools/cpp/cc_configure.bzl:229:11: syntax error at '" variable"': expected ,
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension 'tools/cpp/cc_configure.bzl' has errors.

Sorry I am fixing it. I will tell you as soon as this is fixed.

On Fri, Mar 4, 2016 at 4:04 AM Robert DiPietro [email protected]
wrote:

I get an error, but am entirely new to bazel, so please let me know if
there's an obvious fix here:

🍃 Building Bazel from scratch......
🍃 Building Bazel with Bazel.
.ERROR: /tmp/bazel.MkGMLjg2/out/external/bazel_tools/tools/cpp/cc_configure.bzl:228:80: Implicit string concatenation is forbidden, use the + operator.
ERROR: /tmp/bazel.MkGMLjg2/out/external/bazel_tools/tools/cpp/cc_configure.bzl:229:11: syntax error at '" variable"': expected ,
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension 'tools/cpp/cc_configure.bzl' has errors.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192255376.

@damienmg thanks. I'll test soon after you fix. If this works then it shouldn't be too hard to get TensorFlow to compile out of the box with a non-standard gcc setup and with older versions of libc. I'm including a list here of things they'll need to resolve for this to work. (All of this is working for me, and with GPU support. I'll open these as TensorFlow issues after this fix works.)

Setup for which I can test: CentOS 6.7, gcc 4.8.2

  1. Suggest use of bazel at HEAD so that your fix is included.
  2. Fix tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc

    • The gcc paths are hard-coded here too. They need to be replaced.

    • There is a hack in this file to modify a path so that gcc can find as, with a TODO saying they need to figure out what's going on. At least with CentOS 6.7, gcc 4.8.2, I had to comment out this hack for gcc to actually end up finding as.

  3. Include whatever is the equivalent of --linkopt '-lrt' --copt="-DGPR_BACKWARDS_COMPATIBILITY_MODE" --conlyopt="-std=c99" in tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc. Otherwise, after building with older libc, we'll get an error about secure_getenv.

The fix is out :)

On Fri, Mar 4, 2016, 5:32 AM Robert DiPietro [email protected]
wrote:

@damienmg https://github.com/damienmg thanks. I'll test soon after you
fix. If this works then it shouldn't be too hard to get TensorFlow to
compile out of the box with a non-standard gcc setup and with older
versions of libc. I'm including a list here of things they'll need to
resolve for this to work. (All of this is working for me, and with GPU
support. I'll open these as TensorFlow issues after this fix works.)

Setup for which I can test: CentOS 6.7, gcc 4.8.2

  1. Suggest use of bazel at HEAD so that your fix is included.
  2. Fix
    tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc

    • The gcc paths are hard-coded here too. They need to be replaced.

    • There is a hack in this file to modify a path so that gcc can

      find as, with a TODO saying they need to figure out what's going

      on. At least with CentOS 6.7, gcc 4.8.2, I had to comment out this hack for

      gcc to actually end up finding as.

  3. Include whatever is the equivalent of --linkopt '-lrt'
    --copt="-DGPR_BACKWARDS_COMPATIBILITY_MODE" --conlyopt="-std=c99" in
    tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.
    Otherwise, after building with older libc, we'll get an error about
    secure_getenv.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192285554.

Thanks.

No luck yet...

ERROR: /tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl:268:3: no such package '@local_config_cc//': Traceback (most recent call last):
    File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 245
        _crosstool_content(ctx, cc, cpu_value, darwin)
    File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 147, in _crosstool_content
        _ld_library_paths(ctx)
    File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 78, in _ld_library_paths
        result.append("-Wl,rpath," + p)
    File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 78, in result.append
        "-Wl,rpath," + p
unsupported operand type(s) for +: 'string' and 'path' and referenced by '//external:cc_toolchain'.
ERROR: Loading failed; build aborted.

Can you try putting str(p) instead of p at Line 78?

On Fri, Mar 4, 2016, 9:13 AM Robert DiPietro [email protected]
wrote:

Thanks.

No luck yet...

ERROR: /tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl:268:3: no such package '@local_config_cc//': Traceback (most recent call last):
File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 245
_crosstool_content(ctx, cc, cpu_value, darwin)
File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 147, in _crosstool_content
_ld_library_paths(ctx)
File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 78, in _ld_library_paths
result.append("-Wl,rpath," + p)
File "/tmp/bazel.Sj3nvtmD/out/external/bazel_tools/tools/cpp/cc_configure.bzl", line 78, in result.append
"-Wl,rpath," + p
unsupported operand type(s) for +: 'string' and 'path' and referenced by '//external:cc_toolchain'.
ERROR: Loading failed; build aborted.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192362639.

Made that mod on lines 78 and 79, now getting

ERROR: /home-4/[email protected]/install/testing/bazel/src/main/tools/BUILD:18:1: Linking of rule '//src/main/tools:process-wrapper' failed: gcc failed: error executing command 
  (cd /tmp/bazel.FJ9c8m5F/out/bazel && \
  exec env - \
  /cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/process-wrapper -no-canonical-prefixes -B/usr/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/lib -L/cm/shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/binutils/2.25/src/lib -L/cm/shared/apps/binutils/2.25/src/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/process-wrapper-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build

Can I spawn a similar environment than yours on docker?

On Fri, Mar 4, 2016 at 9:27 AM Robert DiPietro [email protected]
wrote:

Made that mod on lines 78 and 79, now getting

ERROR: /home-4/[email protected]/install/testing/bazel/src/main/tools/BUILD:18:1: Linking of rule '//src/main/tools:process-wrapper' failed: gcc failed: error executing command
(cd /tmp/bazel.FJ9c8m5F/out/bazel && \
exec env - \
/cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/process-wrapper -no-canonical-prefixes -B/usr/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/l
ib -L/cm/shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/binutils/2.25/src/lib -L/cm/shared/apps/binutils/2.25/src/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/process-wrapper-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192369324.

I haven't used docker much at all so am not sure if it's possible. I will say though that I don't have admin rights and docker isn't installed. If I can still help let me know.

It's just a CentOS with gcc and glibc installed in non standard location? (or is it on standard location?)

I'm pretty sure glibc is in the standard location. gcc isn't. I can confirm
about glibc tomorrow. I'm in Germany right now which makes this Fri night :)
On Mar 4, 2016 8:08 PM, "Damien Martin-Guillerez" [email protected]
wrote:

It's just a CentOS with gcc and glibc installed in non standard location?
(or is it on standard location?)


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192417642.

Hehe, no problem, I am usually in Germany too (just in MTV this week and
NYC next week).

On Fri, Mar 4, 2016 at 11:16 AM Robert DiPietro [email protected]
wrote:

I'm pretty sure glibc is in the standard location. gcc isn't. I can confirm
about glibc tomorrow. I'm in Germany right now which makes this Fri night
:)
On Mar 4, 2016 8:08 PM, "Damien Martin-Guillerez" <
[email protected]>
wrote:

It's just a CentOS with gcc and glibc installed in non standard location?
(or is it on standard location?)


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192417642.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192422648.

Yes, glibc is in its standard location.

On Fri, Mar 4, 2016 at 8:38 PM, Damien Martin-Guillerez <
[email protected]> wrote:

Hehe, no problem, I am usually in Germany too (just in MTV this week and
NYC next week).

On Fri, Mar 4, 2016 at 11:16 AM Robert DiPietro [email protected]
wrote:

I'm pretty sure glibc is in the standard location. gcc isn't. I can
confirm
about glibc tomorrow. I'm in Germany right now which makes this Fri night
:)
On Mar 4, 2016 8:08 PM, "Damien Martin-Guillerez" <
[email protected]>
wrote:

It's just a CentOS with gcc and glibc installed in non standard
location?
(or is it on standard location?)


Reply to this email directly or view it on GitHub
<https://github.com/bazelbuild/bazel/issues/760#issuecomment-192417642
.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192422648.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192431930.

Ok should be easy to setup a docker image with the same setup. Will try
tomorrow or on monday.

On Sat, Mar 5, 2016 at 6:50 AM Robert DiPietro [email protected]
wrote:

Yes, glibc is in its standard location.

On Fri, Mar 4, 2016 at 8:38 PM, Damien Martin-Guillerez <
[email protected]> wrote:

Hehe, no problem, I am usually in Germany too (just in MTV this week and
NYC next week).

On Fri, Mar 4, 2016 at 11:16 AM Robert DiPietro <
[email protected]>
wrote:

I'm pretty sure glibc is in the standard location. gcc isn't. I can
confirm
about glibc tomorrow. I'm in Germany right now which makes this Fri
night
:)
On Mar 4, 2016 8:08 PM, "Damien Martin-Guillerez" <
[email protected]>
wrote:

It's just a CentOS with gcc and glibc installed in non standard
location?
(or is it on standard location?)


Reply to this email directly or view it on GitHub
<
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192417642
.


Reply to this email directly or view it on GitHub
<https://github.com/bazelbuild/bazel/issues/760#issuecomment-192422648
.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192431930.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-192663018.

Ok I have been able to reproduce it with a docker image, thanks!

Ok great. Thanks. Please update if you end up fixing it.

On Mon, Mar 7, 2016 at 3:29 PM, Damien Martin-Guillerez <
[email protected]> wrote:

Ok I have been able to reproduce it with a docker image, thanks!


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-193271268.

Ok I have progressed up to the limit: I get C++ errors now, c++ cannot compile.

Hmm. Here are notes I made for myself, after which bazel compiles for me.

git clone https://github.com/bazelbuild/bazel.git
cd bazel
git checkout tags/0.1.5

Example gcc dir: /cm/shared/apps/gcc/4.8.2

This results in
gcc path: /cm/shared/apps/gcc/4.8.2/bin/gcc
cpp path: /cm/shared/apps/gcc/4.8.2/bin/cpp
lib64 path: /cm/shared/apps/gcc/4.8.2/lib64
include1 dir: /cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include
include2 dir: /cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include-fixed
include3 dir: /cm/shared/apps/gcc/4.8.2/include/c++/4.8.2

Now edit tools/cpp/CROSSTOOL. You should only have
to modify the toolchain containing
toolchain_identifier: "local_linux".

Replace all occurrences of /usr/bin/gcc with <gcc path>

Replace all occurrences of /usr/bin/cpp with <cpp path>

After the toolpath containing <gcc path>, add the lines
linker_flag: "-Wl,-R<lib64 path>"
cxx_builtin_include_directory: "<include1 dir>"
cxx_builtin_include_directory: "<include2 dir>"
cxx_builtin_include_directory: "<include3 dir>"

Now edit scripts/bootstrap/buildenv.sh

Remove the line atexit "rm -fr ${DIR}"

export EXTRA_BAZEL_ARGS='-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 4'
./compile.sh

Oops my bad I was running the default gcc. I need to find an easy way to install gcc 4.8.3

found install instruction for 4.8.1: http://people.centos.org/tru/devtools-2/readme

Ok should work now :)

Ahhh!

ERROR: /home-4/[email protected]/install/testing/bazel/third_party/ijar/BUILD:10:1: C++ compilation of rule '//third_party/ijar:zip' failed: gcc failed: error executing command 
  (cd /tmp/bazel.WQGuDzN0/out/bazel && \
  exec env - \
    PATH=/home-4/[email protected]/install/bazel/output:/home-4/[email protected]/.usr/bin:/home-4/[email protected]/vc/scripts:/home-4/[email protected]/.local/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/[email protected]/bin \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/third_party/ijar/_objs/zip/third_party/ijar/mapped_file_unix.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/third_party/ijar/_objs/zip/third_party/ijar/mapped_file_unix.pic.d -fPIC -c third_party/ijar/mapped_file_unix.cc -o bazel-out/local_linux-fastbuild/bin/third_party/ijar/_objs/zip/third_party/ijar/mapped_file_unix.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
INFO: Elapsed time: 2.955s, Critical Path: 0.37s

Erf. I have an idea: zlib-devel is not installed?

Can you try to comment https://github.com/bazelbuild/bazel/blob/master/scripts/bootstrap/buildenv.sh#L96 and re-run ./compile.sh and copy-paste the command in parenthesis to see the c++ error?

Sure. Here's the output:

  Building Bazel with Bazel.
INFO: Found 1 target...
>>>>> # //src:java-version [action 'Executing genrule //src:java-version']
(cd /tmp/bazel.qFJG6sQf/out/bazel && \
  exec env - \
    PATH=/home-4/[email protected]/install/bazel/output:/home-4/[email protected]/.usr/bin:/home-4/[email protected]/vc/scripts:/home-4/[email protected]/.local/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/[email protected]/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; 
          VERSION_LINE=$(cat bazel-out/local_linux-fastbuild/bin/src/java_toolchain_content | grep target_version);
          JAVA_VERSION=$(echo ${VERSION_LINE} | sed '\''s/.*value=\"\([^\"]\)\".*/\1/'\'');
          if [ -z "${JAVA_VERSION}" ]; then
            echo "1.8" >bazel-out/local_linux-fastbuild/genfiles/src/java.version  # Java 8 is the default
          elif [[ "${JAVA_VERSION}" =~ ^[0-9]+$ ]]; then
            echo "1.${JAVA_VERSION}" >bazel-out/local_linux-fastbuild/genfiles/src/java.version  # Add 1. before 7 or 8
          else
            echo "${JAVA_VERSION}" >bazel-out/local_linux-fastbuild/genfiles/src/java.version
          fi
          ')
>>>>> # //src/main/tools:process-tools [action 'Compiling src/main/tools/process-tools.c']
(cd /tmp/bazel.qFJG6sQf/out/bazel && \
  exec env - \
    PATH=/home-4/[email protected]/install/bazel/output:/home-4/[email protected]/.usr/bin:/home-4/[email protected]/vc/scripts:/home-4/[email protected]/.local/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/[email protected]/bin \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 '-std=c99' -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.d -fPIC -c src/main/tools/process-tools.c -o bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o)
ERROR: /home-4/[email protected]/install/testing/bazel/src/main/tools/BUILD:11:1: C++ compilation of rule '//src/main/tools:process-tools' failed: gcc failed: error executing command 
  (cd /tmp/bazel.qFJG6sQf/out/bazel && \
  exec env - \
    PATH=/home-4/[email protected]/install/bazel/output:/home-4/[email protected]/.usr/bin:/home-4/[email protected]/vc/scripts:/home-4/[email protected]/.local/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/[email protected]/bin \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 '-std=c99' -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.d -fPIC -c src/main/tools/process-tools.c -o bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
INFO: Elapsed time: 10.361s, Critical Path: 0.21s

And running

 (cd /tmp/bazel.qFJG6sQf/out/bazel && \
  exec env - \
    PATH=/home-4/[email protected]/install/bazel/output:/home-4/[email protected]/.usr/bin:/home-4/[email protected]/vc/scripts:/home-4/[email protected]/.local/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/[email protected]/bin \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -iquote . -iquote bazel-out/local_linux-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 '-std=c99' -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o' -MD -MF bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.d -fPIC -c src/main/tools/process-tools.c -o bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/process-tools/src/main/tools/process-tools.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.

out of bazel returns what?

Oh, sorry. Here's the output from that:

gcc: unrecognized option '-no-canonical-prefixes'
cc1: error: unrecognized command line option "-fno-canonical-system-headers"
cc1: warning: unrecognized command line option "-Wno-free-nonheap-object"

Humm weird. touch /tmp/empty.cc; /usr/bin/gcc -no-canonical-prefixes -c /tmp/empty.cc -o /dev/null gives you which output?

I'm confused – shouldn't we be avoiding the system's gcc anyway?

System gcc:

$ touch /tmp/empty.cc; /usr/bin/gcc -no-canonical-prefixes -c /tmp/empty.cc -o /dev/null
gcc: unrecognized option '-no-canonical-prefixes'

Custom gcc:

touch /tmp/empty.cc; /cm/shared/apps/gcc/4.8.2/bin/gcc -no-canonical-prefixes -c /tmp/empty.cc -o /dev/null
# No error

Yes indeed. Do you still have the two lines in your WORKSPACE file? Is your
custom gcc on the path?

On Sun, Mar 13, 2016, 12:02 PM Robert DiPietro [email protected]
wrote:

I'm confused – shouldn't we be avoiding the system's gcc anyway?

System gcc:

$ touch /tmp/empty.cc; /usr/bin/gcc -no-canonical-prefixes -c /tmp/empty.cc -o /dev/null
gcc: unrecognized option '-no-canonical-prefixes'

Custom gcc:

touch /tmp/empty.cc; /cm/shared/apps/gcc/4.8.2/bin/gcc -no-canonical-prefixes -c /tmp/empty.cc -o /dev/null

No error


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-195935720.

Ah sorry, had cloned again and forgot to update WORKSPACE ...

New error:

ERROR: /home-4/[email protected]/install/testing/bazel/src/main/tools/BUILD:31:1: Linking of rule '//src/main/tools:namespace-sandbox' failed: gcc failed: error executing command 
  (cd /tmp/bazel.nNJjqpD4/out/bazel && \
  exec env - \
  /cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox -no-canonical-prefixes -B/cm/shared/apps/gcc/4.8.2/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/lib -L/cm/shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/binutils/2.25/src/lib -L/cm/shared/apps/binutils/2.25/src/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build

And when I run the command in parentheses I get

collect2: fatal error: cannot find 'ld'
compilation terminated.

Meanwhile which ld gives me /cm/shared/apps/binutils/2.25/src/bin/ld.

Then, just to try it out, I got rid of this new install of binutils (don't need admin for this as the cluster is using Slurm). Same error even though which ld now gives me /usr/bin/ld.

Humm I guess it's because of the -B option. Let see if we remove it, running:

(cd /tmp/bazel.nNJjqpD4/out/bazel && \
  exec env - \
  /cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox -no-canonical-prefixes -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/lib -L/cm/shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/binutils/2.25/src/lib -L/cm/shared/apps/binutils/2.25/src/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox-2.params)

No luck.. same error with that command

On Sun, Mar 13, 2016 at 3:42 PM, Damien Martin-Guillerez <
[email protected]> wrote:

Humm I guess it's because of the -B option. Let see if we remove it,
running:

(cd /tmp/bazel.nNJjqpD4/out/bazel && \
exec env - \
/cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox -no-canonical-prefixes -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/lib -L/cm/
shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/binutils/2.25/src/lib -L/cm/shared/apps/binutils/2.25/src/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox-2.params)


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-195966085.

Weird can you try removing the exec env - \ line?

/usr/bin/ld: rpath: No such file: No such file or directory
collect2: error: ld returned 1 exit status

Ok so the problem is the path. Also the ld in /usr/bin might not be good enough. I am a bit at lost on how proceed for next step.

Hmm. So there's no way to adapt the gcc-finding script to include an ld-finding script?

The problem is we don't specify ld in that command line, we could probably adapt the option to specify where is ld but I am a bit at lost to know which option I should tune. It's definitely possible to make it work, I just don't know how.

Ok. Just as a note, if I exec env, /usr/bin is included in PATH.

On Sun, Mar 13, 2016 at 5:27 PM, Damien Martin-Guillerez <
[email protected]> wrote:

The problem is we don't specify ld in that command line, we could probably
adapt the option to specify where is ld but I am a bit at lost to know
which option I should tune. It's definitely possible to make it work, I
just don't know how.


Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-195989828.

Humm let's try to put -B/usr/bin then in the gcc command line (with the exec env - \)

This led to the same error message about rpath. Also the same if I use -B/cm/shared/apps/gcc/4.8.2/bin instead with the other binutils.

@rdipietro: I guess you just need to add another linker_flag line. It did the trick for me.

For example, my ld is here:

$ which ld
/global/software/Compiler/GCC/4.9.2/binutils/2.25/bin/ld

So I am using:

  linker_flag: "-B/usr/bin/"
  linker_flag: "-B/global/software/Compiler/GCC/4.9.2/binutils/2.25/bin"

Oh yeah seems sensible, can you try on the command line so I can adapt the auto-configuration script if that works?

(note: the bug that was preventing the error from being printed out should be fixed now so no need to run the action outside anymore \o/)

Sorry for the delay. Deadline last week.

I cloned the latest bazel and added

load("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure")
cc_configure()

to WORKSPACE. Same ld-not-found error:

ERROR: /home-4/[email protected]/install/testing/bazel/src/main/tools/BUILD:31:1: Linking of rule '//src/main/tools:namespace-sandbox' failed: gcc failed: error executing command 
  (cd /tmp/bazel.isRZ9SPU/out/bazel && \
  exec env - \
  /cm/shared/apps/gcc/4.8.2/bin/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox -no-canonical-prefixes -B/cm/shared/apps/gcc/4.8.2/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -Wl,rpath,/home-4/[email protected]/.usr/lib -L/home-4/[email protected]/.usr/lib -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib64 -L/cm/shared/apps/gcc/4.8.2/lib64 -Wl,rpath,/cm/shared/apps/gcc/4.8.2/lib -L/cm/shared/apps/gcc/4.8.2/lib -Wl,rpath,/cm/shared/apps/java/JDK_1.8.0_45/lib -L/cm/shared/apps/java/JDK_1.8.0_45/lib -Wl,rpath,/cm/shared/apps/cuda/7.0/lib64 -L/cm/shared/apps/cuda/7.0/lib64 -Wl,rpath,/cm/shared/apps/git/2.6.4/lib -L/cm/shared/apps/git/2.6.4/lib -Wl,rpath,/cm/shared/apps/anaconda/2.7.10/lib -L/cm/shared/apps/anaconda/2.7.10/lib -Wl,rpath,/cm/shared/apps/slurm/current/lib/slurm -L/cm/shared/apps/slurm/current/lib/slurm -Wl,rpath,/cm/shared/apps/slurm/current/lib -L/cm/shared/apps/slurm/current/lib -Wl,rpath,/cm/shared/apps/Intel/openmpi/1.8.4/lib -L/cm/shared/apps/Intel/openmpi/1.8.4/lib -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64 -Wl,rpath,/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -L/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64 -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/namespace-sandbox-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
collect2: fatal error: cannot find 'ld'
compilation terminated.

So I added -B/cm/shared/apps/binutils/2.25/src/bin using the command line. New error is

/cm/shared/apps/binutils/2.25/src/bin/ld: cannot find rpath: No such file or directory
/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2: file not recognized: Is a directory
collect2: error: ld returned 1 exit status

Anything you'd like me to try?

-Wl,rpath,/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 -L/home-4/[email protected]/install/cudnn-6.5-linux-x64-v2

This is the problematic option. This is weird. It complains about /home-4/[email protected]/install/cudnn-6.5-linux-x64-v2 being a directory, which is what rpath argument should be. I'll think a bit longer about that.

Sorry I hadn't time to look back at it, but I will.

Ok @hhclam found the issue, -Wl,rpath,... should be -Wl,-rpath,.... Tell me if that works? In which case I guess only adding the necessary -B flag should be needed to support your cluster from Bazel head :)

Funny timing... my cluster account expired this morning for some unknown
reason (and with no notification). I think I'll be able to get back on at
some point, but am not sure exactly of when. Once this happens I'll try
this fix.

On Fri, Apr 1, 2016 at 1:10 PM, Damien Martin-Guillerez <
[email protected]> wrote:

Ok @hhclam https://github.com/hhclam found the issue, -Wl,rpath,...
should be -Wl,-rpath,.... Tell me if that works? In which case I guess
only adding the necessary -B flag should be needed to support your cluster
from Bazel head :)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/760#issuecomment-204350657

(btw now cc_configure is loaded by default so no longer need to modify the WORKSPACE file)

The new cc_configure is awsome. I'm now able to build Bazel with a crosstool chain like this:

LD_LIBRARY_PATH="/some/crosstool/lib:/some/more/lib" CPLUS_INCLUDE_PATH="/some/include/path" CC="/some/crosstool/bin/some-gcc" ./compile.sh

Much simpler than having to muck with CROSSTOOL.

I would like to thank everyone involved in this issue for their efforts. I am in a similar situation as @rdipietro, trying to compile bazel on a cluster with a custom gcc location but standard ld location (/usr/bin/ld). Simply adding "-B/usr/bin", after this line https://github.com/bazelbuild/bazel/blob/master/tools/cpp/cc_configure.bzl#L166 fixes my build errors, so your assumption is correct, @damienmg :)

Thanks for the feedback :)

When using an newer GCC on CentOS 6.7 (e.g. GCC 4.9.3) a newer version of binutils is also required. The fix of adding"-B/usr/bin"to the list of gcc options does not work in that case.
I assume the right fix would be to add the correct path of the linker that is actually used.

It could be done by having something like:

"-B" + str(repository_ctx.path(_which(repository_ctx,"ld","/usr/bin")).dirname),

twice in cc_configure.bzl
Although I guess someone familiar with the code would create a better version.

I've managed to compile bazel using this line instead of "-B/usr/bin".
Adding"-B/usr/bin" as well probably causes no harm.

fyi. EasyBuild tool resolves much of the automation needs across binutils+GCC deliveries and does the task consistently; it relies upon environment-modules, in case you care about that part.

I was able to build bazel-0.4.1 and tensorflow-0.12.0rc0 from source, without having root privileges. The system only had gcc-4.4.7, so I had to use my own gcc-4.9.4.
To overcome issues like gcc: error trying to exec 'as': execvp: No such file or directory, I've hardcoded paths to ld,nm and as. So, this issue seem to be related to #1713

It seems most effort here is to use a new gcc and glibc other than the default one in old version OS such as centos 6. But our case is a little different. We use javacpp to load tensorflow trained model . Unfortunately, our J2EE environment is still using RHEL 6.8 which has glibc 2.12. Obviously, the two tensorflow libraries published by google were built in an environment with a glibc equal or higher than 2.14. It seems Bazel needs 2.14 or higher version to run . Is there a way we can run bazel against glibc 2.14 or higher but compile tensorflow against glibc 2.12 ?

Appreciate your comments.

Hi @jimht011: can you open a separate issue for helping for your case?

I also was able to build Bazel 0.4.4 and Tensorflow v1.0.0-rc2 on CentOS 6.8.
I was using the gcc compiler in 4.8.2 version.

What about the GLIBC library? Well I was using the GLIBC_2.14 version on my CentOS. How? I took the version included by NoMachine (more info here https://www.nomachine.com/download/download&id=5). Once installed, you can import that library in a session terminal (tmux) with the following command: export LD_LIBRARY_PATH="/usr/NX/lib:/opt/glibc-2.14/lib:$LD_LIBRARY_PATH"

Always adding -B/usr/bin is wrong, it breaks EasyBuild Tensorflow builds on CentOS6, since the assembler there is too old.

I agree with @blappm, hard-coding -B/usr/bin is wrong and break the build on older OS when /usr/bin shouldn't be used at all by gcc. Removing the two hardcoded lines from tools/cpp/unix_cc_configure.bzl does actually fix this particular issue...

Why can't bazel simply respect my PATH?

Such was what I kept screaming to google until it led me to this issue. When I set up my compiler tool chain, I expect the first cc and ld found in my PATH to be the working combination. Yet bazel secretly used my cc and instructed my cc to pick a funny ld.

@jxy Same problems making me crazy!

##@jxy while building tensorflow-gpu from source, it worked to change tensorflow-1.7.0/third_party/gpus/crosstool/CROSSTOOL_nvcc.tpl as the follows that might be helpful.

crosstool_nvcc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnynek picture johnynek  ·  105Comments

laurentlb picture laurentlb  ·  101Comments

meisterT picture meisterT  ·  98Comments

dslomov picture dslomov  ·  84Comments

damienmg picture damienmg  ·  67Comments