lnis-uofu / LSOracle

IDEA project source files
MIT License
97 stars 41 forks source link

Compile error #107

Open sun123-cmd opened 3 weeks ago

sun123-cmd commented 3 weeks ago

Hello: Thanks for your good work~ While compiling source code as instructions in README file, I met the following error:

[ 70%] Building CXX object core/CMakeFiles/lsoracle.dir/lsoracle.cpp.o
In file included from /home/sun/eda/eda_attack/baseline/LSOracle/core/lsoracle.cpp:106:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/output/write_partition.hpp: In member function ‘void alice::write_partition_command::write_part(std::string)’:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/output/write_partition.hpp:75:21: error: ‘write_child’ is not a member of ‘oracle’
   75 |             oracle::write_child<network>(i, partitions, verilog);
      |                     ^~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/output/write_partition.hpp:75:40: error: expected primary-expression before ‘>’ token
   75 |             oracle::write_child<network>(i, partitions, verilog);
      |                                        ^
In file included from /home/sun/eda/eda_attack/baseline/LSOracle/core/lsoracle.cpp:142:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp: In member function ‘void alice::optimize_command::synth(std::string)’:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:79:27: error: ‘optimize_resynthesis’ is not a member of ‘oracle’
   79 |      ntk_result = oracle::optimize_resynthesis<mockturtle::aig_network>(partitions_jr, abc_exec);
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:79:71: error: expected primary-expression before ‘>’ token
   79 |      ntk_result = oracle::optimize_resynthesis<mockturtle::aig_network>(partitions_jr, abc_exec);
      |                                                                       ^
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:83:17: error: ‘optimization_strategy’ is not a member of ‘oracle’
   83 |         oracle::optimization_strategy strategy;
      |                 ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:85:3: error: ‘strategy’ was not declared in this scope
   85 |   strategy = oracle::optimization_strategy::depth;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:85:22: error: ‘oracle::optimization_strategy’ has not been declared
   85 |   strategy = oracle::optimization_strategy::depth;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:87:3: error: ‘strategy’ was not declared in this scope
   87 |   strategy = oracle::optimization_strategy::size;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:87:22: error: ‘oracle::optimization_strategy’ has not been declared
   87 |   strategy = oracle::optimization_strategy::size;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:89:3: error: ‘strategy’ was not declared in this scope
   89 |   strategy = oracle::optimization_strategy::balanced;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:89:22: error: ‘oracle::optimization_strategy’ has not been declared
   89 |   strategy = oracle::optimization_strategy::balanced;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:92:30: error: ‘optimize_basic’ is not a member of ‘oracle’
   92 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy, true);
      |                              ^~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:92:52: error: expected primary-expression before ‘>’ token
   92 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy, true);
      |                                                    ^
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:92:79: error: ‘strategy’ was not declared in this scope
   92 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy, true);
      |                                                                               ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:96:14: error: ‘optimization_strategy’ is not a member of ‘oracle’
   96 |      oracle::optimization_strategy strategy;
      |              ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:98:3: error: ‘strategy’ was not declared in this scope
   98 |   strategy = oracle::optimization_strategy::depth;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:98:22: error: ‘oracle::optimization_strategy’ has not been declared
   98 |   strategy = oracle::optimization_strategy::depth;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:100:3: error: ‘strategy’ was not declared in this scope
  100 |   strategy = oracle::optimization_strategy::size;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:100:22: error: ‘oracle::optimization_strategy’ has not been declared
  100 |   strategy = oracle::optimization_strategy::size;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:102:3: error: ‘strategy’ was not declared in this scope
  102 |   strategy = oracle::optimization_strategy::balanced;
      |   ^~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:102:22: error: ‘oracle::optimization_strategy’ has not been declared
  102 |   strategy = oracle::optimization_strategy::balanced;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:105:30: error: ‘optimize_basic’ is not a member of ‘oracle’
  105 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                              ^~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:105:52: error: expected primary-expression before ‘>’ token
  105 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                                                    ^
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/optimize.hpp:105:79: error: ‘strategy’ was not declared in this scope
  105 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                                                                               ^~~~~~~~
In file included from /home/sun/eda/eda_attack/baseline/LSOracle/core/lsoracle.cpp:147:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp: In member function ‘void alice::oracle_command::synth(std::string)’:
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:169:14: error: ‘optimization_strategy’ is not a member of ‘oracle’
  169 |      oracle::optimization_strategy strategy;
      |              ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:171:3: error: ‘strategy’ was not declared in this scope; did you mean ‘strategych’?
  171 |   strategy = oracle::optimization_strategy::depth;
      |   ^~~~~~~~
      |   strategych
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:171:22: error: ‘oracle::optimization_strategy’ has not been declared
  171 |   strategy = oracle::optimization_strategy::depth;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:173:3: error: ‘strategy’ was not declared in this scope; did you mean ‘strategych’?
  173 |   strategy = oracle::optimization_strategy::size;
      |   ^~~~~~~~
      |   strategych
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:173:22: error: ‘oracle::optimization_strategy’ has not been declared
  173 |   strategy = oracle::optimization_strategy::size;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:175:3: error: ‘strategy’ was not declared in this scope; did you mean ‘strategych’?
  175 |   strategy = oracle::optimization_strategy::balanced;
      |   ^~~~~~~~
      |   strategych
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:175:22: error: ‘oracle::optimization_strategy’ has not been declared
  175 |   strategy = oracle::optimization_strategy::balanced;
      |                      ^~~~~~~~~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:177:30: error: ‘optimize_basic’ is not a member of ‘oracle’
  177 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                              ^~~~~~~~~~~~~~
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:177:52: error: expected primary-expression before ‘>’ token
  177 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                                                    ^
/home/sun/eda/eda_attack/baseline/LSOracle/core/commands/optimization/oracle.hpp:177:79: error: ‘strategy’ was not declared in this scope; did you mean ‘strategych’?
  177 |         ntk_result = oracle::optimize_basic<network>(partitions_jr, abc_exec, strategy,false);
      |                                                                               ^~~~~~~~
      |                                                                               strategych
In file included from /home/sun/eda/eda_attack/baseline/LSOracle/core/lsoracle.cpp:63:
/home/sun/eda/eda_attack/baseline/LSOracle/core/algorithms/optimization/mab.hpp: In function ‘std::string oracle::abc_stats_commmands(int, int, int)’:
/home/sun/eda/eda_attack/baseline/LSOracle/core/algorithms/optimization/mab.hpp:380:1: warning: control reaches end of non-void function [-Wreturn-type]
  380 | }
      | ^
/home/sun/eda/eda_attack/baseline/LSOracle/core/algorithms/optimization/mab.hpp: In function ‘float oracle::get_results_universe(std::string, int)’:
/home/sun/eda/eda_attack/baseline/LSOracle/core/algorithms/optimization/mab.hpp:699:1: warning: control reaches end of non-void function [-Wreturn-type]
  699 | }
      | ^
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unneeded-internal-declaration’ may have been intended to silence earlier diagnostics
make[2]: *** [core/CMakeFiles/lsoracle.dir/build.make:80: core/CMakeFiles/lsoracle.dir/lsoracle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3947: core/CMakeFiles/lsoracle.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I'm using g++ 10.3.0, I wonder how to fix this compiling error.

sun123-cmd commented 3 weeks ago

I have fixed it by following:

and then build project:

cmake -B build . -DCMAKE_BUILD_TYPE=RELEASE -D ENABLE_OPENSTA=ON -DENABLE_ABC=ON cd build && make