3

Bazel で Tensorflow を構築できない理由を理解しようとしています。Tensorflow ウェブページhereのインストール手順に従っています。

コマンドでビルドしたときの出力は次のとおりですbazel build -c opt --config=cuda --verbose_failures //tensorflow/cc:tutorials_example_trainer

[mcochrane@Matt-PC-Fedora tensorflow]$ bazel build -c opt --config=cuda --verbose_failures //tensorflow/cc:tutorials_example_trainer
INFO: Found 1 target...
INFO: From Executing genrule @png_archive//:configure:
/home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow/external/png_archive/libpng-1.2.53 /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow
/tmp/tmp.52xPGPoCo8 /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow/external/png_archive/libpng-1.2.53 /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/tmp.52xPGPoCo8':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/external/png_archive/BUILD:23:1: Executing genrule @png_archive//:configure failed: bash failed: error executing command 
  (cd /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow && \
  exec env - \
    PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/home/mcochrane/.local/bin:/home/mcochrane/bin \
  /bin/bash -c 'source tools/genrule/genrule-setup.sh; pushd external/png_archive/libpng-1.2.53; workdir=$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $workdir; pushd $workdir; ./configure --enable-shared=no --with-pic=no; popd; popd; cp $workdir/config.h bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53; rm -rf $workdir;'): bash failed: error executing command 
  (cd /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow && \
  exec env - \
    PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/home/mcochrane/.local/bin:/home/mcochrane/bin \
  /bin/bash -c 'source tools/genrule/genrule-setup.sh; pushd external/png_archive/libpng-1.2.53; workdir=$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $workdir; pushd $workdir; ./configure --enable-shared=no --with-pic=no; popd; popd; cp $workdir/config.h bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53; rm -rf $workdir;').
Target //tensorflow/cc:tutorials_example_trainer failed to build
INFO: Elapsed time: 2.229s, Critical Path: 0.71s

少し不可解です。Bash は、実際には多くの洞察を提供しない次のメッセージで失敗します。

bash failed: error executing command 
  (cd /home/mcochrane/.cache/bazel/_bazel_mcochrane/fd0e4dd3891f9c98b9d8308260aad0f3/tensorflow && \
  exec env - \
    PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/home/mcochrane/.local/bin:/home/mcochrane/bin \
  /bin/bash -c 'source tools/genrule/genrule-setup.sh; pushd external/png_archive/libpng-1.2.53; workdir=$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $workdir; pushd $workdir; ./configure --enable-shared=no --with-pic=no; popd; popd; cp $workdir/config.h bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53; rm -rf $workdir;').

bazel でコンパイルするときに、このエラーに遭遇した人はいますか?

編集:追加情報

OS は Fedora23 (カーネル 4.2.6-300.fc23)

gcc バージョンは 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) です。

[mcochrane@Matt-PC-Fedora tensorflow]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

ldd バージョン: (GNU libc) 2.22

4

0 に答える 0