conda-forge / nvim-feedstock

A conda-smithy repository for nvim.
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

nvim cannot be opened after installation due to missing libtree-sitter binary #19

Closed anjos closed 1 month ago

anjos commented 1 month ago

Solution to issue cannot be found in the documentation.

Issue

Update of libtree-sitter from 0.23.2 to 0.24.1 broke the current package.

After installation, the editor cannot start anymore as it complains it cannot dynamically link against libtree-sitter.0.23.

If a precise version of a library must be used at run-time, it needs to be somehow properly pinned during the build.

Temporary fix: add a dependency to libtree-sitter = 0.23.* to your environment. This will allow the editor to start correctly for now.

Installed packages

Package                        Version       Build                 Size       Kind   Source
_go_select                     2.3.0         cgo                   5 KiB      conda  _go_select-2.3.0-cgo.tar.bz2
bat                            0.24.0        h5ef7bb8_0            2.2 MiB    conda  bat-0.24.0-h5ef7bb8_0.conda
black                          24.8.0        py311h267d04e_1       390.2 KiB  conda  black-24.8.0-py311h267d04e_1.conda
bzip2                          1.0.8         h99b78c6_7            120 KiB    conda  bzip2-1.0.8-h99b78c6_7.conda
c-ares                         1.33.1        hd74edd7_0            155.7 KiB  conda  c-ares-1.33.1-hd74edd7_0.conda
c-compiler                     1.8.0         h2664225_0            6 KiB      conda  c-compiler-1.8.0-h2664225_0.conda
ca-certificates                2024.8.30     hf0a4a13_0            154.8 KiB  conda  ca-certificates-2024.8.30-hf0a4a13_0.conda
cctools                        1010.6        hf67d63f_1            21.2 KiB   conda  cctools-1010.6-hf67d63f_1.conda
cctools_osx-arm64              1010.6        h4208deb_1            1 MiB      conda  cctools_osx-arm64-1010.6-h4208deb_1.conda
clang                          17.0.6        default_h360f5da_7    23.5 KiB   conda  clang-17.0.6-default_h360f5da_7.conda
clang-17                       17.0.6        default_h146c034_7    699.2 KiB  conda  clang-17-17.0.6-default_h146c034_7.conda
clang_impl_osx-arm64           17.0.6        he47c785_19           17.2 KiB   conda  clang_impl_osx-arm64-17.0.6-he47c785_19.conda
clang_osx-arm64                17.0.6        h54d7cd3_19           20.1 KiB   conda  clang_osx-arm64-17.0.6-h54d7cd3_19.conda
clangxx                        17.0.6        default_h360f5da_7    23.6 KiB   conda  clangxx-17.0.6-default_h360f5da_7.conda
clangxx_impl_osx-arm64         17.0.6        h50f59cd_19           17.3 KiB   conda  clangxx_impl_osx-arm64-17.0.6-h50f59cd_19.conda
clangxx_osx-arm64              17.0.6        h54d7cd3_19           18.8 KiB   conda  clangxx_osx-arm64-17.0.6-h54d7cd3_19.conda
click                          8.1.7         unix_pyh707e725_0     82.5 KiB   conda  click-8.1.7-unix_pyh707e725_0.conda
compiler-rt                    17.0.6        h856b3c1_2            92.7 KiB   conda  compiler-rt-17.0.6-h856b3c1_2.conda
compiler-rt_osx-arm64          17.0.6        h832e737_2            9.9 MiB    conda  compiler-rt_osx-arm64-17.0.6-h832e737_2.conda
compilers                      1.8.0         hce30654_0            6.9 KiB    conda  compilers-1.8.0-hce30654_0.conda
curl                           8.10.1        h13a7ad3_0            153.7 KiB  conda  curl-8.10.1-h13a7ad3_0.conda
cxx-compiler                   1.8.0         he8d86c4_0            6.1 KiB    conda  cxx-compiler-1.8.0-he8d86c4_0.conda
fd-find                        10.2.0        h3bba108_0            921.1 KiB  conda  fd-find-10.2.0-h3bba108_0.conda
fortran-compiler               1.8.0         hc3477c4_0            6.1 KiB    conda  fortran-compiler-1.8.0-hc3477c4_0.conda
gettext                        0.22.5        h8414b35_3            471.9 KiB  conda  gettext-0.22.5-h8414b35_3.conda
gettext-tools                  0.22.5        h8414b35_3            2.4 MiB    conda  gettext-tools-0.22.5-h8414b35_3.conda
gfortran                       13.2.0        h1ca8e4b_1            31.2 KiB   conda  gfortran-13.2.0-h1ca8e4b_1.conda
gfortran_impl_osx-arm64        13.2.0        h252ada1_3            17.6 MiB   conda  gfortran_impl_osx-arm64-13.2.0-h252ada1_3.conda
gfortran_osx-arm64             13.2.0        h57527a5_1            34.4 KiB   conda  gfortran_osx-arm64-13.2.0-h57527a5_1.conda
gmp                            6.3.0         h7bae524_2            356.6 KiB  conda  gmp-6.3.0-h7bae524_2.conda
go                             1.23.2        h0037d84_0            90.5 MiB   conda  go-1.23.2-h0037d84_0.conda
greenlet                       3.1.1         py311h3f08180_0       230.8 KiB  conda  greenlet-3.1.1-py311h3f08180_0.conda
gtest                          1.14.0        h420ef59_2            361.3 KiB  conda  gtest-1.14.0-h420ef59_2.conda
icu                            75.1          hfee45f7_0            11.3 MiB   conda  icu-75.1-hfee45f7_0.conda
isl                            0.26          imath32_h347afa1_101  800.7 KiB  conda  isl-0.26-imath32_h347afa1_101.conda
krb5                           1.21.3        h237132a_0            1.1 MiB    conda  krb5-1.21.3-h237132a_0.conda
ld64                           951.9         h39a299f_1            18.5 KiB   conda  ld64-951.9-h39a299f_1.conda
ld64_osx-arm64                 951.9         hc81425b_1            989.3 KiB  conda  ld64_osx-arm64-951.9-hc81425b_1.conda
libasprintf                    0.22.5        h8414b35_3            39.7 KiB   conda  libasprintf-0.22.5-h8414b35_3.conda
libasprintf-devel              0.22.5        h8414b35_3            33.8 KiB   conda  libasprintf-devel-0.22.5-h8414b35_3.conda
libclang-cpp17                 17.0.6        default_h146c034_7    11.8 MiB   conda  libclang-cpp17-17.0.6-default_h146c034_7.conda
libcurl                        8.10.1        h13a7ad3_0            371 KiB    conda  libcurl-8.10.1-h13a7ad3_0.conda
libcxx                         19.1.1        ha82da77_0            510.6 KiB  conda  libcxx-19.1.1-ha82da77_0.conda
libcxx-devel                   17.0.6        h86353a2_6            801.6 KiB  conda  libcxx-devel-17.0.6-h86353a2_6.conda
libedit                        3.1.20191231  hc8eb9b7_2            94.3 KiB   conda  libedit-3.1.20191231-hc8eb9b7_2.tar.bz2
libev                          4.33          h93a5062_2            104.9 KiB  conda  libev-4.33-h93a5062_2.conda
libexpat                       2.6.3         hf9b8971_0            62.4 KiB   conda  libexpat-2.6.3-hf9b8971_0.conda
libffi                         3.4.2         h3422bc3_5            38.1 KiB   conda  libffi-3.4.2-h3422bc3_5.tar.bz2
libgettextpo                   0.22.5        h8414b35_3            156.1 KiB  conda  libgettextpo-0.22.5-h8414b35_3.conda
libgettextpo-devel             0.22.5        h8414b35_3            36.3 KiB   conda  libgettextpo-devel-0.22.5-h8414b35_3.conda
libgfortran                    5.0.0         13_2_0_hd922786_3     107.6 KiB  conda  libgfortran-5.0.0-13_2_0_hd922786_3.conda
libgfortran-devel_osx-arm64    13.2.0        h5d7a38c_3            1.9 MiB    conda  libgfortran-devel_osx-arm64-13.2.0-h5d7a38c_3.conda
libgfortran5                   13.2.0        hf226fd6_3            974 KiB    conda  libgfortran5-13.2.0-hf226fd6_3.conda
libiconv                       1.17          h0d3ecfb_2            660.6 KiB  conda  libiconv-1.17-h0d3ecfb_2.conda
libintl                        0.22.5        h8414b35_3            79.3 KiB   conda  libintl-0.22.5-h8414b35_3.conda
libintl-devel                  0.22.5        h8414b35_3            37.7 KiB   conda  libintl-devel-0.22.5-h8414b35_3.conda
libllvm17                      17.0.6        h5090b49_2            23.5 MiB   conda  libllvm17-17.0.6-h5090b49_2.conda
libmpack-lua                   1.0.12        hf50ae52_0            35.8 KiB   conda  libmpack-lua-1.0.12-hf50ae52_0.conda
libnghttp2                     1.58.0        ha4dd798_1            552.2 KiB  conda  libnghttp2-1.58.0-ha4dd798_1.conda
libprotobuf                    3.20.3        hb5ab8b9_0            1.8 MiB    conda  libprotobuf-3.20.3-hb5ab8b9_0.conda
libsqlite                      3.46.1        hc14010f_0            810.1 KiB  conda  libsqlite-3.46.1-hc14010f_0.conda
libssh2                        1.11.0        h7a5bd25_0            249.6 KiB  conda  libssh2-1.11.0-h7a5bd25_0.conda
libtermkey                     0.22          h93a5062_1            49.5 KiB   conda  libtermkey-0.22-h93a5062_1.conda
libtree-sitter                 0.23.2        hd74edd7_0            163.9 KiB  conda  libtree-sitter-0.23.2-hd74edd7_0.conda
libuv                          1.49.0        hd74edd7_0            403.2 KiB  conda  libuv-1.49.0-hd74edd7_0.conda
libvterm                       0.3.3         h93a5062_0            49.9 KiB   conda  libvterm-0.3.3-h93a5062_0.conda
libxml2                        2.12.7        h01dff8b_4            575.2 KiB  conda  libxml2-2.12.7-h01dff8b_4.conda
libzlib                        1.3.1         h8359307_2            45.3 KiB   conda  libzlib-1.3.1-h8359307_2.conda
llvm-openmp                    19.1.0        hba312e6_0            273.2 KiB  conda  llvm-openmp-19.1.0-hba312e6_0.conda
llvm-tools                     17.0.6        h5090b49_2            20.9 MiB   conda  llvm-tools-17.0.6-h5090b49_2.conda
lua                            5.4.6         hfd2a410_1            162.3 KiB  conda  lua-5.4.6-hfd2a410_1.conda
lua-lpeg                       1.1.0         h99b78c6_1            41.7 KiB   conda  lua-lpeg-1.1.0-h99b78c6_1.conda
luajit-openresty               2.1_20240815  h99b78c6_0            393.1 KiB  conda  luajit-openresty-2.1_20240815-h99b78c6_0.conda
luarocks                       3.9.2         lua54h4614cfb_2       157.1 KiB  conda  luarocks-3.9.2-lua54h4614cfb_2.conda
luv                            1.44.2        h93a5062_0            67.8 KiB   conda  luv-1.44.2-h93a5062_0.conda
make                           4.4.1         hc9fafa5_2            267.6 KiB  conda  make-4.4.1-hc9fafa5_2.conda
mpc                            1.3.1         h8f1351a_1            102.3 KiB  conda  mpc-1.3.1-h8f1351a_1.conda
mpfr                           4.2.1         hb693164_3            337.4 KiB  conda  mpfr-4.2.1-hb693164_3.conda
msgpack-c                      6.0.0         h9e231a4_1            33.8 KiB   conda  msgpack-c-6.0.0-h9e231a4_1.conda
msgpack-python                 1.1.0         py311h2c37856_0       89 KiB     conda  msgpack-python-1.1.0-py311h2c37856_0.conda
mypy_extensions                1.0.0         pyha770c72_0          10.2 KiB   conda  mypy_extensions-1.0.0-pyha770c72_0.conda
ncurses                        6.5           h7bae524_1            783.5 KiB  conda  ncurses-6.5-h7bae524_1.conda
neovim_remote                  2.5.1                               33.5 KiB   pypi   neovim_remote-2.5.1-py3-none-any.http.whl
nodejs                         22.9.0        h08fde81_0            14.2 MiB   conda  nodejs-22.9.0-h08fde81_0.conda
nvim                           0.10.2        h5867d45_0            6.8 MiB    conda  nvim-0.10.2-h5867d45_0.conda
openssl                        3.3.2         h8359307_0            2.7 MiB    conda  openssl-3.3.2-h8359307_0.conda
packaging                      24.1          pyhd8ed1ab_0          49.1 KiB   conda  packaging-24.1-pyhd8ed1ab_0.conda
pathspec                       0.12.1        pyhd8ed1ab_0          40.2 KiB   conda  pathspec-0.12.1-pyhd8ed1ab_0.conda
pip                            24.2          pyh8b19718_1          1.2 MiB    conda  pip-24.2-pyh8b19718_1.conda
platformdirs                   4.3.6         pyhd8ed1ab_0          20.1 KiB   conda  platformdirs-4.3.6-pyhd8ed1ab_0.conda
protobuf                       3.20.3        py311ha397e9f_1       345.3 KiB  conda  protobuf-3.20.3-py311ha397e9f_1.conda
psutil                         6.0.0         py311h460d6c5_1       502.4 KiB  conda  psutil-6.0.0-py311h460d6c5_1.conda
pynvim                         0.5.0         pyhd8ed1ab_0          39.9 KiB   conda  pynvim-0.5.0-pyhd8ed1ab_0.conda
python                         3.11.10       h739c21a_2_cpython    13.9 MiB   conda  python-3.11.10-h739c21a_2_cpython.conda
python_abi                     3.11          5_cp311               6.2 KiB    conda  python_abi-3.11-5_cp311.conda
readline                       8.2           h92ec313_1            244.5 KiB  conda  readline-8.2-h92ec313_1.conda
ripgrep                        14.1.0        h3bba108_1            1.3 MiB    conda  ripgrep-14.1.0-h3bba108_1.conda
rust                           1.81.0        h4ff7c5d_0            190.5 MiB  conda  rust-1.81.0-h4ff7c5d_0.conda
rust-std-aarch64-apple-darwin  1.81.0        hf6ec828_0            29.8 MiB   conda  rust-std-aarch64-apple-darwin-1.81.0-hf6ec828_0.conda
setuptools                     75.1.0        pyhd8ed1ab_0          759.2 KiB  conda  setuptools-75.1.0-pyhd8ed1ab_0.conda
sigtool                        0.1.3         h44b9a77_0            205.3 KiB  conda  sigtool-0.1.3-h44b9a77_0.tar.bz2
six                            1.16.0        pyh6c4a22f_0          13.9 KiB   conda  six-1.16.0-pyh6c4a22f_0.tar.bz2
tapi                           1300.6.5      h03f4b80_0            202.8 KiB  conda  tapi-1300.6.5-h03f4b80_0.conda
tk                             8.6.13        h5083fa2_1            3 MiB      conda  tk-8.6.13-h5083fa2_1.conda
tzdata                         2024b         hc8b5060_0            119.5 KiB  conda  tzdata-2024b-hc8b5060_0.conda
unibilium                      2.1.1         h93a5062_1            110.3 KiB  conda  unibilium-2.1.1-h93a5062_1.conda
unzip                          6.0           h3422bc3_3            160 KiB    conda  unzip-6.0-h3422bc3_3.tar.bz2
wheel                          0.44.0        pyhd8ed1ab_0          57.2 KiB   conda  wheel-0.44.0-pyhd8ed1ab_0.conda
xz                             5.2.6         h57fd34a_0            230.2 KiB  conda  xz-5.2.6-h57fd34a_0.tar.bz2
zlib                           1.3.1         h8359307_2            75.8 KiB   conda  zlib-1.3.1-h8359307_2.conda
zstd                           1.5.6         hb46c0d2_0            395.6 KiB  conda  zstd-1.5.6-hb46c0d2_0.conda

Environment info

      Pixi version: 0.31.0
          Platform: osx-arm64
  Virtual packages: __unix=0=0
                  : __osx=15.0=0
                  : __archspec=1=m1
         Cache dir: /Users/andre/.cache/pixi
      Auth storage: /Users/andre/.rattler/credentials.json
  Config locations: /Users/andre/.config/pixi/config.toml

Project
------------
              Name: neovim
     Manifest file: /Users/andre/.local/share/pixi/dotfile-envs/neovim/pixi.toml
      Last updated: 04-10-2024 16:09:41

Environments
------------
       Environment: default
          Features: default
          Channels: conda-forge
  Dependency count: 22
      Dependencies: python, bat, black, c-compiler, compilers, curl, fd-find, go, greenlet, lua, luarocks, nvim, make, nodejs, pip, protobuf, psutil, pynvim, ripgrep, rust, unzip, libtree-sitter
 PyPI Dependencies: neovim-remote
  Target platforms: linux-aarch64, linux-64, osx-arm64
             Tasks: build, npm
anjos commented 1 month ago

This is maybe related to #17.

anjos commented 1 month ago

@danielnachun: I see you're the maintainer of conda-forge/libtree-sitter-feedstock. I think the way forward to avoid this from happening in the future would be to add proper run_exports to that package as documented here. My current understanding is that library should have something lke (tune max_pin to define what compatibility with libtree-sitter upstream packages can expect):

