Last active
June 12, 2019 05:28
-
-
Save leigh-johnson/574c88138fd9d766b6e6318e70102c93 to your computer and use it in GitHub Desktop.
Cross-compiling Tensorflow 2.0 for RPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.5" \ | |
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 \ | |
tensorflow/tools/ci_build/pi/build_raspberry_pi.sh | |
CC_TOOL=/tools/cross-pi-gcc-8.3.0-1/bin/arm-linux-gnueabihf-g++ \ | |
bazel build -c opt \ | |
--copt=-march=armv7-a \ | |
--copt=-mfpu=neon-vfpv4 \ | |
--copt=-std=c++11 \ | |
--copt=-funsafe-math-optimizations --copt=-ftree-vectorize \ | |
--copt=-fomit-frame-pointer --cpu=arm \ | |
--crosstool_top=@local_config_arm_compiler//:toolchain \ | |
--define tensorflow_mkldnn_contraction_kernel=0 \ | |
--verbose_failures \ | |
--config=noaws \ | |
--config=nogcp \ | |
--config=nohdfs \ | |
--config=noignite \ | |
--config=nokafka \ | |
--config=nonccl \ | |
--config=monolithic \ | |
//tensorflow:libtensorflow.so \ | |
//tensorflow:libtensorflow_framework.so \ | |
//tensorflow/tools/benchmark:benchmark_model \ | |
//tensorflow/tools/pip_package:build_pip_package | |
INFO: Found 4 targets... | |
[0 / 16] [-----] BazelWorkspaceStatusAction stable-status.txt | |
ERROR: /Users/ljohnson/repos/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_ljohnson/eab0d61a99b6696edb3d2aff87b585e8/external/com_google_absl/absl/base/BUILD.bazel:30:1: C++ compilation of rule '@com_google_absl//absl/base:spinlock_wait' failed (Exit 1): gcc failed: error executing command | |
(cd /Users/ljohnson/repos/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_ljohnson/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow && \ | |
exec env - \ | |
LD_LIBRARY_PATH='' \ | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \ | |
PWD=/proc/self/cwd \ | |
PYTHON_BIN_PATH=/usr/bin/python3 \ | |
PYTHON_LIB_PATH=/usr/lib/python3/dist-packages \ | |
TF_CONFIGURE_IOS=0 \ | |
/usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/arm-opt/bin/external/com_google_absl/absl/base/_objs/spinlock_wait/spinlock_wait.d '-frandom-seed=bazel-out/arm-opt/bin/external/com_google_absl/absl/base/_objs/spinlock_wait/spinlock_wait.o' -iquote external/com_google_absl -iquote bazel-out/arm-opt/genfiles/external/com_google_absl -iquote bazel-out/arm-opt/bin/external/com_google_absl '-march=armv7-a' '-mfpu=neon-vfpv4' '-std=c++11' '-DS_IREAD=S_IRUSR' '-DS_IWRITE=S_IWUSR' -O3 -fno-tree-pre -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -funsafe-math-optimizations -ftree-vectorize -fomit-frame-pointer -Wall -Wextra -Wcast-qual -Wconversion-null -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -Wno-missing-field-initializers -Wno-sign-compare -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/com_google_absl/absl/base/internal/spinlock_wait.cc -o bazel-out/arm-opt/bin/external/com_google_absl/absl/base/_objs/spinlock_wait/spinlock_wait.o) | |
Execution platform: @bazel_tools//platforms:host_platform | |
gcc: error: unrecognized command line option '-mfpu=neon-vfpv4' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment