folly: Installation with homebrew fails (Mac)
I am trying to install folly on my Mac using homebrew: brew install folly. I need follyas it is a dependency of watchman.
Unfortunately it fails and I receive the following error:
Last 15 lines from /Users/xxx/Library/Logs/Homebrew/folly/02.cmake:
/tmp/folly-20230629-51773-87s7za/folly-2023.06.26.00/folly/io/async/fdsock/AsyncFdSocket.cpp:129:16: error: cannot initialize object parameter of type 'folly::AsyncSocket' with an expression of type 'folly::AsyncFdSocket'
AsyncSocket::setSendMsgParamCB(&sendMsgCob_);
^~~~~~~~~~~~~~~~~
/tmp/folly-20230629-51773-87s7za/folly-2023.06.26.00/folly/io/async/fdsock/AsyncFdSocket.cpp:136:16: error: cannot initialize object parameter of type 'folly::AsyncSocket' with an expression of type 'folly::AsyncFdSocket'
AsyncSocket::releaseIOBuf(std::move(buf), callback);
^~~~~~~~~~~~
/tmp/folly-20230629-51773-87s7za/folly-2023.06.26.00/folly/io/async/fdsock/AsyncFdSocket.cpp:298:18: error: cannot initialize object parameter of type 'folly::AsyncSocket' with an expression of type 'folly::AsyncFdSocket'
AsyncSocket::failRead(__func__, ex);
^~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/folly_base.dir/folly/io/async/fdsock/AsyncFdSocket.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
make: *** [all] Error 2
Thank you so much for any help or guidance! ๐
PS My mac is running on macOS 10.15, which is officially no longer supported by homebrew. Nevertheless, I hope there is some sort of solution / workaround.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
@sryze I have no idea how you have found that workaround, but thank you so much! ๐
I think you meant this though (wrong version number):
Just to clarify for anyone else running into this issue, you would have to change following line:
to:
I have the same issue with upgrading folly on Catalina (itโs a dependency of a package that I have previously installed).
But whatโs funny is that I can build the same version of folly (v2023.10.02.00) successfully from git with the same cmake flags as Homebrew uses and same clang version.
Update:
The actual error from my Homebrew build is below. It looks like
brewnormally prints only the last error which is not helpful here.Clang version:
Update 2
It turns out that Homebrew uses MacOSX SDK 10.15 instead of 11.1 which comes with Xcode 12 and which is used by CMake by default. In 10.15 there is a bug in the definition of
__DARWIN_ALIGN32that causes it to produce a non-constant value.Workaround:
(char *)casts@marnixhoh look I tried to search a little, but precisely I can not tell you however I found this ! Practically reading problems of other users it seems that your version is compatible with folly of 2021. So i suggest you to try some version of 2021 to see if it works: version: https://github.com/facebook/folly/releases?page=8 supporto macOS #1545 2021.03.08.00 #72752