You are not logged in.

#1 2016-10-18 13:01:55

totient
Member
Registered: 2016-10-18
Posts: 4

[SOLVED] Tensorflow: failure occurred in build()

Using yaourt to install tensorflow, fails to build. Any input would be appreciated on the following question:

  1. Why is the build failing?

  2. Is there another way to download Tensorflow? I'm not very familiar with installing from github.

python-tensorflow-git 0.10.0.r1362.g4addf4b-1  (2016-09-15 07:22)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> n


==> python-tensorflow-git dependencies:
 - python-numpy (already installed)
 - swig (already installed)
 - python-wheel (already installed)
 - python-protobuf3 (already installed)
 - git (already installed) [makedepend]
 - python-pip (already installed) [makedepend]
 - bazel (already installed) [makedepend]
 - rsync (already installed) [makedepend]
 - gcc5 (already installed) [makedepend]


==> Continue building python-tensorflow-git ? [Y/n]
==> -----------------------------------------------
==> 

==> Building and installing package
==> Making package: python-tensorflow-git 0.10.0.r1362.g4addf4b-1 (Tue Oct 18 17:59:47 IST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning tensorflow git repo...
Cloning into bare repository '/tmp/yaourt-tmp-arjun/aur-python-tensorflow-git/tensorflow'...
remote: Counting objects: 180490, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 180490 (delta 11), reused 0 (delta 0), pack-reused 180461
Receiving objects: 100% (180490/180490), 224.43 MiB | 165.00 KiB/s, done.
Resolving deltas: 100% (89152/89152), done.
Checking connectivity... done.
  -> Found fix_cuda_compilation.patch
==> Validating source files with md5sums...
    tensorflow ... Skipped
    fix_cuda_compilation.patch ... Passed
==> Extracting sources...
  -> Creating working copy of tensorflow git repo...
Cloning into 'tensorflow'...
done.
==> Starting prepare()...
patching file third_party/gpus/crosstool/CROSSTOOL.tpl
  -> CUDA support disabled
==> Starting pkgver()...
==> Updated version: python-tensorflow-git 0.11.0rc0.r805.g2ed280b-1
==> Starting build()...
Make sure your .bazelrc points to the correct workspace, e.g. %workspace%:/opt/bazel/base_workspace.
/tmp/yaourt-tmp-arjun/aur-python-tensorflow-git/src/tensorflow /tmp/yaourt-tmp-arjun/aur-python-tensorflow-git/src/tensorflow
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] y
Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] y
Hadoop File System support will be enabled for TensorFlow
Found possible Python library paths:
  /usr/lib/python3.5/site-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3.5/site-packages]

/usr/lib/python3.5/site-packages
Configuration finished
...................................................
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
............
INFO: All external dependencies fetched successfully.
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
INFO: From Compiling external/zlib_archive/gzlib.c [for host]:
external/zlib_archive/gzlib.c: In function 'gz_open':
external/zlib_archive/gzlib.c:14:17: warning: implicit declaration of function 'lseek' [-Wimplicit-function-declaration]
 #  define LSEEK lseek
                 ^
external/zlib_archive/gzlib.c:256:24: note: in expansion of macro 'LSEEK'
         state->start = LSEEK(state->fd, 0, SEEK_CUR);
                        ^~~~~
INFO: From Compiling external/zlib_archive/gzread.c [for host]:
external/zlib_archive/gzread.c: In function 'gz_load':
external/zlib_archive/gzread.c:30:15: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
         ret = read(state->fd, buf + *have, len - *have);
               ^~~~
external/zlib_archive/gzread.c: In function 'gzclose_r':
external/zlib_archive/gzread.c:591:11: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
     ret = close(state->fd);
           ^~~~~
INFO: From Compiling external/zlib_archive/gzwrite.c [for host]:
external/zlib_archive/gzwrite.c: In function 'gz_comp':
external/zlib_archive/gzwrite.c:84:15: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration]
         got = write(state->fd, strm->next_in, strm->avail_in);
               ^~~~~
external/zlib_archive/gzwrite.c: In function 'gzclose_w':
external/zlib_archive/gzwrite.c:573:9: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
     if (close(state->fd) == -1)
         ^~~~~
ERROR: /home/arjun/.cache/bazel/_bazel_arjun/b75b28f57f2a9edbfb9bad4f9a299109/external/com_googlesource_code_re2/BUILD:11:1: C++ compilation of rule '@com_googlesource_code_re2//:re2' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 32 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/com_googlesource_code_re2/re2/dfa.cc: In constructor 're2::DFA::State::State()':
external/com_googlesource_code_re2/re2/dfa.cc:117:10: error: unknown array size in delete
   struct State {
          ^~~~~
external/com_googlesource_code_re2/re2/dfa.cc: In member function 're2::DFA::State* re2::DFA::CachedState(int*, int, uint32_t)':
external/com_googlesource_code_re2/re2/dfa.cc:719:9: note: synthesized method 're2::DFA::State::State()' first required here 
   State state;
         ^~~~~
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 19.595s, Critical Path: 14.19s
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build python-tensorflow-git.
==> Restart building python-tensorflow-git ? [y/N]
==> ----------------------------------------------
==> 

Last edited by totient (2016-10-19 04:30:15)

Offline

#2 2016-10-18 13:21:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Tensorflow: failure occurred in build()

Check the package comments when you have AUR errors - it is particularly odd that you didn't see them, as yaourt spits them all out at you as it builds: the comments include this error and the solution.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-10-18 13:58:02

totient
Member
Registered: 2016-10-18
Posts: 4

Re: [SOLVED] Tensorflow: failure occurred in build()

Trilby wrote:

Check the package comments when you have AUR errors - it is particularly odd that you didn't see them, as yaourt spits them all out at you as it builds: the comments include this error and the solution.

Trilby, really stupid of me to not check the comments. I'll get back after trying the solutions there.

Last edited by totient (2016-10-19 04:31:20)

Offline

#4 2016-10-18 22:21:50

olliemath
Member
From: Lancaster, UK
Registered: 2014-12-16
Posts: 13

Re: [SOLVED] Tensorflow: failure occurred in build()

In answer to your question 2, I install with pip which avoids a bunch of compiling (including having to first build bazel). Instructions available on the tensorflow website.


Edit: of course you might still want to use the AUR version as then yaoart keeps track of dependencies/upgrades for you.

Last edited by olliemath (2016-10-18 22:36:27)

Offline

#5 2016-10-19 04:26:32

totient
Member
Registered: 2016-10-18
Posts: 4

Re: [SOLVED] Tensorflow: failure occurred in build()

olliemath wrote:

In answer to your question 2, I install with pip which avoids a bunch of compiling (including having to first build bazel). Instructions available on the tensorflow website.

AUR comments didn't solve my problem but the pip install worked. Thanks for the link.

Offline

Board footer

Powered by FluxBB