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

Compile Issue about Eigen #2451

Closed
sydpz opened this issue May 21, 2016 · 3 comments
Closed

Compile Issue about Eigen #2451

sydpz opened this issue May 21, 2016 · 3 comments

Comments

@sydpz
Copy link

sydpz commented May 21, 2016

I want to compile tensorflow-r0.8 while meet an issue about Eigen.
This issue happened in both CPU and GPU version.

The error log is

ERROR: /home/wangbing/Git/tensorflow/tensorflow/core/kernels/BUILD:274:1: C++ compilation of rule '//tensorflow/core/kernels:mirror_pad_op' failed: gcc failed: error executing command 
  (cd /home/wangbing/.cache/bazel/_bazel_wangbing/ab8decc7da56ae5392500261af1cc855/tensorflow && \
  exec env - \
    PATH=/home/wangbing/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/wangbing/bin \
  /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-50812b426b7c -isystem bazel-out/local-opt/genfiles/external/eigen_archive/eigen-eigen-50812b426b7c -fno-exceptions -DEIGEN_AVOID_STL_ARRAY -DTENSORFLOW_USE_EIGEN_THREADPOOL -pthread -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-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o' -MD -MF bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.d -c tensorflow/core/kernels/mirror_pad_op.cc -o bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Target //tensorflow/cc:tutorials_example_trainer failed to build

Then I run that command by myself,and get the error as below

angbing@wangbing-MS-7996:~/Git/tensorflow$ /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-50812b426b7c -isystem bazel-out/local-opt/genfiles/external/eigen_archive/eigen-eigen-50812b426b7c -fno-exceptions -DEIGEN_AVOID_STL_ARRAY -DTENSORFLOW_USE_EIGEN_THREADPOOL -pthread -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-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o' -MD -MF bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.d -c tensorflow/core/kernels/mirror_pad_op.cc -o bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o
In file included from ./tensorflow/core/kernels/mirror_pad_op.h:19:0,
                 from tensorflow/core/kernels/mirror_pad_op.cc:20:
./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:67: fatal error: eigen-eigen-50812b426b7c/unsupported/Eigen/CXX11/Tensor: No such file or directory
 #include "eigen-eigen-50812b426b7c/unsupported/Eigen/CXX11/Tensor"

It seems that a eigen model can not be found. How can I fix it?

@sydpz
Copy link
Author

sydpz commented May 21, 2016

my system is ubuntu 14.04

wangbing@wangbing-MS-7996:~/Git/tensorflow$ uname -a
Linux wangbing-MS-7996 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
wangbing@wangbing-MS-7996:~/Git/tensorflow$ 

@sydpz
Copy link
Author

sydpz commented May 23, 2016

I found the root cause is the command exec env - , this will cause the terminal exit normally in ubuntu.

Currently I have to compile some modules manually to work around it.

ERROR: /home/wangbing/Git/tensorflow/tensorflow/core/kernels/BUILD:297:1: C++ compilation of rule '//tensorflow/core/kernels:mirror_pad_op' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /home/wangbing/.cache/bazel/_bazel_wangbing/ab8decc7da56ae5392500261af1cc855/tensorflow && \
  exec env - \
    PATH=/home/wangbing/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/wangbing/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 '-std=c++11' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/farmhash_archive -iquote bazel-out/local_linux-opt/genfiles/external/farmhash_archive -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 -isystem bazel-out/local_linux-opt/genfiles/external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-a5e9085a94e8 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-a5e9085a94e8 -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -fno-exceptions -DEIGEN_AVOID_STL_ARRAY -DTENSORFLOW_USE_EIGEN_THREADPOOL '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.d -c tensorflow/core/kernels/mirror_pad_op.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/mirror_pad_op/tensorflow/core/kernels/mirror_pad_op.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

@sydpz
Copy link
Author

sydpz commented May 24, 2016

This issue is caused by OOM, I added a larger swap file and fixed this issue, thanks.

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

No branches or pull requests

1 participant