Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew install (or upgrade, reinstall) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update and can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?To help us debug your issue please explain:
Install/update MySQL while also having the generic "protobuf" formula installed.
MySQL included its own versions of libraries installed by the protobuf formula. For example, when I have protobuf unlinked and mysql installed, this is included in the error output when I try to brew link protobuf:
Possible conflicting files are:
/usr/local/lib/libprotobuf-lite.dylib -> /usr/local/Cellar/mysql/8.0.18/lib/libprotobuf-lite.dylib
/usr/local/lib/libprotobuf.dylib -> /usr/local/Cellar/mysql/8.0.18/lib/libprotobuf.dylib
For the MySQL brew to not include these libraries, or to reuse the ones included in protobuf.
brew install commands)% brew install protobuf
% brew install mysql
mysql fails to link
I am currently running brew install -s mysql to check if that works, but I've noted that the Formula doesn't look like it's changed, so ideally this will determine if the inclusion of the protobuf dylibs is an upstream thing or a build problem (or something else entirely)?
Attachment of brew config and brew doctor:
https://gist.github.com/Hajitorus/535351342bf3eefee0718da290672711
Building from source replicates the issue. Have confirmed that upstream source changed the way they deal with protobufs. Source: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-18.html
Not sure how to proceed. Not familiar with the formula cookbook and reaching into the source to edit e.g. the cmakefile feels like overkill.
Release notes state:
The CMake code to find Protobuf executables now works on platforms that split these into multiple packages. (Bug #29953773)
So clearly it's possible to use the homebrew protobuf rather than let mysql recompile it.
Ah. Thank you for the hint. Recompiling with -DWITH_PROTOBUF=system added to the cmake args.
Okay. brew's protobuf does not ship with wire_format_lite_inl.h, which mysql uses as part of make mock. Tomorrow, I will look into the differences between the brew protobuf vs mysql's vendored version and see if there's anything useful to be done here.
Nailed down one small thing: mysql ships with protobuf 3.6.1, which includes abovementioned wire_format_lite_inl.h, which is called "vestigial" and destroyed in protobuf 3.8.0. Homebrew protobuf is 3.10.0, so deleted these includes from plugin/x/ngs/include/ngs/protocol/protocol_protobuf.h and plugin/x/client/mysqlxclient/xmessage.h and kicked off a build. Actually leaving the computer until tomorrow this time.
Have inserted an ugly hack (patching mysql's include files inline from the formula). Next step probably involves asking upstream to take this into account as part of build process?
PR is #45383.
Homebrew ships a [email protected] wouldn't it be better to use that one instead? If upstream doesn't want to support a recent version that is.
Sure. So that would mean an updated formula that:
Didn't even see there were older versions available, thank you for the advice. I'll update PRs accordingly once I've redone the formula and confirmed successful build.
The requirement on 3.6 should probably have a comment referring to the upstream bug report.
I have been busy and sick intermittently, and feel like I am flailing around in the dark on this. Upstream has confirmed this issue is resolved in the next minor release (8.0.19) and it seems like this issue probably only affects people using mosh and mysql at the same time. If someone else would like to pick this up feel free; I would rather wait until the upstream release resolves this. Many thanks to everyone that volunteered time and expertise. This was a fun first bug/PR, even if I didn't land any changes.
This issue affects me and best I can tell from reading above, there's no published workaround. This issue should at least be re-opened until there is a fix in place, and it would be nice to have a published workaround or recommendation.
this issue probably only affects people using mosh
I'm not using mosh, but I am using mitmproxy, which depends on protobuf, so there are definitely other users experiencing this issue (probably any package that depends on protobuf; is there a way to query for that?).