Skip to content

codegen.cc:150:32: error: use of deleted function #4596

@kevinyuan

Description

@kevinyuan

Hi,

The latest code has compilation errors with tvm/src/relay/backend/contrib/codegen_c/codegen.cc:


[ 90%] Building CXX object CMakeFiles/tvm.dir/src/runtime/cpu_device_api.cc.o
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc: In member function ‘void tvm::relay::contrib::CSourceCodegen::GenCFunc(const tvm::relay::Function&)’:
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:150:32: error: use of deleted function ‘tvm::relay::contrib::CodegenC::CodegenC(tvm::relay::contrib::CodegenC&&)’
auto builder = CodegenC(sid);
^
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:39:7: note: ‘tvm::relay::contrib::CodegenC::CodegenC(tvm::relay::contrib::CodegenC&&)’ is implicitly deleted because the default definition would be ill-formed:
class CodegenC : public ExprVisitor, public CodegenCBase {
^
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:39:7: error: use of deleted function ‘tvm::relay::contrib::CodegenCBase::CodegenCBase(tvm::relay::contrib::CodegenCBase&&)’
In file included from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:28:0:
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen_c.h:70:7: note: ‘tvm::relay::contrib::CodegenCBase::CodegenCBase(tvm::relay::contrib::CodegenCBase&&)’ is implicitly deleted because the default definition would be ill-formed:
class CodegenCBase {
^
/home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen_c.h:70:7: error: use of deleted function ‘std::basic_ostringstream::basic_ostringstream(const std::basic_ostringstream&)’
In file included from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20:0,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/sstream:387:11: note: ‘std::basic_ostringstream::basic_ostringstream(const std::basic_ostringstream&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ostringstream : public basic_ostream<_CharT, _Traits>
^
/usr/include/c++/4.8.2/sstream:387:11: error: use of deleted function ‘std::basic_ostream::basic_ostream(const std::basic_ostream&)’
In file included from /usr/include/c++/4.8.2/istream:39:0,
from /usr/include/c++/4.8.2/sstream:38,
from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/ostream:58:11: note: ‘std::basic_ostream::basic_ostream(const std::basic_ostream&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/4.8.2/ostream:58:11: error: use of deleted function ‘std::basic_ios::basic_ios(const std::basic_ios&)’
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/istream:38,
from /usr/include/c++/4.8.2/sstream:38,
from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:

/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: note: ‘std::basic_ios::basic_ios(const std::basic_ios&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ios : public ios_base
^
In file included from /usr/include/c++/4.8.2/ios:42:0,
from /usr/include/c++/4.8.2/istream:38,
from /usr/include/c++/4.8.2/sstream:38,
from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/bits/ios_base.h:786:5: error: ‘std::ios_base::ios_base(const std::ios_base&)’ is private
ios_base(const ios_base&);
^
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/istream:38,
from /usr/include/c++/4.8.2/sstream:38,
from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: error: within this context
class basic_ios : public ios_base
^
In file included from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20:0,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/sstream:387:11: error: use of deleted function ‘std::basic_ios::basic_ios(const std::basic_ios&)’
class basic_ostringstream : public basic_ostream<_CharT, _Traits>
^
/usr/include/c++/4.8.2/sstream:387:11: error: use of deleted function ‘std::basic_stringbuf::basic_stringbuf(const std::basic_stringbuf&)’
/usr/include/c++/4.8.2/sstream:64:11: note: ‘std::basic_stringbuf::basic_stringbuf(const std::basic_stringbuf&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
^
In file included from /usr/include/c++/4.8.2/ios:43:0,
from /usr/include/c++/4.8.2/istream:38,
from /usr/include/c++/4.8.2/sstream:38,
from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/streambuf:802:7: error: ‘std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits]’ is private
basic_streambuf(const basic_streambuf& __sb)
^
In file included from /home/kevinyuan/dev/tvm/3rdparty/dmlc-core/include/dmlc/logging.h:20:0,
from /home/kevinyuan/dev/tvm/include/tvm/node/functor.h:26,
from /home/kevinyuan/dev/tvm/include/tvm/relay/expr_functor.h:28,
from /home/kevinyuan/dev/tvm/src/relay/backend/contrib/codegen_c/codegen.cc:19:
/usr/include/c++/4.8.2/sstream:64:11: error: within this context
class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
^
[ 91%] Building CXX object CMakeFiles/tvm.dir/src/runtime/dso_library.cc.o

make[2]: *** [CMakeFiles/tvm.dir/src/relay/backend/contrib/codegen_c/codegen.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/tvm.dir/all] Error 2
make: *** [all] Error 2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions