chenshuo / muduo

Event-driven network library for multi-threaded Linux server in C++11
https://github.com/chenshuo/muduo
Other
14.64k stars 5.14k forks source link

现在支持在Mac环境下编译运行么 #652

Closed rainorz closed 1 year ago

rainorz commented 1 year ago

Linux distro and version? x86 or ARM? 32-bit or 64-bit?

MacOS X 10.14 / x86 / 64-bit

Branch (cpp98/cpp11/cpp17) and version of muduo?

mac

Version of cmake, gcc and boost? (If not from distro.)

cmake version 3.19.3

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

boost: stable 1.76.0 (bottled), HEAD

错误信息

/xxx/muduo/muduo/base/AsyncLogging.cc:58:13: error: no matching constructor for initialization of 'muduo::AsyncLogging::BufferPtr' (aka 'static_move_ptr<muduo::detail::FixedBuffer<4000000>, boost::ptr_container_detail::static_clone_deleter >') BufferPtr newBuffer1(new Buffer);

看到之前的issue中有很多关于mac下编译失败的讨论,作者有些反馈不支持mac的,也有说让尝试mac分支 不清楚现在是什么情况,是否可以在mac下编译成功?

另外发布环境使用linux没有问题,但是在开发过程中如果使用MacOS或者Windows如何Debug呢?也是必须开发时也使用Linux环境么?

chenshuo commented 1 year ago
  1. muduo 不支持 mac
  2. 在开发过程中如果使用MacOS或者Windows,请安装 Linux 虚拟机或者 WSL2.