Mac m1 本机编译develop分支失败
- 环境
- 基础环境:python3.8、Mac M1
- paddle:develop分支
- 编译过程
- cmake
cmake .. \
-DPYTHON_LIBRARY=/Users/username/opt/anaconda3/envs/paddle_dev/lib \
-DPYTHON_INCLUDE_DIR=/Users/username/opt/anaconda3/envs/paddle_dev/include/python3.8 \
-DLD_LIBRARY_PATH=/Users/username/opt/anaconda3/envs/paddle_dev \
-DWITH_CONTRIB=OFF \
-DWITH_MKL=OFF \
-DWITH_MKLDNN=OFF \
-DWITH_AVX=OFF \
-DWITH_GPU=OFF \
-DWITH_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DON_INFER=ON \
-DWITH_PYTHON=ON \
-DPY_VERSION=3.8 \
-DWITH_XBYAK=OFF \
-DWITH_NV_JETSON=ON \
-DWITH_SYSTEM_BLAS=OFF
- make
make -j4
- 异常信息
[ 98%] Linking CXX static library libanalysis.a
[ 98%] Built target analysis
[ 98%] Building CXX object paddle/fluid/inference/api/CMakeFiles/analysis_predictor.dir/analysis_predictor.cc.o
In file included from /Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.cc:15:
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.h:138:28: warning: 'GetInputNames' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
std::vector<std::string> GetInputNames();
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/paddle_api.h:222:36: note: overridden virtual function is here
virtual std::vector<std::string> GetInputNames() { return {}; }
^
In file included from /Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.cc:15:
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.h:144:28: warning: 'GetOutputNames' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
std::vector<std::string> GetOutputNames();
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/paddle_api.h:233:36: note: overridden virtual function is here
virtual std::vector<std::string> GetOutputNames() { return {}; }
^
In file included from /Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.cc:15:
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/analysis_predictor.h:208:8: warning: 'ClearIntermediateTensor' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
void ClearIntermediateTensor();
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/inference/api/paddle_api.h:269:16: note: overridden virtual function is here
virtual void ClearIntermediateTensor() {}
^
3 warnings generated.
[ 98%] Linking CXX static library libanalysis_predictor.a
[ 98%] Built target analysis_predictor
[ 98%] Building CXX object paddle/fluid/pybind/CMakeFiles/op_function_common.dir/op_function_common.cc.o
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/pybind/op_function_common.cc:200:12: error: use of undeclared identifier 'PyUnicode_AsUTF8AndSize'
data = PyUnicode_AsUTF8AndSize(obj, &size);
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/pybind/op_function_common.cc:562:16: error: use of undeclared identifier 'PyUnicode_AsUTF8AndSize'
data = PyUnicode_AsUTF8AndSize(item, &size);
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/pybind/op_function_common.cc:581:16: error: use of undeclared identifier 'PyUnicode_AsUTF8AndSize'
data = PyUnicode_AsUTF8AndSize(item, &size);
^
/Users/username/code/developer-roadmap/recommand/Paddle/paddle/fluid/pybind/op_function_common.cc:646:17: error: use of undeclared identifier 'PyUnicode_AsUTF8AndSize'
key_ptr = PyUnicode_AsUTF8AndSize(obj, &key_len);
^
4 errors generated.
make[2]: *** [paddle/fluid/pybind/CMakeFiles/op_function_common.dir/op_function_common.cc.o] Error 1
make[1]: *** [paddle/fluid/pybind/CMakeFiles/op_function_common.dir/all] Error 2
make: *** [all] Error 2
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
你好,请问你是想编推理的包吗?如果把ON_INFER相关选项关掉会有问题吗?
你好,请问你是想编推理的包吗?如果把ON_INFER相关选项关掉会有问题吗?
试了下还是不行,报错信息与上面一样
这个编译命令是在哪儿看的?有尝试过官网上的教程吗? https://www.paddlepaddle.org.cn/documentation/docs/zh/install/compile/macos-compile.html
cmake .. -DPY_VERSION=3.7 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \
-DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
另外,请问下,可以直接使用官网上的安装包吗?是需要自己开发,所以有编译需求吗?
另外,请问下,可以直接使用官网上的安装包吗?是需要自己开发,所以有编译需求吗?
我在调研paddleRec的一个模型,这个模型依赖paddle develop的一个接口(paddle.distributed.ShowClickEntry),release版本还没有包含;所以想自己编译一下
麻烦尝试下develop的安装包,看下有没有你需要的接口,正常情况下develop的包是每天会编译上传的:python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html
mac m1编译的问题我们再看看。
麻烦尝试下develop的安装包,看下有没有你需要的接口,正常情况下develop的包是每天会编译上传的:python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html
mac m1编译的问题我们再看看。
感谢,我也试了mac intel机器编译通过了,谢谢支持
你好,现在Paddle已经有编译好的安装包了,请问你在什么任务场景下需要编译Paddle呀?比如是需要新增算子、还是需要修改飞桨源代码,或者有什么其他的用途呢?
Since you haven't replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。