首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Catboost C评估库API

使用Catboost C评估库API
EN

Stack Overflow用户
提问于 2020-06-03 14:19:28
回答 1查看 205关注 0票数 2

我想使用https://catboost.ai/docs/concepts/c-plus-plus-api_dynamic-c-pluplus-wrapper.html中提到的C Catboost API。这一页的第一步是:

链接所需的库(libcatboostmodel.so|dll|dylib)。

我不知道如何才能做到这一点。有人能帮我解决这个可能微不足道的疑问吗?一步一步的方法将是首选的。

作为第一步,我无法创建共享库(libcatboostmodel.so|dll|dylib)本身。在执行Makefile (make -f make/model_interface.CLANG50-LINUX-X86_64.makefile)时,我得到以下错误:

代码语言:javascript
复制
mkdir -p '/home/CPUser/CPP/catboost/catboost/libs/helpers'
/usr/bin/clang++ --target=x86_64-linux-gnu -c -o '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o' '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp' '-I/home/CPUser/CPP/catboost' '-I/home/CPUser/CPP/catboost' '-I/home/CPUser/CPP/catboost/contrib/libs/linux-headers' '-I/home/CPUser/CPP/catboost/contrib/libs/linux-headers/_nf' '-I/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include' '-I/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxxrt' '-I/home/CPUser/CPP/catboost/contrib/libs/zlib/include' '-I/home/CPUser/CPP/catboost/contrib/libs/double-conversion/include' '-fdebug-prefix-map=/home/CPUser/CPP/catboost=/-B' -Xclang -fdebug-compilation-dir -Xclang /tmp -pipe -m64 -O3 -g -ggnu-pubnames -fexceptions -fuse-init-array -W -Wall -Wno-parentheses -DFAKEID=5020880 '-DARCADIA_ROOT=/home/CPUser/CPP/catboost' '-DARCADIA_BUILD_ROOT=/home/CPUser/CPP/catboost' -D_THREAD_SAFE -D_PTHREADS -D_REENTRANT -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DNDEBUG -D__LONG_LONG_SUPPORTED -DSSE_ENABLED=1 -DSSE3_ENABLED=1 -DSSSE3_ENABLED=1 -DSSE41_ENABLED=1 -DSSE42_ENABLED=1 -DPOPCNT_ENABLED=1 -DCX16_ENABLED=1 -DCATBOOST_OPENSOURCE=yes -D_libunwind_ -nostdinc++ -fPIC -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt -mcx16 -fPIC -std=c++1z -Woverloaded-virtual -Wno-invalid-offsetof -Wno-attributes -Wno-dynamic-exception-spec -Wno-register -Wimport-preprocessor-directive-pedantic -Wno-c++17-extensions -Wno-exceptions -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-return-std-move -DCATBOOST_OPENSOURCE=yes -nostdinc++
warning: unknown warning option '-Wno-dynamic-exception-spec'; did you mean '-Wno-missing-exception-spec'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-c++17-extensions' [-Wunknown-warning-option]
warning: unknown warning option '-Wno-undefined-var-template'; did you mean '-Wno-undefined-internal'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-return-std-move' [-Wunknown-warning-option]
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:4:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/dynamic_iterator.h:3:
In file included from /home/CPUser/CPP/catboost/catboost/private/libs/index_range/index_range.h:9:
In file included from /home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:13:
In file included from /home/CPUser/CPP/catboost/util/generic/variant.h:28:
/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include/variant:1146:27: error: expected ';' after using declaration
  using _Bases::operator()...;
                          ^
/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include/variant:1146:9: error: using declaration contains unexpanded parameter pack '_Bases'
  using _Bases::operator()...;
        ^
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:4:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/dynamic_iterator.h:3:
In file included from /home/CPUser/CPP/catboost/catboost/private/libs/index_range/index_range.h:9:
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:446:16: error: expected '(' after 'if'
            if constexpr (sizeof...(TTail) == 0) {
               ^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:35: warning: unused parameter 'binSaver' [-Wunused-parameter]
        static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
                                  ^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:50: warning: unused parameter 'typeIndex' [-Wunused-parameter]
        static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
                                                 ^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:76: warning: unused parameter 'pData' [-Wunused-parameter]
        static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
                                                                           ^
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:7:
/home/CPUser/CPP/catboost/catboost/libs/helpers/maybe_owning_array_holder.h:161:12: error: expected '(' after 'if'
        if constexpr (std::is_same_v<std::remove_const_t<TDst>, TSrc>) {
           ^
/home/CPUser/CPP/catboost/catboost/libs/helpers/maybe_owning_array_holder.h:160:95: warning: unused parameter 'src' [-Wunused-parameter]
    TMaybeOwningArrayHolder<TDst> CreateOwningWithMaybeTypeCast(TMaybeOwningArrayHolder<TSrc> src) {
                                                                                              ^
8 warnings and 4 errors generated.
make/model_interface.CLANG7-LINUX-X86_64.makefile:197: recipe for target '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o' failed
make: *** [/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o] Error 1
EN

回答 1

Stack Overflow用户

发布于 2020-06-20 14:53:43

使用Clang 9代替解决了这个问题。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62175175

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档