本文介绍了构建幕府将军时出错:没有匹配的函数来调用"PyUnicode_AsUTF8AndSize"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试按照此链接中给出的说明手动编译将军 https://github.com/shogun-toolbox/shogun/blob/develop/doc/readme/INSTALL.md#manual
I am trying to manually compile shogun as per the instructions given in this link https://github.com/shogun-toolbox/shogun/blob/develop/doc/readme/INSTALL.md#manual
这是我在运行make时的终端输出:
Here is my terminal output on running make:
$make -j4
[100%] Building CXX object src/interfaces/python/CMakeFiles/_interface_python.dir/sg_print_functions.cpp.o
In file included from /Users/krishna/shogun/build/src/interfaces/python/shogunPYTHON_wrap.cxx:6158:
/Users/krishna/shogun/src/shogun/distance/DirectorDistance.h:61:3: warning: control may reach end of non-void function [-Wreturn-type]
}
^
In file included from /Users/krishna/shogun/build/src/interfaces/python/shogunPYTHON_wrap.cxx:6196:
/Users/krishna/shogun/src/shogun/evaluation/TimeSeriesSplitting.h:80:23: warning: 'get_name' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual const char* get_name() const
^
/Users/krishna/shogun/src/shogun/base/SGObject.h:180:22: note: overridden virtual function is here
virtual const char* get_name() const = 0;
^
/Users/krishna/shogun/build/src/interfaces/python/shogunPYTHON_wrap.cxx:7696:39: error: no matching function for call to 'PyUnicode_AsUTF8AndSize'
const char* str = PyUnicode_AsUTF8AndSize(o, &len);
^~~~~~~~~~~~~~~~~~~~~~~
/Users/krishna/.edm/envs/py3/include/python3.6m/unicodeobject.h:1126:20: note: candidate function not viable: no known conversion from 'int64_t *' (aka 'long long *') to 'Py_ssize_t *' (aka 'long *') for 2nd
argument
PyAPI_FUNC(char *) PyUnicode_AsUTF8AndSize(
^
/Users/krishna/shogun/build/src/interfaces/python/shogunPYTHON_wrap.cxx:10278:25: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent
in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
char* fname=tmpnam(NULL);
^
/usr/include/stdio.h:275:1: note: 'tmpnam' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
^/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
^
/Users/krishna/shogun/build/src/interfaces/python/shogunPYTHON_wrap.cxx:10322:25: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent
in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
char* fname=tmpnam(NULL);
^
/usr/include/stdio.h:275:1: note: 'tmpnam' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
^
/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
^
4 warnings and 1 error generated.
make[2]: *** [src/interfaces/python/CMakeFiles/_interface_python.dir/shogunPYTHON_wrap.cxx.o] Error 1
make[1]: *** [src/interfaces/python/CMakeFiles/_interface_python.dir/all] Error 2
make: *** [all] Error 2
谢谢.
推荐答案
这是一个错误,应通过ca4360e483c115444864bef0925417f479923a43
commit
this was a bug and should be fixed by ca4360e483c115444864bef0925417f479923a43
commit
这篇关于构建幕府将军时出错:没有匹配的函数来调用"PyUnicode_AsUTF8AndSize"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!