rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

build error when brew install #274

Closed HughGrant closed 8 years ago

HughGrant commented 8 years ago

Here's the error message

brew install neovim-dot-app --without-python 
==> Installing neovim-dot-app from rogual/neovim-dot-app
==> Downloading https://github.com/rogual/neovim-dot-app/archive/0.1.4.tar.gz
Already downloaded: /Users/tuwenmin/Library/Caches/Homebrew/neovim-dot-app-0.1.4.tar.gz
==> make NVIM=/usr/local/opt/neovim/bin/nvim
Last 15 lines from /Users/tuwenmin/Library/Logs/Homebrew/neovim-dot-app/01.make:
VIM=/usr/local/Cellar/neovim/0.1.4/share/nvim NVIM=/usr/local/opt/neovim/bin/nvim scons -Q
Install file: "res/Info.plist" as "build/Neovim.app/Contents/Info.plist"
clang++ -o build/client.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -I/usr/local/Cellar/msgpack/2.0.0/include -Ibuild -Isrc src/client.cc
src/client.cc:48:20: error: no matching member function for call to 'next'
    while(unpacker.next(&unpacked)) {
          ~~~~~~~~~^~~~
/usr/local/Cellar/msgpack/2.0.0/include/msgpack/v2/unpack.hpp:1335:23: note: candidate function not viable: no known conversion from 'msgpack::unpacked *' (aka 'msgpack::v1::object_handle *') to 'msgpack::object_handle &' for 1st argument; remove &
inline bool unpacker::next(msgpack::object_handle& result) {
                      ^
/usr/local/Cellar/msgpack/2.0.0/include/msgpack/v2/unpack.hpp:1320:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline bool unpacker::next(msgpack::object_handle& result, bool& referenced) {
                      ^
1 error generated.
scons: *** [build/client.o] Error 1
make: *** [all] Error 2
supermarin commented 8 years ago

Seems like it's a problem with msgpack bumping to 2.0 and introducing API breaking changes. Pinning to v1.x might temporarily fix this

HughGrant commented 8 years ago

I guess so

goodell commented 8 years ago

FYI, for those not immediately sure what "pinning to v1.x" translates to in terms of commands, I was able to fix this with

$ brew switch msgpack 1.4.1
Cleaning /usr/local/Cellar/msgpack/1.2.0
Cleaning /usr/local/Cellar/msgpack/1.4.1
Cleaning /usr/local/Cellar/msgpack/2.0.0
7 links created for /usr/local/Cellar/msgpack/1.4.1

Followed by attempting to install neovim-dot-app again.

But I'm pretty sure that only worked because I already had the 1.4.1 version of msgpack previously installed. If you are hitting this issue and need to pin, you might try other suggestions from this StackOverflow answer: http://stackoverflow.com/a/4158763/158513

HughGrant commented 8 years ago

@goodell really nice of you, those who are not familiar with brew commands will benefits from your answer enormously.

supermarin commented 8 years ago

@goodell thanks a bunch! I wasn't aware of this API either, went the manual way

rogual commented 8 years ago

I've just merged a PR updating our use of msgpack.

Really surprised you can't tell Homebrew that your project depends on a certain major version of a library.

isaachess commented 8 years ago

I'm having this same problem today, and cannot follow @goodell's advice because I have never installed 1.4.1 before. When I try I get:

Error: msgpack does not have a version "1.4.1" in the Cellar.
Versions available: 2.0.0
goodell commented 8 years ago

@isaachess well, if truly desperate you could probably roll back your homebrew version to something from a couple of months ago, install msgpack 1.4.1, then update back to the current homebrew version and execute the brew switch.

But in my quick test, this also just worked for me, presumably because of @rougal's recent PR:

$ brew update
$ brew upgrade
$ brew install neovim-dot-app --HEAD