Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译时pocketfft相关的报错 #69299

Open
Whisper-jack opened this issue Nov 11, 2024 · 6 comments
Open

编译时pocketfft相关的报错 #69299

Whisper-jack opened this issue Nov 11, 2024 · 6 comments
Assignees
Labels

Comments

@Whisper-jack
Copy link

请提出你的问题 Please ask your question

HEAD 目前位于 8b6b61d fix deprecated-copy warning
patching file linux.cc
[ 7%] No configure step for 'extern_gloo'
[ 7%] Performing build step for 'extern_gloo'
-- Build type not set -- defaulting to Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lijiajie/桌面/inference/resource/Paddle/third_party/gloo/src/extern_gloo/build
Consolidate compiler generated dependencies of target gloo
[ 2%] Building CXX object gloo/CMakeFiles/gloo.dir/common/linux.cc.o
[ 5%] Linking CXX static library libgloo.a
[100%] Built target gloo
[ 7%] Performing install step for 'extern_gloo'
[ 7%] Completed 'extern_gloo'
[ 7%] Built target extern_gloo
[ 7%] Creating directories for 'extern_pybind'
[ 7%] No download step for 'extern_pybind'
[ 7%] No update step for 'extern_pybind'
[ 7%] No patch step for 'extern_pybind'
[ 7%] No configure step for 'extern_pybind'
[ 7%] Performing build step for 'extern_pybind'
[ 7%] No install step for 'extern_pybind'
[ 7%] No test step for 'extern_pybind'
[ 7%] Completed 'extern_pybind'
[ 7%] Built target extern_pybind
[ 7%] Creating directories for 'extern_cryptopp'
[ 7%] No download step for 'extern_cryptopp'
[ 7%] No update step for 'extern_cryptopp'
[ 7%] Performing patch step for 'extern_cryptopp'
[ 7%] Performing configure step for 'extern_cryptopp'
-- extern_cryptopp configure command succeeded. See also /home/lijiajie/桌面/inference/resource/Paddle/third_party/cryptopp/src/extern_cryptopp-stamp/extern_cryptopp-configure-.log
[ 7%] Performing build step for 'extern_cryptopp'
Consolidate compiler generated dependencies of target cryptopp-object
[ 98%] Built target cryptopp-object
[ 99%] Built target cryptopp-shared
[100%] Built target cryptopp-static
[ 7%] Performing install step for 'extern_cryptopp'
-- extern_cryptopp install command succeeded. See also /home/lijiajie/桌面/inference/resource/Paddle/third_party/cryptopp/src/extern_cryptopp-stamp/extern_cryptopp-install-
.log
[ 7%] Completed 'extern_cryptopp'
[ 7%] Built target extern_cryptopp
[ 7%] Creating directories for 'extern_utf8proc'
[ 8%] No download step for 'extern_utf8proc'
[ 8%] No update step for 'extern_utf8proc'
[ 8%] No patch step for 'extern_utf8proc'
[ 8%] Performing configure step for 'extern_utf8proc'
-- extern_utf8proc configure command succeeded. See also /home/lijiajie/桌面/inference/resource/Paddle/third_party/utf8proc/src/extern_utf8proc-stamp/extern_utf8proc-configure-.log
[ 8%] Performing build step for 'extern_utf8proc'
Consolidate compiler generated dependencies of target utf8proc
[100%] Built target utf8proc
[ 8%] Performing install step for 'extern_utf8proc'
[100%] Built target utf8proc
Install the project...
-- Install configuration: "Release"
-- Installing: /home/lijiajie/桌面/inference/resource/Paddle/third_party/install/utf8proc/lib/libutf8proc.a
-- Up-to-date: /home/lijiajie/桌面/inference/resource/Paddle/third_party/install/utf8proc/include/utf8proc.h
[ 8%] Completed 'extern_utf8proc'
[ 8%] Built target extern_utf8proc
[ 8%] Creating directories for 'extern_warpctc'
[ 8%] No download step for 'extern_warpctc'
[ 8%] No update step for 'extern_warpctc'
[ 8%] No patch step for 'extern_warpctc'
[ 8%] Performing configure step for 'extern_warpctc'
-- extern_warpctc configure command succeeded. See also /home/lijiajie/桌面/inference/resource/Paddle/third_party/warpctc/src/extern_warpctc-stamp/extern_warpctc-configure-
.log
[ 8%] Performing build step for 'extern_warpctc'
Consolidate compiler generated dependencies of target warpctc
[100%] Built target warpctc
[ 8%] Performing install step for 'extern_warpctc'
[100%] Built target warpctc
Install the project...
-- Install configuration: "Release"
-- Installing: /home/lijiajie/桌面/inference/resource/Paddle/third_party/install/warpctc/lib/libwarpctc.so
-- Up-to-date: /home/lijiajie/桌面/inference/resource/Paddle/third_party/install/warpctc/include/ctc.h
[ 8%] Completed 'extern_warpctc'
[ 8%] Built target extern_warpctc
[ 8%] Performing build step for 'extern_pocketfft'
Error copying directory from "/home/lijiajie/桌面/inference/resource/Paddle/third_party/pocketfft" to "/home/lijiajie/桌面/inference/resource/Paddle/third_party/pocketfft/src/extern_pocketfft".
make[2]: *** [CMakeFiles/extern_pocketfft.dir/build.make:89:third_party/pocketfft/src/extern_pocketfft-stamp/extern_pocketfft-build] 错误 1
make[1]: *** [CMakeFiles/Makefile2:4162:CMakeFiles/extern_pocketfft.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2

@Whisper-jack
Copy link
Author

Ubuntu 20.04进行cpu编译
编译执行了
git submodule sync --recursive
git submodule update --recursive
cmake -DPY_VERSION=3.7 -DWITH_TESTING=OFF -DWITH_MKL=ON -DWITH_GPU=OFF -DON_INFER=ON
cmake

关于第三方库缺少文件问题:
已经重新clone过pocketfft
https://gitlab.mpcdf.mpg.de/mtr/pocketfft.git

@Whisper-jack
Copy link
Author

屏幕截图 2024-11-11 205246

@zxcd
Copy link
Contributor

zxcd commented Nov 12, 2024

手动clone过pocketfft之后需要重新cmake一下

@Whisper-jack
Copy link
Author

[ 41%] Linking CXX shared library libphi.so
/usr/bin/ld: 找不到 -lpocketfft
collect2: error: ld returned 1 exit status
make[2]: *** [paddle/phi/CMakeFiles/phi.dir/build.make:13729:paddle/phi/libphi.so] 错误 1
make[1]: *** [CMakeFiles/Makefile2:4871:paddle/phi/CMakeFiles/phi.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2
编译时找不到libpocketfft.so的路径

libpocketfft.so已经在/Paddle/third_party/pocketfft/build 路径下cmake出来了
然后我在/Paddle/paddle/phi/CMakeLists.txt中添加路径
find_library(POCKETFFT_LIBRARY pocketfft PATHS /home/lijiajie/桌面/inference/resource/Paddle/third_party/pocketfft/build NO_DEFAULT_PATH)
#添加pocketfft连接
target_link_libraries(phi ${POCKETFFT_LIBRARY})
image
image

但是编译cmake后make还是会报错,请问是什么原因呢,拜托了
cmake -DPY_VERSION=3.7
-DWITH_TESTING=OFF
-DWITH_MKL=ON
-DWITH_GPU=OFF
-DON_INFER=ON

make -j2

@Whisper-jack
Copy link
Author

单独写了一个CMakeList.txt测试是能找到这个路径下的libpocketfft.so
image

@Whisper-jack
Copy link
Author

推理库能否使用交叉编译链编出来,使用ARM编译链的gcc,上面那个问题是在x86上编译的,但是一直解决不了。
我们最终的目的是在arm环境下运行OCR,现在arm环境下编译cmake也有很多问题
但是推理库的下载版本没有arm环境的,所以想自己编译。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants