Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22016

Compile error, when building tensorflow v1.14.0 without avx2 support

$
0
0

Using Debian 10 Buster, Python v2.7.I try to build specific tensorflow v1.14.0 without avx2 support, because I get following error:

Nov 4 17:12:32 moodle37 kernel: [9773297.574293] traps: python2.7[4570] trap invalid opcode ip:7fb9b74bca59 sp:7ffdb7605e10 error:0 in libtensorflow_framework.so.1[7fb9b6d97000+18f8000]

1) I cloned tensorflow with git

2) checked out v1.14.0.

>git statusHEAD detached at v1.14.0

3)

gcc -Q -march=native --help=target | grep march  -march=                               nehalem

So CPU codename is nehalem.

4) I used ./configurewith build options:

-march=nehalem mavx -msse4.1 -msse4.2 -mpclmul -mpopcnt -maes -mno-avx2

5) Executed

bazel build //tensorflow/tools/pip_package:build_pip_package

but I got build error:

ERROR: /root/inst/tensorflow_src/tensorflow/core/kernels/BUILD:3255:1: C++ compilation of rule '//tensorflow/core/kernels:matrix_square_root_op' failed (Exit 1)gcc: fatal error: Killed signal terminated program cc1pluscompilation terminated.Target //tensorflow/tools/pip_package:build_pip_package failed to buildUse --verbose_failures to see the command lines of failed build steps.INFO: Elapsed time: 18990.253s, Critical Path: 381.93sINFO: 2372 processes: 2372 local.FAILED: Build did NOT complete successfully

6) Executed

bazel build --verbose_failures //tensorflow/tools/pip_package:build_pip_package  

with following error:

