Search code examples
tensorflowarmcomputer-visionbazelorange-pi

Tensorflow build error on Orange Pi Pc Plus


I'm trying to build Tensorflow 1.7.1 on Orange Pi Pc Plus (Allwinner H3, ARM Cortex A7) running ARMBIAN 5.38 stable Ubuntu 16.04.4 LTS 4.14.18-sunxi, and using Bazel 0.10.0 as per the official release, I followed this tutorial, I built Bazel successfully, but when I try to build Tensorflow using -mfpu=neon-vfpv4 flag for optimization:

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

I get the following error:

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'

I have tried installing both libpng16-dev and libpng12-dev, but the error still occurs.


Solution

  • It turns out that until May 2018, the only official version of tensorflow that builds successfully on ARM without any modifications is 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.