highwayhash: Build fails
My build fails when compiling through Bazel (while building TensorFlow).
ERROR: /hmt/sirius1/skv0/u/4/r/user/.cache/bazel/_bazel_user/d217f35631206796f447d50c6f1d6243/external/highwayhash/BUILD:125:1: C++ compilation of rule '@highwayhash//:sip_hash' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /hmt/sirius1/skv0/u/4/r/user/.cache/bazel/_bazel_user/d217f35631206796f447d50c6f1d6243/execroot/tensorflow && \
exec env - \
LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:/usr/local/gurobi/lib:/usr/local/cuda-7.5/extras/CUPTI/lib64 \
PATH=/vega/astro/users/user/applications/pythonenv/bin:/opt/rh/devtoolset-1.1/root/usr/bin:/usr/local/cuda-7.5/bin:/vega/astro/users/user/applications/bazel/output:/vega/astro/users/user/applications/swig/bin:/vega/astro/users/user/applications/jdk1.8.0_102/bin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/gurobi/bin:/opt/openlava-3.3/bin \
TMPDIR=/tmp \
external/local_config_cuda/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 -g0 '-std=c++11' -MD -MF bazel-out/host/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.d '-frandom-seed=bazel-out/host/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.o' -iquote external/highwayhash -iquote bazel-out/host/genfiles/external/highwayhash -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/highwayhash -isystem bazel-out/host/genfiles/external/highwayhash -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/highwayhash/highwayhash/sip_hash.cc -o bazel-out/host/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/highwayhash/highwayhash/sip_hash.h:24:0,
from external/highwayhash/highwayhash/sip_hash.cc:15:
external/highwayhash/highwayhash/state_helpers.h: In function 'void highwayhash::PaddedUpdate(highwayhash::uint64, const char*, highwayhash::uint64, State*)':
external/highwayhash/highwayhash/state_helpers.h:31:13: error: there are no arguments to 'alignas' that depend on a template parameter, so a declaration of 'alignas' must be available [-fpermissive]
external/highwayhash/highwayhash/state_helpers.h:31:13: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
external/highwayhash/highwayhash/state_helpers.h:31:15: error: expected ';' before 'char'
external/highwayhash/highwayhash/state_helpers.h:42:10: error: 'final_packet' was not declared in this scope
Target //tensorflow/cc:tutorials_example_trainer failed to build
Adding the -fpermissive
does allow it to continue with warnings, at which point I get this error:
ERROR: /hmt/sirius1/skv0/u/4/r/user/.cache/bazel/_bazel_user/d217f35631206796f447d50c6f1d6243/external/highwayhash/BUILD:125:1: C++ compilation of rule '@highwayhash//:sip_hash' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /hmt/sirius1/skv0/u/4/r/user/.cache/bazel/_bazel_user/d217f35631206796f447d50c6f1d6243/execroot/tensorflow && \
exec env - \
LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:/usr/local/gurobi/lib:/usr/local/cuda-7.5/extras/CUPTI/lib64 \
PATH=/vega/astro/users/user/applications/pythonenv/bin:/opt/rh/devtoolset-1.1/root/usr/bin:/usr/local/cuda-7.5/bin:/vega/astro/users/user/applications/bazel/output:/vega/astro/users/user/applications/swig/bin:/vega/astro/users/user/applications/jdk1.8.0_102/bin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/gurobi/bin:/opt/openlava-3.3/bin \
TMPDIR=/tmp \
external/local_config_cuda/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' -MD -MF bazel-out/local_linux-opt/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.pic.d '-frandom-seed=bazel-out/local_linux-opt/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.pic.o' -fPIC -iquote external/highwayhash -iquote bazel-out/local_linux-opt/genfiles/external/highwayhash -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -isystem external/highwayhash -isystem bazel-out/local_linux-opt/genfiles/external/highwayhash -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/highwayhash/highwayhash/sip_hash.cc -o bazel-out/local_linux-opt/bin/external/highwayhash/_objs/sip_hash/external/highwayhash/highwayhash/sip_hash.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/highwayhash/highwayhash/sip_hash.h:24:0,
from external/highwayhash/highwayhash/sip_hash.cc:15:
external/highwayhash/highwayhash/state_helpers.h: In function 'void highwayhash::PaddedUpdate(highwayhash::uint64, const char*, highwayhash::uint64, State*)':
external/highwayhash/highwayhash/state_helpers.h:31:15: error: expected ';' before 'char'
external/highwayhash/highwayhash/state_helpers.h:42:10: error: 'final_packet' was not declared in this scope
Target //tensorflow/cc:tutorials_example_trainer failed to build
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 21 (14 by maintainers)
@diegocrzt no problem. That is an unrelated issue. According to this thread, your version of gcc is too old. If you are using a scientific computing environment, try typing
module load gcc
and tab-complete that command before running it to see which versions you have available. Try loading the latest version and re-compiling. For example,module load gcc/4.7.1
ormodule load gcc/4.9.1
depending on what versions you have.@diegocrzt, you need to edit the file
external/highwayhash/highwayhash/state_helpers.h
to make the changes to line 31 that @jan-wassenberg listed above. It should readchar __attribute__((aligned(32))) final_packet[State::kPacketSize] = {0};
Then try re-compiling.hehe, I see what happened. The Markdown syntax ate the underscores; it should read
char __attribute__((aligned(32))) final_packet[State::kPacketSize] = {0};
.