Orange Pi Pc Plus 上的 Tensorflow 构建错误

Tensorflow build error on Orange Pi Pc Plus

我正在尝试在 Orange Pi Pc Plus(Allwinner H3、ARM Cortex A7)运行 ARMBIAN 5.38 stable Ubuntu 16.04.4 LTS 4.14.18-sunxi 上构建 Tensorflow 1.7.1,以及使用 Bazel 0.10.0 as per the official release, I followed this tutorial,我成功构建了 Bazel,但是当我尝试使用 -mfpu=neon-vfpv4 标志构建 Tensorflow 进行优化时:

bazel build -c opt --compilation_mode=opt --copt="-mfpu=neon-vfpv4" --copt="-funsafe-math-optimizations" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --copt="-std=gnu99" --local_resources 500,2.0,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package

我收到以下错误:

bazel-out/arm-opt/bin/_solib_arm/_U_S_Stensorflow_Scontrib_Slite_Stoco_Ctoco___Utensorflow/libtensorflow_framework.so: error: undefined reference to 'png_init_filter_functions_neon'

我试过同时安装libpng16-dev和libpng12-dev,还是报错。

事实证明,直到2018年5月,在ARM上没有任何修改成功构建的tensorflow唯一正式版本是revision d82b2f71b60d5fff48884c20c7b85e517330e91f, according to tensorflow's official CI server data, this is the latest successful build for ARM (Raspberry Pi) to date. The exact error reported in this question shows up in the official nightly build of the next revision.