10 Windows10环境下编译DolphinDB Py Plugin插件出现的报错

我需要在dolphinbdb中调用一个自己写的python函数,这个函数调用了pands和numpy,在dolphindb里重新实现工作量太大,于是就想编译官方的插件帮助,结果一直编译出错。

具体错误如下:

在执行完cmake -DPYTHON:STRING=3.7 ../ -G "MinGW Makefiles"之后,执行mingw32-make -j4,显示:

D:\DolphinDBPlugin\DolphinDBPlugin-master\py\build>mingw32-make -j4

mingw32-make[2]: *** No rule to make target '../bin/windows/python37.dll', needed by 'libPluginPy.dll'.  Stop.

mingw32-make[2]: *** Waiting for unfinished jobs....

[ 25%] Building CXX object CMakeFiles/PluginPy.dir/src/PyInteract.cpp.obj

[ 50%] Building CXX object CMakeFiles/PluginPy.dir/src/PyResource.cpp.obj

[ 75%] Building CXX object CMakeFiles/PluginPy.dir/src/TypeConversion.cpp.obj

mingw32-make[1]: *** [CMakeFiles\Makefile2:99: CMakeFiles/PluginPy.dir/all] Error 2

mingw32-make: *** [Makefile:90: all] Error 2

这个问题我直接把python37.dll拷贝到了报错的位置上../bin/windows/python37.dll,然后似乎解决掉了,再次执行mingw32-make -j4

报错信息:

D:\DolphinDBPlugin\DolphinDBPlugin-master\py\build>mingw32-make -j4

Consolidate compiler generated dependencies of target PluginPy

[ 25%] Linking CXX shared library libPluginPy.dll

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(PyResource.cpp.obj):PyResource.cpp:(.rdata$_ZTV10PyResource[_ZTV10PyResource]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(PyResource.cpp.obj):PyResource.cpp:(.rdata$_ZTV10PyResource[_ZTV10PyResource]+0x440): undefined reference to `String::assign(SmartPointer<Constant> const&)'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV8DateHour[_ZTV8DateHour]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV8DateTime[_ZTV8DateTime]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV13NanoTimestamp[_ZTV13NanoTimestamp]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV9Timestamp[_ZTV9Timestamp]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV5Month[_ZTV5Month]+0x380): undefined reference to `Constant::serialize(char*, int, int, int, int, int&, int&) const'

D:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\PluginPy.dir/objects.a(TypeConversion.cpp.obj):TypeConversion:(.rdata$_ZTV4Date[_ZTV4Date]+0x380): more undefined references to `Constant::serialize(char*, int, int, int, int, int&, int&) const' follow

collect2.exe: error: ld returned 1 exit status

mingw32-make[2]: *** [CMakeFiles\PluginPy.dir\build.make:135: libPluginPy.dll] Error 1

mingw32-make[1]: *** [CMakeFiles\Makefile2:99: CMakeFiles/PluginPy.dir/all] Error 2

mingw32-make: *** [Makefile:90: all] Error 2

到这实在是不懂了,有没有大哥来教一下这是啥情况

请先 登录 后评论

2 个回答

wale

看上去是插件的分支与server的libDolphinDB.dll版本不匹配造成的。 你的serer是用了哪个版本,插件是哪个分支?注意:插件分支应与DolphinDB Server的版本相匹配,即若DolphinDB Server是1.30版本,插件应用release130分支,若DolphinDB Server是2.00版本,插件应该用release200分支,其他版本依此类推。

请先 登录 后评论
Minxing Zou

想获取一些相关信息,我这边试一下。

1、插件的git项目是github还是gitee.com上的,是否是最新的,分支是哪个分支。

2、所用到的libDolphinDB.dll是哪个版本的dolphindb拷贝过来的。

请先 登录 后评论