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

Raspberry Pi build error #3135

Closed
mweber7 opened this Issue Jul 1, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@mweber7

mweber7 commented Jul 1, 2016

I am trying to build tensorflow on a Raspberry Pi 3 (Raspbian OS, gcc 4.9.2, no USB stick for swap) according to the steps provided here. When I execute the following make command,

make -f tensorflow/contrib/makefile/Makefile HOST_OS=PI TARGET=PI
OPTFLAGS="-Os -mfpu=neon-vfpv4 -funsafe-math-optimizations -ftree-vectorize"

I am getting the error reproduced below. Is this an eigen issue? Any suggestions on how to overcome this error?


In file included from /usr/include/c++/4.9/atomic:41:0,
from /home/pi/Desktop/Tensorflow_gitclone/tensorflow/tensorflow/contrib/makefile/downloads/eigen-eigen-334b1d428283/unsupported/Eigen/CXX11/ThreadPool:40,
from /home/pi/Desktop/Tensorflow_gitclone/tensorflow/tensorflow/contrib/makefile/downloads/eigen-eigen-334b1d428283/unsupported/Eigen/CXX11/Tensor:57,
from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from tensorflow/core/lib/core/threadpool.cc:19:
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘void Eigen::EventCount::CancelWait(Eigen::EventCount::Waiter_)’:
/usr/include/c++/4.9/bits/atomic_base.h:538:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, _m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘void Eigen::EventCount::CommitWait(Eigen::EventCount::Waiter
)’:
/usr/include/c++/4.9/bits/atomic_base.h:538:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘void Eigen::EventCount::Notify(bool)’:
/usr/include/c++/4.9/bits/atomic_base.h:538:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘Work Eigen::RunQueue<Work, kSize>::PushBack(Work) [with Work = tensorflow::thread::EigenEnvironment::Task; unsigned int kSize = 1024u]’:
/usr/include/c++/4.9/bits/atomic_base.h:581:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘void Eigen::NonBlockingThreadPoolTempl::Schedule(std::function<void()>) [with Environment = tensorflow::thread::EigenEnvironment]’:
/usr/include/c++/4.9/bits/atomic_base.h:581:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘Work Eigen::RunQueue<Work, kSize>::PopFront() [with Work = tensorflow::thread::EigenEnvironment::Task; unsigned int kSize = 1024u]’:
/usr/include/c++/4.9/bits/atomic_base.h:581:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
^
/usr/include/c++/4.9/bits/atomic_base.h: In member function ‘Work Eigen::RunQueue<Work, kSize>::PopBack() [with Work = tensorflow::thread::EigenEnvironment::Task; unsigned int kSize = 1024u]’:
/usr/include/c++/4.9/bits/atomic_base.h:581:70: error: failure memory model cannot be stronger than success memory model for ‘__atomic_compare_exchange’
return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
^
tensorflow/contrib/makefile/Makefile:404: recipe for target '/home/pi/Desktop/Tensorflow_gitclone/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/core/lib/core/threadpool.o' failed
make: *** [/home/pi/Desktop/Tensorflow_gitclone/tensorflow/tensorflow/contrib/makefile/gen/obj/tensorflow/core/lib/core/threadpool.o] Error 1

@petewarden

This comment has been minimized.

Show comment
Hide comment
@petewarden

petewarden Jul 1, 2016

Member

I've seen this bug on gcc 4.9 - can you try installing 4.8 manually, and then running it like this:

make -f tensorflow/contrib/makefile/Makefile HOST_OS=PI TARGET=PI \
OPTFLAGS="-Os -mfpu=neon-vfpv4 -funsafe-math-optimizations -ftree-vectorize" \
CXX=g++-4.8
Member

petewarden commented Jul 1, 2016

I've seen this bug on gcc 4.9 - can you try installing 4.8 manually, and then running it like this:

make -f tensorflow/contrib/makefile/Makefile HOST_OS=PI TARGET=PI \
OPTFLAGS="-Os -mfpu=neon-vfpv4 -funsafe-math-optimizations -ftree-vectorize" \
CXX=g++-4.8
@mweber7

This comment has been minimized.

Show comment
Hide comment
@mweber7

mweber7 Jul 1, 2016

Thanks, this worked for me and I am closing this issue.

mweber7 commented Jul 1, 2016

Thanks, this worked for me and I am closing this issue.

@mweber7 mweber7 closed this Jul 1, 2016

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