facebook / openr

Distributed platform for building autonomic network functions.
MIT License
906 stars 243 forks source link

Build fail of util/Utils.h #135

Open guodong opened 2 years ago

guodong commented 2 years ago

Issue Description

Minimal test code / Steps to reproduce the issue

Build openr by build/build_openr.sh

What's the actual result?

/home/vagrant/openr/openr/tests/utils/Utils.h:122:14: error: ‘Task’ in namespace ‘folly::coro’ does not name a template type
  122 | folly::coro::Task<void> co_validateNodeKey(
      |              ^~~~
/home/vagrant/openr/openr/tests/utils/Utils.h:130:14: error: ‘Task’ in namespace ‘folly::coro’ does not name a template type
  130 | folly::coro::Task<void> co_waitForConvergence(
      |              ^~~~
[93/150] Building CXX object CMakeFiles/openrlib.dir/openr/ctrl-server/OpenrCtrlHandler.cpp.o
ninja: build stopped: subcommand failed.
Command '['/opt/facebook/cmake-lV-JXVDUReICVkOgVITpaIg5qFbZoy6F3HTQk_VSkeg/bin/cmake', '--build', '/usr/local/src/build/openr', '--target', 'install', '--config', 'Release', '-j', '2']' returned non-zero exit status 1.
!! Failed
[ERROR]: Failed to build openr
guodong commented 2 years ago

The reason is that -fcoroutines is not injected to folly and openr to enable the experimental features of folly. I'm trying to use g++-10 and inject fcoroutines to complition args. Hope this can be fixed.