rogual / neovim-dot-app

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

homebrew installation fails with lzma related errors #331

Closed CJBridges closed 5 years ago

CJBridges commented 6 years ago

Steps to reproduce: 1) Install nvim 2) Follow instructions in project readme:

$ brew tap neovim/neovim
$ brew tap rogual/neovim-dot-app
$ brew install neovim-dot-app   # this command produces the errors seen below
$ brew linkapps neovim-dot-app

Compile log:

2018-02-14 16:20:58 -0800

make
NVIM=/usr/local/opt/neovim/bin/nvim

VIM=/usr/local/Cellar/neovim/0.2.2_1/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 -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/client.cc
clang++ -o build/process.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/process.cc
clang++ -o build/rpc.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/rpc.cc
clang++ -o build/vim.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/vim.cc
clang++ -o build/vimutils.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/vimutils.cc
clang++ -o build/app.o -c -std=c++11 -stdlib=libc++ -g -Wno-deprecated-register -mmacosx-version-min=10.9 -I/usr/local/Cellar/msgpack/2.1.5/include -Ibuild -Isrc src/app.mm
In file included from src/app.mm:5:
In file included from src/app.h:1:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
        lzma_check check;
        ^
/usr/local/include/Block.h:148:2: error: unknown type name 'lzma_vli'
        lzma_vli compressed_size;
        ^
/usr/local/include/Block.h:172:2: error: unknown type name 'lzma_vli'
        lzma_vli uncompressed_size;
        ^
/usr/local/include/Block.h:200:2: error: unknown type name 'lzma_filter'
        lzma_filter *filters;
        ^
/usr/local/include/Block.h:217:20: error: use of undeclared identifier 'LZMA_CHECK_SIZE_MAX'
        uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
                          ^
/usr/local/include/Block.h:231:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int3;
        ^
/usr/local/include/Block.h:232:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int4;
        ^
/usr/local/include/Block.h:233:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int5;
        ^
/usr/local/include/Block.h:234:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int6;
        ^
/usr/local/include/Block.h:235:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int7;
        ^
/usr/local/include/Block.h:236:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int8;
        ^
/usr/local/include/Block.h:237:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum1;
        ^
/usr/local/include/Block.h:238:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum2;
        ^
/usr/local/include/Block.h:239:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum3;
        ^
/usr/local/include/Block.h:240:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum4;
        ^
/usr/local/include/Block.h:261:2: error: unknown type name 'lzma_bool'
        lzma_bool ignore_check;
        ^
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool2;
        ^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool3;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
scons: *** [build/app.o] Error 1
make: *** [all] Error 2

HOMEBREW_VERSION: 1.5.4
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 021fe22e3c982b08346422d1e7897e929a709380
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 78012eefdd15f1a834bfbc9179229c92dc30314d
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/my_user_name/Library/Caches/Homebrew
HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION: 1
HOMEBREW_ERROR_PIPE: /tmp/homebrew20180214-55438-wj6w2c/socket
HOMEBREW_FORMULA_PREFIX: /usr/local/Cellar/neovim-dot-app/0.1.5
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.16.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: N/A
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14_3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: N/A
Java: 1.8.0_111
macOS: 10.13.3-x86_64
Xcode: 9.2
CLT: 9.2.0.0.1.1510905681
X11: N/A

CC: /usr/bin/clang
CXX: /usr/bin/clang++
OBJC: /usr/bin/clang
OBJCXX: /usr/bin/clang++
CFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.13
CXXFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.13
CPPFLAGS: -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/readline/include -I/usr/local/opt/gettext/include -F/usr/local/Frameworks
LDFLAGS: -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local/opt/openssl:/usr/local/opt/sqlite:/usr/local/opt/readline:/usr/local/opt/gettext
CMAKE_FRAMEWORK_PATH: /usr/local/Frameworks
PKG_CONFIG_PATH: /usr/local/opt/openssl/share/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/sqlite/share/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/share/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/gettext/share/pkgconfig:/usr/local/opt/gettext/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13:/usr/lib/pkgconfig
ACLOCAL_PATH: /usr/local/opt/openssl/share/aclocal:/usr/local/opt/sqlite/share/aclocal:/usr/local/opt/readline/share/aclocal:/usr/local/opt/gettext/share/aclocal
PATH: /usr/local/opt/python/bin:/usr/local/opt/openssl/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/readline/bin:/usr/local/opt/gettext/bin:/Users/my_user_name/.rbenv/versions/2.3.5/bin:/usr/local/opt/go/libexec/bin:/Users/my_user_name/.rvm/bin:/usr/local/git/bin:/usr/local/bin:/Users/my_user_name/bin/:/Users/my_user_name/.local/bin:/Users/my_user_name/.nvm/versions/node/v6.9.1/bin:/Users/my_user_name/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm
CPATH: /usr/local/include

Other notes:

Please let me know if there are any other steps I can provide or troubleshooting information I can make available.

rogual commented 6 years ago

This looks like it may be a problem with the way the LZMA headers are installed on your system. Is LZMA from Homebrew?

CoreFoundation is trying to include <Block.h>, which I presume is supposed to resolve to /usr/include/Block.h, but your compiler is finding LZMA's Block.h instead. LZMA's Block.h doesn't like being included, so it probably shouldn't be installed in a location that gets found by “system”-includes (those with <>).

One workaround may be to change your INCLUDE path so that /usr/include comes before /usr/local/include.

If you don't need LZMA, another workaround would be to uninstall it.

RockfordWei commented 6 years ago

@rogual how to uninstall LZMA?

rogual commented 6 years ago

It'd depend on how you installed it. If it was through Homebrew, brew uninstall should work.

yogeshmangaj commented 6 years ago

I faced this issue when attempting to build another library, the issue for me was that there were a lot of unbrewed header files found in /usr/local/include after migrating my Mac OS X. I ran brew doctor and it gave me a list of these header files, deleting them fixed the issue.

rbkeefer commented 5 years ago

I simple removed /usr/local/include/block.h and this fixed the issue for me.

HallDJack commented 5 years ago

@rbkeefer I ran in to an issue installing a ruby with RVM that caused the same error that @CJBridges ran into. After reading through many other issues and stack overflow questions I found this one.

I ran mv /usr/local/include/block.h /usr/local/include/block.h.old and my install worked. Thank you for the suggestion. 👍

geastham commented 4 years ago

I simple removed /usr/local/include/block.h and this fixed the issue for me.

Gave me a weekend back!