ARM-software / ML-examples

Arm Machine Learning tutorials and examples
https://developer.arm.com/technologies/machine-learning-on-arm
Apache License 2.0
429 stars 192 forks source link

mnist make error #20

Open huanzoey opened 5 years ago

huanzoey commented 5 years ago

i followed the instruction as https://github.com/ARM-software/armnn/blob/branches/armnn_19_05/BuildGuideCrossCompilation.md. everything is ok. and unittest is no error occured.

when i run the armnn-mnist. my makefile is: ARMNN_LIB = ${HOME}/zoey/armnn/build ARMNN_INC = ${HOME}/zoey/armnn/include BOOST_ROOT = /home/zoey/armnn-devenv/boost_arm64_install PROTOBUF =/home/zoey/armnn-devenv/google/x86_64_pb_install/lib all: mnist_caffe mnist_tf mnist_caffe: mnist_caffe.cpp mnist_loader.hpp aarch64-linux-gnu-g++ -O3 -std=c++14 -I$(ARMNN_INC) -I$(BOOST_ROOT) mnist_caffe.cpp -o mnist_caffe -L$(PROTOBUF) -L$(ARMNN_LIB) -lprotobuf -larmnn -larmnnCaffeParser -lpthread mnist_tf: mnist_tf.cpp mnist_loader.hpp aarch64-linux-gnu-g++ -O3 -std=c++14 -I$(ARMNN_INC) -I$(BOOST_ROOT) mnist_tf.cpp -o mnist_caffe -L$(PROTOBUF) -L$(ARMNN_LIB) -lprotobuf -larmnn -larmnnTfParser -lpthread clean: -rm -f mnist_tf mnist_caffe test: mnist_caffe mnist_tf LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(ARMNN_LIB) ./mnist_caffe LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(ARMNN_LIB) ./mnist_tf

however,the error happened as fellow: /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: 当搜索用于 /home/zoey/armnn-devenv/google/x86_64_pb_install/lib/libprotobuf.so 时跳过不兼容的 -lprotobuf /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: 当搜索用于 /home/zoey/armnn-devenv/google/x86_64_pb_install/lib/libprotobuf.a 时跳过不兼容的 -lprotobuf /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: 当搜索用于 //usr/local/lib/libprotobuf.so 时跳过不兼容的 -lprotobuf /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: 当搜索用于 //usr/local/lib/libprotobuf.a 时跳过不兼容的 -lprotobuf /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: 找不到 -lprotobuf

thank you for helping me solve the problem

Shada commented 5 years ago

You should build with protobuf for arm, not for x86_64.

change: PROTOBUF =/home/zoey/armnn-devenv/google/x86_64_pb_install/lib to: PROTOBUF =/home/zoey/armnn-devenv/google/arm64_pb_install/lib