fatal error: snappy.h: No such file or directory
Created by: zhaofenqiang
My host machine is ubuntu 16.04. And PaddlePaddle for host following this can be successfully built.
Now I wanted to build PaddlePaddle for Raspberry Pi following this guide. I used this command to build PaddlePaddle:
cmake -DCMAKE_SYSTEM_NAME=RPi -CMAKE_INSTALL_PREFIX=/home/zfq/Paddle/build/CAPI_ACL_RPi -DCMAKE_BUILD_TYPE=Debug -DWITH_C_API=ON -DWITH_SWIG_PY=OFF -DRPI_TOOLCHAIN=/home/zfq/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64 -DWITH_GPU=OFF -DWITH_PYTHON=OFF ..
And then encountered the error:
/home/zfq/Paddle/build/third_party/snappy_stream/src/extern_snappystream/src/osnappystream.cpp:11:20: fatal error: snappy.h: No such file or directory #include "snappy.h"
I found the "snappy.h" at third_party/snappy/src/extern_snappy
, so I modified the #include
by using absolute path as a workaround.
But after this I met this error:
/home/zfq/Paddle/build/third_party/snappy/src/extern_snappy/snappy.h:45:33: fatal error: snappy-stubs-public.h: No such file or directory #include "snappy-stubs-public.h"
I also solved it by modified #include
.
After this I met this:
/home/zfq/Paddle/paddle/math/MathFunctions.h:39:19: fatal error: cblas.h: No such file or directory #include <cblas.h>
Now I am confused, does anyone know why? Maybe the raspberry_pi.cmake has some problem? Thank you in advance!