build:
  run_exports:
    - {{ pin_subpackage('libtree-sitter', max_pin='x.x') }}

Then, in this package, one should only add a build dependency to libtree-sitter on the host section (and not anywhere else). This should make builds of this feedstock auto-depend on a pinned version of that dependency with some freedom (patch upgrades remain possible w/o changes to this build). Otherwise, a rebuild is required.

anjos commented 1 month ago

I further checked most of other dependencies.

These provide run_exports (and we can use these in the host section-only to leverage the auto-pins provided by maintainers):

These do not (and would need fixing to avoid issues in the future):

I do not think the lua modules need any fixing. Only the libraries above. I'll try to provide PRs with run_exports to those first.

danielnachun commented 1 month ago

Thanks @anjos, you are right about missing run_exports. I will work on adding these now!

anjos commented 1 month ago

Awesome 🙌 This will improve package usability!

danielnachun commented 1 month ago

@anjos I believe this is now fixed after I rebuilt the package. Can you check and close the issue as completed if so?

anjos commented 1 month ago

@danielnachun: thanks a lot for this effort! The update worked flawlessly on my setup. Also, looking for package I get the correctly pinned dependency set, whereas before it was not the case:

$ pixi search nvim           
Using channels: conda-forge

nvim h5867d45_1
---------------

Name                nvim               
Version             0.10.2
Build               h5867d45_1         
Size                7211365            
License             Apache-2.0         
Subdir              osx-arm64          
File Name           nvim-0.10.2-h5867d45_1.conda
URL                 https://conda.anaconda.org/conda-forge/osx-arm64/nvim-0.10.2-h5867d45_1.conda
MD5                 cef0e345d4ed66b71e7ee35bb558516d
SHA256              4205816ceed10a08787bd8eb2dab496c55e9d8918fb4911e3eeb22a946479cb0

Dependencies:
 - __osx >=11.0
 - libasprintf >=0.22.5,<1.0a0
 - libgettextpo >=0.22.5,<1.0a0
 - libiconv >=1.17,<2.0a0
 - libintl >=0.22.5,<1.0a0
 - libtermkey >=0.22,<0.23.0a0
 - libtree-sitter >=0.24.1,<0.25.0a0
 - libuv >=1.49.0,<2.0a0
 - libvterm >=0.3.3,<0.4.0a0
 - lua-lpeg
 - luajit-openresty
 - luv >=1.48.0,<1.49.0a0
 - msgpack-c >=6.0.0,<7.0a0
 - unibilium >=2.1.2,<2.2.0a0

Thanks again for the huge amount of work! 🚀

danielnachun commented 1 month ago

Thanks @anjos! I do hope to get lua-lpeg to have a proper run export once the upstream URL issue is figured out, and I'm also going to look into making luajit-openresty into a split package that has separate libluajit-openresty and luajit-openresty outputs so that we can eventually have a run export for that as well. Fortunately both of those packages hardly ever seem to make ABI breaking changes so I'm less concerned in the short term about them breaking nvim.