MobileFineTuner icon indicating copy to clipboard operation
MobileFineTuner copied to clipboard

Issues when building from source

Open hoanglocla9 opened this issue 8 months ago • 2 comments

Hi, I have tried to follow the instructions and build the project from source. But when I ran make, it returned syntax errors as follows "operator/finetune_ops/core/memory_manager.h:186:64: error: could not convert ‘""’ from ‘const char [1]’ to ‘const std::string&’ {aka ‘const std::__cxx11::basic_string&’} 186 | static void log_memory_status(const std::string& context = ""); | ^~ | | | const char [1] "

Your project is very interesting, and I hope to hear from you soon.

Regards

hoanglocla9 avatar Mar 20 '26 18:03 hoanglocla9

Forward: @BESTTOOLBOX @AndyLu666 @LYT0830-dku

BESTTOOLBOX avatar Mar 23 '26 08:03 BESTTOOLBOX

Thanks for reporting this. This is a portability issue on our side rather than a problem with your build steps.

operators/finetune_ops/core/memory_manager.h uses std::string in its public declarations, but the header does not include <string> explicitly and currently relies on transitive includes. On some compiler/stdlib combinations this causes the default argument in

static void log_memory_status(const std::string& context = "");

to fail to compile.

The proper fix is to include <string> directly in memory_manager.h (and ideally <cstdlib> as well, since the header also uses std::free).

AndyLu666 avatar Mar 23 '26 08:03 AndyLu666