kendryte / kendryte-standalone-sdk

Standalone SDK for kendryte K210
https://kendryte.com
Apache License 2.0
445 stars 161 forks source link

Use KendryteIDE with the latest SDK development to report errors #124

Open SunlifeV opened 3 years ago

SunlifeV commented 3 years ago

When I used the latest SDK to cooperate with IDE development, I wrote the SDK path to the localDependency of the kendryte-package of the project directory, added the relevant header file path in the kendryte-package of the SDK, and then went to compile the result and the following error appeared.

Error message

[ INFO] kendryte_standalone-sdk/libkendryte_standalone-sdk.a(nncase_v1.cpp.obj): in function `nncase_v1_load_kmodel':
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:30: undefined reference to `nncase::runtime::interpreter::interpreter()'
[ INFO] kendryte_standalone-sdk/libkendryte_standalone-sdk.a(nncase_v1.cpp.obj): in function `.L0 ':
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:35: undefined reference to `nncase::runtime::interpreter::load_model(gsl::span<gsl::byte const>)'
[ INFO] kendryte_standalone-sdk/libkendryte_standalone-sdk.a(nncase_v1.cpp.obj): in function `.L0 ':
[ INFO] xxx://lib/nncase/v1/include/nncase/runtime/result.h:66: undefined reference to `nncase::runtime::host_runtime_tensor::mapped_buffer::~mapped_buffer()'
[ INFO] kendryte_standalone-sdk/libkendryte_standalone-sdk.a(nncase_v1.cpp.obj): in function `get_output':
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:40: undefined reference to `nncase::runtime::runtime_tensor::runtime_tensor()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:40: undefined reference to `nncase::runtime::interpreter::output_tensor(unsigned long)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:41: undefined reference to `nncase::runtime::runtime_tensor::runtime_tensor()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:41: undefined reference to `nncase::runtime::runtime_tensor::as_host()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:42: undefined reference to `nncase::runtime::host_runtime_tensor::mapped_buffer::mapped_buffer()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:42: undefined reference to `nncase::runtime::host_runtime_tensor::map(nncase::runtime::runtime_tensor&, nncase::runtime::host_runtime_tensor::map_access_)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:42: undefined reference to `nncase::runtime::host_runtime_tensor::mapped_buffer::operator=(nncase::runtime::host_runtime_tensor::mapped_buffer&&)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:42: undefined reference to `nncase::runtime::host_runtime_tensor::mapped_buffer::~mapped_buffer()'
[ INFO] kendryte_standalone-sdk/libkendryte_standalone-sdk.a(nncase_v1.cpp.obj): in function `.L0 ':
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:55: undefined reference to `nncase::runtime::interpreter::options()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:56: undefined reference to `nncase::runtime::interpreter::input_shape(unsigned long) const'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:57: undefined reference to `nncase::runtime::interpreter::input_desc(unsigned long) const'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:58: undefined reference to `nncase::runtime::runtime_tensor::runtime_tensor()'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:58: undefined reference to `nncase::runtime::host_runtime_tensor::create(nncase::_datatype, itlib::small_vector<unsigned long, 4ul, 0ul, std::allocator<unsigned long> >, gsl::span<gsl::byte>, bool, nncase::runtime::host_runtime_tensor::memory_pool_, unsigned long)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:59: undefined reference to `nncase::runtime::host_runtime_tensor::sync(nncase::runtime::runtime_tensor&, nncase::runtime::host_runtime_tensor::sync_op_, bool)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:60: undefined reference to `nncase::runtime::interpreter::input_tensor(unsigned long, nncase::runtime::runtime_tensor)'
[ INFO] xxx://lib/nncase/v1/nncase_v1.cpp:61: undefined reference to `nncase::runtime::interpreter::run()'
[ INFO] collect2.exe: error: ld returned 1 exit status
[ INFO] make.exe[2]: *** [CMakeFiles/xxx.dir/build.make:189: xxx] Error 1
[ INFO] make.exe[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/xxx.dir/all] Error 2
[ INFO] make.exe: *** [Makefile:84: all] Error 2
[ INFO] 
[ INFO] Build Error: xxx:/KendryteIDE/LocalPackage/cmake/bin/cmake.exe exited with code 2.

[ERROR] Build failed.
    at CMakeService.<anonymous> (xxx:/KendryteIDE/Application/app_1.34.1-beta_20190802.2/resources/app/out/vs/workbench/workbench.main.js:97659:27)
    at Generator.next (<anonymous>)
    at fulfilled (xxx:/KendryteIDE/Application/app_1.34.1-beta_20190802.2/resources/app/out/vs/workbench/workbench.main.js:2304:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] Build failed.

Document version

0ce252641826d65e12621347992cc9865874e6e1

System

Windows 10 64

noahzhy commented 3 years ago

I was meet same question but solve it. In my case, I replaced -G "Unix Makefiles" to -G "MinGW Makefiles" in Windows.

cmake .. -DPROJ=fd_cam -DTOOLCHAIN="C:/Program Files/kendryte-toolchain/bin" -G "MinGW Makefiles"