make pysail后:
In file included from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/attr.h:13, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/pybind11.h:44, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/src/bind.cpp:17: /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::detail::error_string()’: /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h:442:36: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 442 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^~ In file included from /home/xuanjiexiao/anaconda3/include/python3.11/Python.h:42, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/detail/common.h:112, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/pytypes.h:12, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h:13, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/attr.h:13, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/pybind11.h:44, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/src/bind.cpp:17: /home/xuanjiexiao/anaconda3/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’} 22 | typedef struct _frame PyFrameObject; | ^~~~~~ In file included from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/attr.h:13, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/pybind11.h:44, from /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/src/bind.cpp:17: /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h:442:75: error: expected primary-expression before ‘>’ token 442 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h:442:77: error: expected primary-expression before ‘)’ token 442 | " " + handle(frame->f_code->co_filename).cast<std::string>() + | ^ /home/xuanjiexiao/Downloads/Release_230501-public/sophon-sail_20230605_085400/sophon-sail_3.5.0/sophon-sail/3rdparty/pybind11/include/pybind11/cast.h:444:29: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’} 444 | handle(frame->f_code->co_name).cast<std::string>() + "\n"; | ^~ In file included from /home/xuanjiexiao/anaconda3/include/python3.11/Python.h:42, |
原因分析:
python版本太高导致的
解决方案;
利用conda创建一个虚拟的环境,然后编译,然后得到对应的包,后面的步骤就一样了。
注意:我使用的python由原来的3.11降级为3.8后可以使用了