uTVM build fails if stale files are not removed manually

Currently (commit 705323592) it’s possible to get the following build error if USE_MICRO is enabled:

include/tvm/runtime/crt/memory.h:75:17: error: conflicting types for “MemoryManagerCreate” 75 | tvm_crt_error_t MemoryManagerCreate(MemoryManagerInterface** manager, uint8_t* memory_pool,

Full log here:

https://people.linaro.org/~gustavo.romero/tvm/build_error_01072020.log

That happens if any build previous to commit 705323592 is built and later one tries to build (even after a ‘make clean’) commit 705323592 or later on the same build dir because stale files removed by 705323592 are not removed correctly by the build system.

A workaround for that issue is to simply remove manually the stale files: $ rm -rf build/standalone_crt

A possible fix is to ensure that build/standalone_ctr is removed by ‘make clean’, generating a cmake file that lists top-level dir standalone_crt to be removed, like:

https://people.linaro.org/~gustavo.romero/tvm/utvm_remove_stale_files.diff

But since ‘cmake_clean.cmake’ is a generated file, it needs to get fixed in the build system instead.

The issue doesn’t happen if USE_MICRO is disabled.

2 Likes