neovim / homebrew-neovim

Homebrew formula
MIT License
402 stars 72 forks source link

Update luv and luarocks #216

Closed equal-l2 closed 7 years ago

equal-l2 commented 7 years ago

~Note: this PR shouldn't be merged until https://github.com/neovim/neovim/pull/6059 is merged.~ Ready to merge now.

Close #207.

javian commented 7 years ago

Something is up with the checksum

==> Verifying neovim--luarocks-2.4.2.tar.gz checksum
Error: SHA256 mismatch
Expected: cae709111c5701235770047dfd7169f66b82ae1c7b9b79207f9df0afb722bfd9
Actual: eef88c2429c715a7beb921e4b1ba571dddb7c74a250fbb0d3cc0d4be7a5865d9
javian commented 7 years ago

Did you test building HEAD ? I wanted to commit the Formula to core but I can't get the head compilation to work when using the Formula.

equal-l2 commented 7 years ago

@javian It builds at the time when I commit, but it doesn't build now somehow.

javian commented 7 years ago

@equal-l2 yes its really strange. For me the error looks like this

==> make VERBOSE=1
Last 15 lines from /Users/biomass/Library/Logs/Homebrew/neovim/02.make:
Install the project...
/usr/local/Cellar/cmake/3.8.2/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Installing: /tmp/neovim-20170610-45643-3hw52b/deps-build/usr/lib/libluv.a
-- Installing: /tmp/neovim-20170610-45643-3hw52b/deps-build/usr/include/luv/luv.h
-- Installing: /tmp/neovim-20170610-45643-3hw52b/deps-build/usr/include/luv/util.h
-- Installing: /tmp/neovim-20170610-45643-3hw52b/deps-build/usr/include/luv/lhandle.h
-- Installing: /tmp/neovim-20170610-45643-3hw52b/deps-build/usr/include/luv/lreq.h
cd /tmp/neovim-20170610-45643-3hw52b/deps-build/build/src/luv-static-build && /usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-45643-3hw52b/deps-build/build/src/luv-static-stamp/luv-static-install
[ 85%] Completed 'luv-static'
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E make_directory /tmp/neovim-20170610-45643-3hw52b/deps-build/CMakeFiles
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-45643-3hw52b/deps-build/CMakeFiles/luv-static-complete
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-45643-3hw52b/deps-build/build/src/luv-static-stamp/luv-static-done
[ 85%] Built target luv-static
make: *** [all] Error 2

Are you seeing the same thing ? I can build everything through the regular git repo when I do it manually so it seems to be specific to building it through the Formula.

javian commented 7 years ago

It seems to be working fine if the luarocks resource isn't updated.

equal-l2 commented 7 years ago

Are you seeing the same thing ? I can build everything through the regular git repo when I do it manually so it seems to be specific to building it through the Formula.

I saw exactly the same thing and regular git repo builds normally.

It seems to be working fine if the luarocks resource isn't updated.

That's strange... HEAD should not build without this change since directory hierarchy has changed in luarocks 2.3.

javian commented 7 years ago

But if the directory hierarchy changed it had no effect on the update of luarocks in the git repo since the only change was the version bump and the code change required for it to compile on Windows. I can't find a good way to get more debugging information at the moment.

If you --debug when compiling you can get a shell the explore the file structure. As far as I can see all the luarocks related files are there and if you do make luarocks in the builds-dep directory then it compiles just fine.

[ 85%] Completed 'luv-static'
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E make_directory /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles/luv-static-complete
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-83058-g0rpik/deps-build/build/src/luv-static-stamp/luv-static-done
[ 85%] Built target luv-static
make: *** [all] Error 2
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make VERBOSE=1
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 5
When you exit this shell, you will return to the menu.
Computername% pwd
/private/tmp/neovim-20170610-83058-g0rpik/deps-build
Computername% make luarocks
/usr/local/Cellar/cmake/3.8.2/bin/cmake -H/tmp/neovim-20170610-83058-g0rpik/third-party -B/tmp/neovim-20170610-83058-g0rpik/deps-build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 luarocks
/usr/local/Cellar/cmake/3.8.2/bin/cmake -H/tmp/neovim-20170610-83058-g0rpik/third-party -B/tmp/neovim-20170610-83058-g0rpik/deps-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E cmake_progress_start /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles 16
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/luarocks.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/luajit.dir/build.make CMakeFiles/luajit.dir/depend
cd /tmp/neovim-20170610-83058-g0rpik/deps-build && /usr/local/Cellar/cmake/3.8.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/neovim-20170610-83058-g0rpik/third-party /tmp/neovim-20170610-83058-g0rpik/third-party /tmp/neovim-20170610-83058-g0rpik/deps-build /tmp/neovim-20170610-83058-g0rpik/deps-build /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles/luajit.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/luajit.dir/build.make CMakeFiles/luajit.dir/build
make[3]: Nothing to be done for `CMakeFiles/luajit.dir/build'.
[ 50%] Built target luajit
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/luarocks.dir/build.make CMakeFiles/luarocks.dir/depend
cd /tmp/neovim-20170610-83058-g0rpik/deps-build && /usr/local/Cellar/cmake/3.8.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/neovim-20170610-83058-g0rpik/third-party /tmp/neovim-20170610-83058-g0rpik/third-party /tmp/neovim-20170610-83058-g0rpik/deps-build /tmp/neovim-20170610-83058-g0rpik/deps-build /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles/luarocks.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/luarocks.dir/build.make CMakeFiles/luarocks.dir/build
[ 56%] Performing install step for 'luarocks'
cd /tmp/neovim-20170610-83058-g0rpik/deps-build/build/src/luarocks && /Applications/Xcode.app/Contents/Developer/usr/bin/make bootstrap
'/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/bin/luajit' -e "package.path=[[`echo "$PWD" | sed -e 's/\([][]\)\1/]]..'\''\1\1'\''..[[/g'`/src/?.lua;]]..package.path" src/bin/luarocks make rockspec --tree="/tmp/neovim-20170610-83058-g0rpik/deps-build/usr"
mkdir -p "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/share/lua/5.1//luarocks"
mkdir -p "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr"
for f in luarocks luarocks-admin ;\
    do \
       mv src/bin/$f src/bin/$f.bak ;\
       sed "s,^#!.*lua.*,#!/usr/bin/env lua,;/^package.path/d" < src/bin/$f.bak > src/bin/$f ;\
       chmod +rx src/bin/$f ;\
       rm -f src/bin/$f.bak ;\
    done
cp src/luarocks/site_config.lua "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/share/lua/5.1//luarocks"
if [ ! -f "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua" ] ;\
    then \
       mkdir -p `dirname "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua"` ;\
       echo 'rocks_trees = {' >> "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua" ;\
       if  [ ! -n "yes" ] ;\
       then \
          echo '   { name = [[user]], root = home..[[/.luarocks]] },' >> "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua" ;\
       fi ;\
       echo '   { name = [[system]], root = [[/tmp/neovim-20170610-83058-g0rpik/deps-build/usr]] }' >> "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua" ;\
       echo '}' >> "/tmp/neovim-20170610-83058-g0rpik/deps-build/usr/etc/luarocks/config-5.1.lua" ;\
    fi
cd /tmp/neovim-20170610-83058-g0rpik/deps-build/build/src/luarocks && /usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-83058-g0rpik/deps-build/build/src/luarocks-stamp/luarocks-install
[ 62%] Completed 'luarocks'
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E make_directory /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles/luarocks-complete
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E touch /tmp/neovim-20170610-83058-g0rpik/deps-build/build/src/luarocks-stamp/luarocks-done
[100%] Built target luarocks
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E cmake_progress_start /tmp/neovim-20170610-83058-g0rpik/deps-build/CMakeFiles 0
Computername%
javian commented 7 years ago

It seems that luarocks 2.4.0 works but 2.4.1/.2 doesn't. Diff https://github.com/luarocks/luarocks/compare/2.4.0...2.4.1

equal-l2 commented 7 years ago

HEAD builds on travis though it still fails on my Mac.

equal-l2 commented 7 years ago

@javian Would you try installing HEAD again?

equal-l2 commented 7 years ago

With deparallelization I can successfully install neovim by HEAD.

javian commented 7 years ago

Me too - that solves the last issue and I will submit the formula to core later today.

justinmk commented 7 years ago

LGTM. is this ready to merge?

equal-l2 commented 7 years ago

@justinmk Yes.