Paddle hope to support "out of source build"

acruukt9  于 2022-04-21  发布在  Java
关注(0)|答案(0)|浏览(121)

System information

  • PaddlePaddle version: 838e36e, the latest develop branch

To Reproduce

assume the file structure is:

$ ls
Paddle

then type

$ mkdir -p build
cd build
cmake ../Paddle -DWITH_PYTHON=OFF -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCUDA_ARCH_NAME=Turing -DON_INFER=ON -DWITH_MKL=OFF
make -j

The above instructions will create a build folder beside Paddle instead of inside Paddle folder to build Paddle library.

$ ls
build Paddle

It is called out of source build. The out of source build can give people many advantages, such as grepping information in source folder without interference from build folder.

However, now using out of source build will encounter invalid path error at last step:

[100%] Built target paddle_fluid_c_shared
...
cp: cannot stat '/test/workspace/paddle/build/../paddle/fluid/framework/io/crypto/cipher.h': No such file or directory

Other info / logs

[100%] Built target paddle_fluid_c_shared
Scanning dependencies of target inference_lib_dist
copying /test/workspace/paddle/build-dev/third_party/threadpool/src/extern_threadpool/ThreadPool.h -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/threadpool
copying /test/workspace/paddle/build-dev/third_party/cudaerror/data -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/cudaerror/data
copying /test/workspace/paddle/build-dev/CMakeCache.txt -> /test/workspace/paddle/build-dev/fluid_inference_install_dir
copying /test/workspace/paddle/build-dev/third_party/install/openblas/lib -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/openblas
copying /test/workspace/paddle/build-dev/third_party/install/openblas/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/openblas
copying /test/workspace/paddle/build-dev/third_party/install/gflags/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/gflags
copying /test/workspace/paddle/build-dev/third_party/install/gflags/lib/libgflags.a -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/gflags/lib
copying /test/workspace/paddle/build-dev/third_party/install/glog/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/glog
copying /test/workspace/paddle/build-dev/third_party/install/glog/lib/libglog.a -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/glog/lib
copying /test/workspace/paddle/build-dev/third_party/install/cryptopp/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/cryptopp
copying /test/workspace/paddle/build-dev/third_party/install/cryptopp/lib/libcryptopp.a -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/cryptopp/lib
copying /test/workspace/paddle/build-dev/third_party/install/xxhash/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/xxhash
copying /test/workspace/paddle/build-dev/third_party/install/xxhash/lib/libxxhash.a -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/xxhash/lib
copying /test/workspace/paddle/build-dev/third_party/install/protobuf/include -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/protobuf
copying /test/workspace/paddle/build-dev/third_party/install/protobuf/lib/libprotobuf.a -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/third_party/install/protobuf/lib
copying /test/workspace/paddle/Paddle/paddle/fluid/inference/api/paddle_*.h -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/paddle/include
copying /test/workspace/paddle/build-dev/paddle/fluid/inference/libpaddle_fluid.* -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/paddle/lib
copying /test/workspace/paddle/build-dev/paddle/fluid/framework/framework.pb.h -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/paddle/include/internal
copying /test/workspace/paddle/build-dev/../paddle/fluid/framework/io/crypto/cipher.h -> /test/workspace/paddle/build-dev/fluid_inference_install_dir/paddle/include/crypto/
cp: cannot stat '/test/workspace/paddle/build-dev/../paddle/fluid/framework/io/crypto/cipher.h': No such file or directory
CMakeFiles/inference_lib_dist.dir/build.make:84: recipe for target 'inference_lib_dist' failed
make[2]:***[inference_lib_dist] Error 1
CMakeFiles/Makefile2:2605: recipe for target 'CMakeFiles/inference_lib_dist.dir/all' failed
make[1]:***[CMakeFiles/inference_lib_dist.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make:***[all] Error 2

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题