1. check paddle_inference exists
2. check CMakeLists exists
3. compile
4. cmake
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The CXX compiler identification is GNU 8.4.0
-- The C compiler identification is GNU 8.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
messageOFF
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/build
[ 50%] Building CXX object CMakeFiles/resnet50_test.dir/resnet50_test.cc.o
[100%] Linking CXX executable resnet50_test
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `deflate'
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `deflateEnd'
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `inflateInit2_'
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `deflateInit2_'
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `inflateEnd'
/usr/bin/ld: /Work/problem/xpu_l3/Paddle-Inference-Demo/c++/xpu/resnet50/../../lib/paddle_inference/paddle/lib/libpaddle_inference.so: undefined reference to `inflate'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/resnet50_test.dir/build.make:105: resnet50_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/resnet50_test.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
问题描述 Issue Description
在xpu上使用Paddle编译出来的inference的包编译Paddle-Inference-Demo推理文件的时候出现如下错误:
版本&环境信息 Version & Environment Information
编译的Paddle是develop版本的xpu,环境信息如下:
Paddle本体编译脚本如下:
然后使用编译产物:build/paddle_inference_install_dir在paddle-inference-demo中进行二次编译,如: