Ubuntu 16.04でbazelクロスコンパイルtensorflow lite
https://www.cnblogs.com/jojodru/p/7744630.html
しかし、optオプションが見つからないというエラーが表示されました.
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
INFO: Reading rc options for 'build' from /home/allen/project/tensorflow180711/tools/bazel.rc:
'build' options: --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define=grpc_no_ares=true --spawn_strategy=standalone --genrule_strategy=standalone -c opt
ERROR: Config value opt is not defined in any .rc file
bazel bazel
https://blog.csdn.net/elaine_bao/article/details/78668657
bazel ,
bazel query --nohost_deps --noimplicit_deps 'deps(//main:hello-world)' \
--output graph
。
lite python, :
/home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -nostdinc '-mfloat-abi=hard' '-mfpu=neon-vfpv4' -funsafe-math-optimizations -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/include -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/usr/include -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.9.3/include -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3 -isystem /home/allen/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf -U_FORTIFY_SOURCE -fstack-protector -fPIE '-fdiagnostics-color=always' -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O3 -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/armv6-opt/bin/external/gif_archive/_objs/gif/external/gif_archive/lib/gifalloc.pic.d -fPIC -iquote external/gif_archive -iquote bazel-out/armv6-opt/genfiles/external/gif_archive -iquote external/bazel_tools -iquote bazel-out/armv6-opt/genfiles/external/bazel_tools -isystem external/gif_archive/lib -isystem bazel-out/armv6-opt/genfiles/external/gif_archive/lib -isystem bazel-out/armv6-opt/bin/external/gif_archive/lib -fPIC '-march=armv6' '-mfloat-abi=hard' '-mfpu=neon-vfpv4' -funsafe-math-optimizations -Wno-unused-function -Wno-sign-compare -I -ftree-vectorize -fomit-frame-pointer armv6 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/gif_archive/lib/gifalloc.c -o bazel-out/armv6-opt/bin/external/gif_archive/_objs/gif/external/gif_archive/lib/gifalloc.pic.o)
python
tensorflow:libtensorflow_framework.so
build_armv6.sh -I 。
ERROR: /home/allen/.cache/bazel/_bazel_allen/b3dc72c6218ef3f1c992e04386ed352b/external/png_archive/BUILD.bazel:8:1: C++ compilation of rule '@png_archive//:png' failed (Exit 1): gcc failed: error executing command
(cd /home/allen/.cache/bazel/_bazel_allen/b3dc72c6218ef3f1c992e04386ed352b/execroot/org_tensorflow && \
exec env - \
PATH=/home/allen/bin:/home/allen/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/allen/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:/home/allen/bin \
PWD=/proc/self/cwd \
/usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=2' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -isystem /usr/include -g0 -O3 -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/host/bin/external/png_archive/_objs/png/external/png_archive/pngpread.d -iquote external/png_archive -iquote bazel-out/host/genfilesexternal/png_archive -iquote external/zlib_archive -iquote bazel-out/host/genfiles/external/zlib_archive -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/png_archive -isystem bazel-out/host/genfiles/external/png_archive -isystem bazel-out/host/bin/external/png_archive -isystem external/zlib_archive -isystem bazel-out/host/genfiles/external/zlib_archive -isystem bazel-out/host/bin/external/zlib_archive -g0 '-march=native' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/png_archive/pngpread.c -o bazel-out/host/bin/external/png_archive/_objs/png/external/png_archive/pngpread.o)
In file included from ——:
external/png_archive/pngpriv.h:911:4: error: #error ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
# error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
^
INFO: Elapsed time: 558.417s, Critical Path: 13.79s
INFO: 999 processes: 999 local.
FAILED: Build did NOT complete successfully
。