MegCC icon indicating copy to clipboard operation
MegCC copied to clipboard

compile error when build megcc

Open alanguo1234 opened this issue 2 years ago • 3 comments

hi I get the latest source code, I build megcc source code as the user guide, the step as follows:

  1. apt-get install cmake ninja-build 2./third_party/prepare.sh
  2. cd megcc/compiler
  3. mkdir build
  4. cmake .. -G Ninja
  5. ninja

the error log as below: ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:19: error: ‘kernel_exporter’ has not been declared export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~~~~~~~~~~~~~~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:36: error: ‘dump_info’ has not been declared export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~~~~~~~~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:45: error: expected ‘,’ or ‘...’ before ‘->’ token export_cv_opr(kernel_exporter, dump_info->cv_impl); ^~ ../tools/mgb-to-tinynn/mgb-to-tinynn.cpp:102:54: error: ISO C++ forbids declaration of ‘export_cv_opr’ with no type [-fpermissive] export_cv_opr(kernel_exporter, dump_info->cv_impl);

alanguo1234 avatar Feb 16 '23 13:02 alanguo1234

which platform it was compiled?

yeasoon avatar Feb 21 '23 05:02 yeasoon

the build error have been fixed. thanks.

by the way, OpBuilder::InsertionGuard _(m_builder); I don't find any description about var define with _ at cppreference

alanguo1234 avatar Feb 22 '23 07:02 alanguo1234

this is in mlir project and not the description of c++

yeasoon avatar Mar 01 '23 01:03 yeasoon