UIUC-ChenLab / ScaleHLS-HIDA

Other
38 stars 3 forks source link

error: no viable conversion from returned value of type 'SmallVector<int64_t, 4>' to function return type 'SmallVector<int64_t, (default) 6>' #5

Open Tulta21 opened 4 days ago

Tulta21 commented 4 days ago

FAILED: tools/scalehls/lib/Dialect/HLS/CMakeFiles/obj.MLIRHLS.dir/HLS.cpp.o /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/scalehls/lib/Dialect/HLS -I../lib/Dialect/HLS -Iinclude -I../polygeist/llvm-project/llvm/include -I../polygeist/llvm-project/llvm/../mlir/include -I../include -Itools/scalehls/include -isystem tools/mlir/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -D_GNU_SOURCE -D_DEBUG -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-exceptions -fno-rtti -std=c++17 -MD -MT tools/scalehls/lib/Dialect/HLS/CMakeFiles/obj.MLIRHLS.dir/HLS.cpp.o -MF tools/scalehls/lib/Dialect/HLS/CMakeFiles/obj.MLIRHLS.dir/HLS.cpp.o.d -o tools/scalehls/lib/Dialect/HLS/CMakeFiles/obj.MLIRHLS.dir/HLS.cpp.o -c /home/wps/scalehls-hida/lib/Dialect/HLS/HLS.cpp /home/wps/scalehls-hida/lib/Dialect/HLS/HLS.cpp:1214:10: warning: local variable 'actualFactors' will be copied despite being returned by name [-Wreturn-std-move] return actualFactors; ^~~~~ /home/wps/scalehls-hida/lib/Dialect/HLS/HLS.cpp:1214:10: note: call 'std::move' explicitly to avoid copying return actualFactors; ^~~~~ std::move(actualFactors) /home/wps/scalehls-hida/lib/Dialect/HLS/HLS.cpp:1214:10: error: no viable conversion from returned value of type 'SmallVector<[...], 4>' to function return type 'SmallVector<[...], (default) 6>' return actualFactors; ^~~~~ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1225:3: note: candidate constructor not viable: no known conversion from 'SmallVector<int64_t, 4>' (aka 'SmallVector<long, 4>') to 'std::initializer_list' for 1st argument SmallVector(std::initializer_list IL) : SmallVectorImpl(N) { ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1235:3: note: candidate constructor not viable: no known conversion from 'SmallVector<int64_t, 4>' (aka 'SmallVector<long, 4>') to 'const llvm::SmallVector<long, 6> &' for 1st argument SmallVector(const SmallVector &RHS) : SmallVectorImpl(N) { ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1245:3: note: candidate constructor not viable: no known conversion from 'SmallVector<int64_t, 4>' (aka 'SmallVector<long, 4>') to 'llvm::SmallVector<long, 6> &&' for 1st argument SmallVector(SmallVector &&RHS) : SmallVectorImpl(N) { ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1250:3: note: candidate constructor not viable: no known conversion from 'SmallVector<int64_t, 4>' (aka 'SmallVector<long, 4>') to 'SmallVectorImpl &&' for 1st argument SmallVector(SmallVectorImpl &&RHS) : SmallVectorImpl(N) { ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1209:12: note: explicit constructor is not a candidate explicit SmallVector(size_t Size, const T &Value = T()) ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1220:12: note: explicit constructor is not a candidate explicit SmallVector(const iterator_range &R) ^ ../polygeist/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1231:12: note: explicit constructor is not a candidate explicit SmallVector(ArrayRef A) : SmallVectorImpl(N) { ^ 1 warning and 1 error generated. [4882/5114] Building CXX object tools/mlir/lib/CAPI...CAPIRegisterEverything.dir/RegisterEverything.cpp.o ninja: build stopped: subcommand failed.

Tulta21 commented 2 days ago

已解决,原因是clang版本太低不兼容,换了一个16.0版本的clang后就好了