ERROR: /root/inst/tensorflow_src/tensorflow/core/kernels/BUILD:3255:1: C++ compilation of rule '//tensorflow/core/kernels:matrix_square_root_op' failed (Exit 1): gcc failed: error executing command  (cd /root/.cache/bazel/_bazel_root/d7c6443e63bbc3c61de28c70992e7b9c/execroot/org_tensorflow && \  exec env - \    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \    PWD=/proc/self/cwd \    PYTHON_BIN_PATH=/usr/bin/python \    PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \    TF_CONFIGURE_IOS=0 \    TF_DOWNLOAD_CLANG=0 \    TF_NEED_CUDA=0 \    TF_NEED_OPENCL_SYCL=0 \    TF_NEED_ROCM=0 \  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.d '-frandom-seed=bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.o' -fPIC -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64''-DEIGEN_HAS_TYPE_TRAITS=0' -DTF_USE_SNAPPY -iquote . -iquote bazel-out/k8-py2-opt/bin -iquote external/com_google_absl -iquote bazel-out/k8-py2-opt/bin/external/com_google_absl -iquote external/eigen_archive -iquote bazel-out/k8-py2-opt/bin/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/k8-py2-opt/bin/external/local_config_sycl -iquote external/nsync -iquote bazel-out/k8-py2-opt/bin/external/nsync -iquote external/gif_archive -iquote bazel-out/k8-py2-opt/bin/external/gif_archive -iquote external/jpeg -iquote bazel-out/k8-py2-opt/bin/external/jpeg -iquote external/protobuf_archive -iquote bazel-out/k8-py2-opt/bin/external/protobuf_archive -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-py2-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-py2-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-py2-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-py2-opt/bin/external/highwayhash -iquote external/zlib_archive -iquote bazel-out/k8-py2-opt/bin/external/zlib_archive -isystem external/eigen_archive -isystem bazel-out/k8-py2-opt/bin/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/k8-py2-opt/bin/external/nsync/public -isystem external/gif_archive/lib -isystem bazel-out/k8-py2-opt/bin/external/gif_archive/lib -isystem external/protobuf_archive/src -isystem bazel-out/k8-py2-opt/bin/external/protobuf_archive/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-py2-opt/bin/external/farmhash_archive/src -isystem external/zlib_archive -isystem bazel-out/k8-py2-opt/bin/external/zlib_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-ftemplate-depth=900' -msse3 -pthread -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"''-D__TIMESTAMP__="redacted"''-D__TIME__="redacted"' -c tensorflow/core/kernels/matrix_square_root_op.cc -o bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.o)Execution platform: @bazel_tools//platforms:host_platformgcc: fatal error: Killed signal terminated program cc1pluscompilation terminated.Target //tensorflow/tools/pip_package:build_pip_package failed to buildINFO: Elapsed time: 3559.068s, Critical Path: 448.60sINFO: 397 processes: 397 local.FAILED: Build did NOT complete successfully

EDIT1:

191105 20:22:26.151:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.start] starting local subprocess #314, argv: /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -D_FORTIFY_SOURCE=1 -DNDEBUG -ffunction-sections -fdata-sections -std=c++0x -MD -MF bazel-out/k8-py2-opt/bin/te...tin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -c tensorflow/core/kernels/matrix_square_root_op.cc -o bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.o191105 20:22:26.151:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.stepLog] prefetching inputs for local execution (#314 Compiling tensorflow/core/kernels/matrix_square_root_op.cc)191105 20:22:26.151:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.setState] Step #314 time: 0.001 delta: 0.001 state: PARSING --> PREFETCHING_LOCAL_INPUTS191105 20:22:26.152:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.stepLog] running locally (#314 Compiling tensorflow/core/kernels/matrix_square_root_op.cc)191105 20:22:26.152:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.setState] Step #314 time: 0.002 delta: 0.001 state: PREFETCHING_LOCAL_INPUTS --> LOCAL_ACTION_RUNNING191105 20:29:22.020:I 1354 [com.google.devtools.build.lib.exec.local.LocalSpawnRunner$SubprocessHandler.setState] Step #314 time: 415.868 delta: 415.866 state: LOCAL_ACTION_RUNNING --> SUCCESS191105 20:29:22.363:W 1354 [com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run] Aborting evaluation due to com.google.devtools.build.lib.skyframe.ActionExecutionFunction$ActionExecutionFunctionException: com.google.devtools.build.lib.actions.AlreadyReportedActionExecutionException: C++ compilation of rule '//tensorflow/core/kernels:matrix_square_root_op' failed (Exit 1): gcc failed: error executing command  (cd /moodledata/inst/.cache/bazel/_bazel_root/ebeb582d6679e454bd341748991b8998/execroot/org_tensorflow && \  exec env - \    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \    PWD=/proc/self/cwd \    PYTHON_BIN_PATH=/usr/bin/python \    PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \    TF_CONFIGURE_IOS=0 \    TF_DOWNLOAD_CLANG=0 \    TF_NEED_CUDA=0 \    TF_NEED_OPENCL_SYCL=0 \    TF_NEED_ROCM=0 \  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.d '-frandom-seed=bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.o' -fPIC -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64''-DEIGEN_HAS_TYPE_TRAITS=0' -DTF_USE_SNAPPY -iquote . -iquote bazel-out/k8-py2-opt/bin -iquote external/com_google_absl -iquote bazel-out/k8-py2-opt/bin/external/com_google_absl -iquote external/eigen_archive -iquote bazel-out/k8-py2-opt/bin/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/k8-py2-opt/bin/external/local_config_sycl -iquote external/nsync -iquote bazel-out/k8-py2-opt/bin/external/nsync -iquote external/gif_archive -iquote bazel-out/k8-py2-opt/bin/external/gif_archive -iquote external/jpeg -iquote bazel-out/k8-py2-opt/bin/external/jpeg -iquote external/protobuf_archive -iquote bazel-out/k8-py2-opt/bin/external/protobuf_archive -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-py2-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-py2-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-py2-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-py2-opt/bin/external/highwayhash -iquote external/zlib_archive -iquote bazel-out/k8-py2-opt/bin/external/zlib_archive -isystem external/eigen_archive -isystem bazel-out/k8-py2-opt/bin/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/k8-py2-opt/bin/external/nsync/public -isystem external/gif_archive/lib -isystem bazel-out/k8-py2-opt/bin/external/gif_archive/lib -isystem external/protobuf_archive/src -isystem bazel-out/k8-py2-opt/bin/external/protobuf_archive/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-py2-opt/bin/external/farmhash_archive/src -isystem external/zlib_archive -isystem bazel-out/k8-py2-opt/bin/external/zlib_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-ftemplate-depth=900' -msse3 -pthread -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"''-D__TIMESTAMP__="redacted"''-D__TIME__="redacted"' -c tensorflow/core/kernels/matrix_square_root_op.cc -o bazel-out/k8-py2-opt/bin/tensorflow/core/kernels/_objs/matrix_square_root_op/matrix_square_root_op.pic.o)Execution platform: @bazel_tools//platforms:host_platform while evaluating ActionLookupData{actionLookupKey=//tensorflow/core/kernels:matrix_square_root_op BuildConfigurationValue.Key[06916201e0a2e3a731dd7c8fca228a97] false, actionIndex=1}

How can I fix this?

- SOLUTION:

I had 2 GB RAM for the virtual machine. After increasing RAM to 8 GB, the build finished successfully.


Viewing all articles
Browse latest Browse all 22016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>