Subject: [bug#55045] [PATCH] update neovim to 0.7.0

From: Luis Henrique Gomes Higino <[email-masked]>
Date: Thu, 05 May 2022 12:02:02 -0300

Hi,

Ludovic Courtès <[email-masked]> writes:

> Hi,
>
> Luis Henrique Gomes Higino <[email-masked]> 
> skribis:
>
>> I think you're right, but I'm somewhat unsure about updating 
>> libuv, as
>> it would cause 13346 packages to be rebuilt 😟. According to 
>> the Guix
>> manual, this would result in this patch having to be applied in 
>> the
>> core-updates branch, which could delay neovim's update 
>> significantly.
>
> What you can do is introduce a libuv variant for the version 
> that neovim
> needs, as long the lines of the first example at:
>
>   https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html
>
> HTH!
>
> Ludo’.

I have introduced libuv-for-luv, updated it to version 1.43.0 and 
put it as the new input for make-lua-luv. Its code follows:

--8<---------------cut here---------------start------------->8---
(define-public libuv-for-luv
  ;; When upgrading make-lua-luv, also upgrade this. Get the 
  version from
  ;; https://github.com/luvit/luv/blob/master/CMakeLists.txt
  (package
    (inherit libuv)
    (name "libuv")
    (version "1.43.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dist.libuv.org/dist/v" 
              version
                                  "/libuv-v" version ".tar.gz"))
              (sha256
               (base32
                "194kwq3jfj9s628kzkchdca534rikjw0xiyas0cjbphqmsvjpmwh"))))
    (properties '((hidden? . #t)))))
--8<---------------cut here---------------end--------------->8---

Each version of lua-luv built fine, but building neovim now throws 
this error:

--8<---------------cut here---------------start------------->8---
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin/gcc 
-DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g 
-Og -g -flto -fno-fat-lto-objects  -Wl,--no-undefined 
-Wl,--export-dynamic -rdynamic 
CMakeFiles/nvim.dir/auto/lua_api_c_bindings.generated.c.o 
CMakeFiles/nvim.dir/__/__/config/auto/pathdef.c.o 
CMakeFiles/nvim.dir/api/autocmd.c.o 
CMakeFiles/nvim.dir/api/buffer.c.o 
CMakeFiles/nvim.dir/api/deprecated.c.o 
CMakeFiles/nvim.dir/api/extmark.c.o 
CMakeFiles/nvim.dir/api/private/converter.c.o 
CMakeFiles/nvim.dir/api/private/dispatch.c.o 
CMakeFiles/nvim.dir/api/private/helpers.c.o 
CMakeFiles/nvim.dir/api/tabpage.c.o CMakeFiles/nvim.dir/api/ui.c.o 
CMakeFiles/nvim.dir/api/vim.c.o 
CMakeFiles/nvim.dir/api/vimscript.c.o 
CMakeFiles/nvim.dir/api/win_config.c.o 
CMakeFiles/nvim.dir/api/window.c.o CMakeFiles/nvim.dir/arabic.c.o 
CMakeFiles/nvim.dir/autocmd.c.o CMakeFiles/nvim.dir/buffer.c.o 
CMakeFiles/nvim.dir/buffer_updates.c.o 
CMakeFiles/nvim.dir/change.c.o CMakeFiles/nvim.dir/channel.c.o 
CMakeFiles/nvim.dir/charset.c.o CMakeFiles/nvim.dir/context.c.o 
CMakeFiles/nvim.dir/cursor.c.o 
CMakeFiles/nvim.dir/cursor_shape.c.o 
CMakeFiles/nvim.dir/debugger.c.o 
CMakeFiles/nvim.dir/decoration.c.o 
CMakeFiles/nvim.dir/decoration_provider.c.o 
CMakeFiles/nvim.dir/diff.c.o CMakeFiles/nvim.dir/digraph.c.o 
CMakeFiles/nvim.dir/edit.c.o CMakeFiles/nvim.dir/eval.c.o 
CMakeFiles/nvim.dir/eval/decode.c.o 
CMakeFiles/nvim.dir/eval/encode.c.o 
CMakeFiles/nvim.dir/eval/executor.c.o 
CMakeFiles/nvim.dir/eval/funcs.c.o CMakeFiles/nvim.dir/eval/gc.c.o 
CMakeFiles/nvim.dir/eval/typval.c.o 
CMakeFiles/nvim.dir/eval/userfunc.c.o 
CMakeFiles/nvim.dir/event/libuv_process.c.o 
CMakeFiles/nvim.dir/event/loop.c.o 
CMakeFiles/nvim.dir/event/multiqueue.c.o 
CMakeFiles/nvim.dir/event/process.c.o 
CMakeFiles/nvim.dir/event/rstream.c.o 
CMakeFiles/nvim.dir/event/signal.c.o 
CMakeFiles/nvim.dir/event/socket.c.o 
CMakeFiles/nvim.dir/event/stream.c.o 
CMakeFiles/nvim.dir/event/time.c.o 
CMakeFiles/nvim.dir/event/wstream.c.o 
CMakeFiles/nvim.dir/ex_cmds.c.o CMakeFiles/nvim.dir/ex_cmds2.c.o 
CMakeFiles/nvim.dir/ex_docmd.c.o CMakeFiles/nvim.dir/ex_eval.c.o 
CMakeFiles/nvim.dir/ex_getln.c.o 
CMakeFiles/nvim.dir/ex_session.c.o CMakeFiles/nvim.dir/extmark.c.o 
CMakeFiles/nvim.dir/file_search.c.o CMakeFiles/nvim.dir/fileio.c.o 
CMakeFiles/nvim.dir/fold.c.o CMakeFiles/nvim.dir/garray.c.o 
CMakeFiles/nvim.dir/getchar.c.o CMakeFiles/nvim.dir/hardcopy.c.o 
CMakeFiles/nvim.dir/hashtab.c.o CMakeFiles/nvim.dir/highlight.c.o 
CMakeFiles/nvim.dir/highlight_group.c.o 
CMakeFiles/nvim.dir/if_cscope.c.o CMakeFiles/nvim.dir/indent.c.o 
CMakeFiles/nvim.dir/indent_c.c.o CMakeFiles/nvim.dir/input.c.o 
CMakeFiles/nvim.dir/keymap.c.o CMakeFiles/nvim.dir/log.c.o 
CMakeFiles/nvim.dir/lua/converter.c.o 
CMakeFiles/nvim.dir/lua/executor.c.o 
CMakeFiles/nvim.dir/lua/spell.c.o 
CMakeFiles/nvim.dir/lua/stdlib.c.o 
CMakeFiles/nvim.dir/lua/treesitter.c.o 
CMakeFiles/nvim.dir/lua/xdiff.c.o CMakeFiles/nvim.dir/main.c.o 
CMakeFiles/nvim.dir/map.c.o CMakeFiles/nvim.dir/mark.c.o 
CMakeFiles/nvim.dir/marktree.c.o CMakeFiles/nvim.dir/match.c.o 
CMakeFiles/nvim.dir/math.c.o CMakeFiles/nvim.dir/mbyte.c.o 
CMakeFiles/nvim.dir/memfile.c.o CMakeFiles/nvim.dir/memline.c.o 
CMakeFiles/nvim.dir/memory.c.o CMakeFiles/nvim.dir/menu.c.o 
CMakeFiles/nvim.dir/message.c.o CMakeFiles/nvim.dir/mouse.c.o 
CMakeFiles/nvim.dir/move.c.o 
CMakeFiles/nvim.dir/msgpack_rpc/channel.c.o 
CMakeFiles/nvim.dir/msgpack_rpc/helpers.c.o 
CMakeFiles/nvim.dir/msgpack_rpc/server.c.o 
CMakeFiles/nvim.dir/normal.c.o CMakeFiles/nvim.dir/ops.c.o 
CMakeFiles/nvim.dir/option.c.o CMakeFiles/nvim.dir/os/dl.c.o 
CMakeFiles/nvim.dir/os/env.c.o CMakeFiles/nvim.dir/os/fileio.c.o 
CMakeFiles/nvim.dir/os/fs.c.o CMakeFiles/nvim.dir/os/input.c.o 
CMakeFiles/nvim.dir/os/lang.c.o CMakeFiles/nvim.dir/os/mem.c.o 
CMakeFiles/nvim.dir/os/process.c.o 
CMakeFiles/nvim.dir/os/pty_process_unix.c.o 
CMakeFiles/nvim.dir/os/shell.c.o CMakeFiles/nvim.dir/os/signal.c.o 
CMakeFiles/nvim.dir/os/stdpaths.c.o 
CMakeFiles/nvim.dir/os/time.c.o CMakeFiles/nvim.dir/os/tty.c.o 
CMakeFiles/nvim.dir/os/users.c.o CMakeFiles/nvim.dir/os_unix.c.o 
CMakeFiles/nvim.dir/path.c.o CMakeFiles/nvim.dir/plines.c.o 
CMakeFiles/nvim.dir/popupmnu.c.o CMakeFiles/nvim.dir/profile.c.o 
CMakeFiles/nvim.dir/quickfix.c.o CMakeFiles/nvim.dir/rbuffer.c.o 
CMakeFiles/nvim.dir/regexp.c.o CMakeFiles/nvim.dir/runtime.c.o 
CMakeFiles/nvim.dir/screen.c.o CMakeFiles/nvim.dir/search.c.o 
CMakeFiles/nvim.dir/sha256.c.o CMakeFiles/nvim.dir/shada.c.o 
CMakeFiles/nvim.dir/sign.c.o CMakeFiles/nvim.dir/spell.c.o 
CMakeFiles/nvim.dir/spellfile.c.o CMakeFiles/nvim.dir/state.c.o 
CMakeFiles/nvim.dir/strings.c.o CMakeFiles/nvim.dir/syntax.c.o 
CMakeFiles/nvim.dir/tag.c.o CMakeFiles/nvim.dir/terminal.c.o 
CMakeFiles/nvim.dir/testing.c.o CMakeFiles/nvim.dir/tui/input.c.o 
CMakeFiles/nvim.dir/tui/terminfo.c.o 
CMakeFiles/nvim.dir/tui/tui.c.o CMakeFiles/nvim.dir/ugrid.c.o 
CMakeFiles/nvim.dir/ui.c.o CMakeFiles/nvim.dir/ui_bridge.c.o 
CMakeFiles/nvim.dir/ui_client.c.o 
CMakeFiles/nvim.dir/ui_compositor.c.o CMakeFiles/nvim.dir/undo.c.o 
CMakeFiles/nvim.dir/version.c.o 
CMakeFiles/nvim.dir/viml/parser/expressions.c.o 
CMakeFiles/nvim.dir/viml/parser/parser.c.o 
CMakeFiles/nvim.dir/window.c.o 
CMakeFiles/nvim.dir/__/cjson/fpconv.c.o 
CMakeFiles/nvim.dir/__/cjson/lua_cjson.c.o 
CMakeFiles/nvim.dir/__/cjson/strbuf.c.o 
CMakeFiles/nvim.dir/__/mpack/conv.c.o 
CMakeFiles/nvim.dir/__/mpack/lmpack.c.o 
CMakeFiles/nvim.dir/__/mpack/mpack_core.c.o 
CMakeFiles/nvim.dir/__/mpack/object.c.o 
CMakeFiles/nvim.dir/__/mpack/rpc.c.o 
CMakeFiles/nvim.dir/__/xdiff/xdiffi.c.o 
CMakeFiles/nvim.dir/__/xdiff/xemit.c.o 
CMakeFiles/nvim.dir/__/xdiff/xhistogram.c.o 
CMakeFiles/nvim.dir/__/xdiff/xpatience.c.o 
CMakeFiles/nvim.dir/__/xdiff/xprepare.c.o 
CMakeFiles/nvim.dir/__/xdiff/xutils.c.o -o ../../bin/nvim 
-Wl,-rpath,:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
-fstack-protector-strong 
/gnu/store/l1s7piwdgv6gn5wyma8kv4jyb4fq50qm-lua5.1-luv-1.43.0-0/lib/libluv.so 
/gnu/store/z31c2rnjg9djq915ls98pv0mhjbyf423-libuv-1.41.1/lib/libuv.so 
-ldl -ldl -lrt -lpthread 
/gnu/store/90s2wdqxbxmp8zzbg5ml6pv7k31wskg7-msgpack-3.3.0/lib/libmsgpackc.so 
/gnu/store/h0h9f53kiwn19qz60lfgk71dnb9khgqx-libvterm-0.1.4/lib/libvterm.so 
/gnu/store/m5nsirsx5ksl7shgvgfrg59sy9c8k015-libtermkey-0.22/lib/libtermkey.so 
/gnu/store/ryy66y1fba3ffnzrhvdfgncxwplg84fs-unibilium-2.0.0/lib/libunibilium.so 
/gnu/store/vrpll9ix25z91jl2y19lxdij429hndp8-tree-sitter-0.20.6/lib/libtree-sitter.so 
-lpthread -lm -lutil 
/gnu/store/n958kwq28ykfs64qrykdwns7cpgzl5j3-luajit-2.1.0-beta3/lib/libluajit-5.1.so 
/gnu/store/90s2wdqxbxmp8zzbg5ml6pv7k31wskg7-msgpack-3.3.0/lib/libmsgpackc.so 
/gnu/store/h0h9f53kiwn19qz60lfgk71dnb9khgqx-libvterm-0.1.4/lib/libvterm.so 
/gnu/store/m5nsirsx5ksl7shgvgfrg59sy9c8k015-libtermkey-0.22/lib/libtermkey.so 
/gnu/store/ryy66y1fba3ffnzrhvdfgncxwplg84fs-unibilium-2.0.0/lib/libunibilium.so 
/gnu/store/vrpll9ix25z91jl2y19lxdij429hndp8-tree-sitter-0.20.6/lib/libtree-sitter.so 
-lm -lutil 
/gnu/store/n958kwq28ykfs64qrykdwns7cpgzl5j3-luajit-2.1.0-beta3/lib/libluajit-5.1.so 
ld: 
/gnu/store/l1s7piwdgv6gn5wyma8kv4jyb4fq50qm-lua5.1-luv-1.43.0-0/lib/libluv.so: 
undefined reference to `uv_try_write2'
--8<---------------cut here---------------end--------------->8---

I have experimented a bit with the libuv versions and only using 
1.41.1 this doesn't happen.

Regards,
-- 
Luis H. Higino