Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile faild when using clang++ #669

Open
Max-astro opened this issue Jan 7, 2025 · 0 comments
Open

Compile faild when using clang++ #669

Max-astro opened this issue Jan 7, 2025 · 0 comments

Comments

@Max-astro
Copy link

Describe the bug
Compiler error messages:

[14/23] Building CXX object examples/CMakeFiles/cut_enumeration.dir/cut_enumeration.cpp.o
FAILED: examples/CMakeFiles/cut_enumeration.dir/cut_enumeration.cpp.o 
/home/max/proj/mlir-tutorial/externals/build/bin/clang++ -DABC_NAMESPACE=pabc -DABC_NO_USE_READLINE -DDISABLE_NAUTY -DFMT_HEADER_ONLY -DLIN64 -I/home/max/playground/mockturtle/lib/abcsat -I/home/max/playground/mockturtle/lib/abcesop -isystem /home/max/playground/mockturtle/include -isystem /home/max/playground/mockturtle/lib/kitty -isystem /home/max/playground/mockturtle/lib/lorina -isystem /home/max/playground/mockturtle/lib/rang -isystem /home/max/playground/mockturtle/lib/fmt -isystem /home/max/playground/mockturtle/lib/parallel_hashmap -isystem /home/max/playground/mockturtle/lib/percy -isystem /home/max/playground/mockturtle/lib/json -isystem /home/max/playground/mockturtle/lib/bill -O3 -DNDEBUG -W -Wall -Wextra -Wno-unknown-pragmas -Wno-gnu-anonymous-struct -Wno-nested-anon-types -std=gnu++17 -MD -MT examples/CMakeFiles/cut_enumeration.dir/cut_enumeration.cpp.o -MF examples/CMakeFiles/cut_enumeration.dir/cut_enumeration.cpp.o.d -o examples/CMakeFiles/cut_enumeration.dir/cut_enumeration.cpp.o -c /home/max/playground/mockturtle/examples/cut_enumeration.cpp
In file included from /home/max/playground/mockturtle/examples/cut_enumeration.cpp:2:
In file included from /home/max/playground/mockturtle/include/mockturtle/mockturtle.hpp:52:
In file included from /home/max/playground/mockturtle/include/mockturtle/algorithms/balancing.hpp:62:
In file included from /home/max/playground/mockturtle/include/mockturtle/algorithms/lut_mapper.hpp:56:
/home/max/playground/mockturtle/include/mockturtle/algorithms/../views/choice_view.hpp:150:17: error: no viable overloaded '='
  150 |       this->_ps = choice_ntk._ps;
      |       ~~~~~~~~~ ^ ~~~~~~~~~~~~~~
/home/max/playground/mockturtle/include/mockturtle/algorithms/../views/choice_view.hpp:47:8: note: candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const choice_view_params', but method is not marked const
   47 | struct choice_view_params
      |        ^
/home/max/playground/mockturtle/include/mockturtle/algorithms/../views/choice_view.hpp:47:8: note: candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const choice_view_params', but method is not marked const
1 error generated.
[18/23] Building CXX object examples/CMakeFiles/minimize.dir/minimize.cpp.o
ninja: build stopped: subcommand failed.

To Reproduce
cmake options:
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=clang++ ..

Environment

  • OS: WSL2
  • Compiler: clang 20.0.0
  • Compilation mode: RELEASE

Additional context
The choice_view class's member variable choice_view_params const _ps shouldn't be marked as const because choice_view's copy assignment constructor will modify it.

Check list
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant