Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel build failure on Ubuntu #9

Closed
johnnogent opened this issue Apr 8, 2017 · 14 comments
Closed

Bazel build failure on Ubuntu #9

johnnogent opened this issue Apr 8, 2017 · 14 comments
Assignees

Comments

@johnnogent
Copy link

johnnogent commented Apr 8, 2017

I have a failure when running
bazel build --config=opt :install
on Ubuntu

@cgarciae
Copy link

cgarciae commented Apr 9, 2017

Same here on Ubuntu 16.10.

@johnnogent
Copy link
Author

johnnogent commented Apr 9, 2017

same on Ubuntu 14.04 LTS

@leesunfreshing
Copy link

same here. Ubuntu 16.04 LTS

@normanheckscher
Copy link

Builds on local ubuntu 16.04 LTS after applying #6

@leesunfreshing
Copy link

@normanheckscher problem solved, thx

@malcolmreynolds
Copy link
Collaborator

@normanheckscher thanks for the fix - we'll get it in ASAP, and I'll close this issue once the changes are pushed back out to GitHub.

@malcolmreynolds malcolmreynolds self-assigned this Apr 10, 2017
@johnnogent johnnogent changed the title Bazel build failure on AWS Ubuntu Bazel build failure on Ubuntu Apr 10, 2017
@malcolmreynolds
Copy link
Collaborator

@normanheckscher @leesunfreshing @johnnogent @cgarciae We have pushed a fix, please can you try and build again?

@normanheckscher
Copy link

@malcolmreynolds It builds, I just can't import it. I'll try and look a little further into it sometime over the next few days when I get more time.

Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import sonnet as snt
Traceback (most recent call last):
File "", line 1, in
File "/home/norman/.virtualenvs/tf/local/lib/python2.7/site-packages/sonnet/init.py", line 102, in
from sonnet.python.ops.resampler import resampler
File "/home/norman/.virtualenvs/tf/local/lib/python2.7/site-packages/sonnet/python/ops/resampler.py", line 33, in
tf.resource_loader.get_path_to_datafile("_resampler.so"))
File "/home/norman/.virtualenvs/tf/local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /home/norman/.virtualenvs/tf/local/lib/python2.7/site-packages/sonnet/python/ops/_resampler.so: undefined symbol: ZN10tensorflow15shape_inference16InferenceContext15WithRankAtLeastENS0_11ShapeHandleEiPS2

@normanheckscher
Copy link

Managed to get it to work.
My separately installed tensorflow version (outside the sonnet directory) was originally form the head and a version of 1.1.0rc2. I changed this tensorflow version with git, recompiled and installed the resultant tensorflow-1.1.0rc1-cp27-cp27mu-linux_x86_64.whl. After this, sonnet build, installs and runs as expected.

cd ~/workspace/tensorflow
git checkout r1.1
./configure
bazel build -c opt --copt=-mavx --copt=-mfpmath=both --copt=-msse4.2 --copt=-msse4.1 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package --verbose_failures
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp//tensorflow_pkg/
pip install --upgrade /tmp/tensorflow_pkg/tensorflow-1.1.0rc1-cp27-cp27mu-linux_x86_64.whl
cd ~/workspace
git clone --recursive https://github.com/deepmind/sonnet
etc etc etc from the sonnet instructions

@tmke8
Copy link

tmke8 commented Apr 21, 2017

I have the same error as @normanheckscher ("undefined symbol: ZN10tensorflow...") but my tensorflow is simply 1.0.1 from pip and I'm using Python3. So whatever @normanheckscher thinks was the problem, can't be the problem.

@normanheckscher
Copy link

normanheckscher commented Apr 21, 2017

@thomkeh I managed to get it working by being very particular with my tensorflow install. I'm guessing that the issue lies somewhere around interoperability with Tensorflow as I've played with differing versions of TensorFlow in both the sonnet directory and in my workstation environment (using virtualenv).

After building and installing an older version of Tensorflow I have been able to get Sonnet running. I'd suggest using git to build tensorflow @ 36a47f2, as this is the version which Sonnet is linked against. I'm currently using it to bang out multi-cpu models with mnist... variable success (recursive pun intended)... so yeah, it does work.

Is python 3 supported?

@tmke8
Copy link

tmke8 commented Apr 21, 2017

@normanheckscher Ok, I see. Thanks for the response! I makes sense that you should use the tensorflow version that this repository links against.

Python3 is not officially supported but #10 made it sound like compatibility is just some small code changes away.

@adeze
Copy link

adeze commented May 18, 2017

	sudo apt-get dist-upgrade

fixed it for me on ubuntu 14.04 LTS

i found the bazel error fix elsewhere and it was stated it was an earlier version kernel issue
bazelbuild/bazel#1972

@adria-p
Copy link
Contributor

adria-p commented May 25, 2017

@thomkeh python 3 is supported now :)

Regarding the compilation issues, marking this as duplicate of #25 to follow progress there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants