nvim-telescope / telescope-fzf-native.nvim

FZF sorter for telescope written in c
1.36k stars 45 forks source link

android/termux INSTALL cannot find libfzf.so #76

Closed RolandWarburton closed 2 years ago

RolandWarburton commented 2 years ago

Hi all,

I am trying to compile telescope-fzf-native.nvim for my android phone through termux (latest version 0.118.0 as downloaded from github 1 hour ago).

I have installed make and cmake, GCC seems to have come with termux.

Below is the output of make --version

GNU Make 4.3
Built for aarch64-unknown-linux-android
...

Below is the output of cmake --version

cmake version 3.23.2

Below is the output of nvim --version. I have also tried dropping down to 0.7 with the same error.

NVIM v0.8.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang -fstack-protector-strong -Oz --target=aarch64-linux-android24 -I/data/data/com.termux/files/usr/include -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/builder/.termux-build/neovim-nightly/build/cmake.config -I/home/builder/.termux-build/neovim-nightly/src/src -I/data/data/com.termux/files/usr/include -I/home/builder/.termux-build/neovim-nightly/build/src/nvim/auto -I/home/builder/.termux-build/neovim-nightly/build/include
Compiled by builder@d2ee8b3c5dcf

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/data/data/com.termux/files/usr/share/nvim"

I am using the latest version of packer. As instructed I am using the cmake command in my packer config below.

use {'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }

However, after starting nvim, the make fails.

To try and gather some more information, I moved to the directory that telescope-fzf-native.nvim is located and ran the command from there (~/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim/)

Below is the output of my attempt to install outside of nvim manually. And hopefully a useful error (unfortunately not very useful to me).

telescope-fzf-native.nvim ❯ cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build
-- Configuring done
-- Generating done
-- Build files have been written to: /data/data/com.termux/files/home/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim/build
Consolidate compiler generated dependencies of target fzf
[ 50%] Linking C shared library libfzf.so
[100%] Built target fzf
-- Install configuration: "Release"
CMake Error at build/cmake_install.cmake:60 (file):
  file INSTALL cannot find
  "/data/data/com.termux/files/home/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim/build/libfzf.so":
  No such file or directory.

Below is a screenshot of above with the error in red as seen on the terminal. image

As always, termux isn't listed as supported so I never expect anything to work first try. But if you think there is something I have missed here, or where I can find this libfzf.so file your help would be appreciated.

Thanks!

Conni2461 commented 2 years ago

hmm i am not familiar with termux but i will look into it.

In the meantime you could try the second way of building it by just using the provided Makefile which was the original way of doing things because i am not a cmake fan. CMake was mainly added to improve portability with windows. We will continue to support both build systems going forward.

So navigate to the repo and just run make. If build/libfzf.so exists after running make, everything should work and you should be able to use fzf-native

Thanks for reporting and your sponsoring :)

RolandWarburton commented 2 years ago

Just did a quick test, it seems like it was as simple as that!

So it looks like make is a lot better here (ignoring windows), I don't know anything about make or cmake, so upon scanning the readme I took the first one (cmake) and that's how I ended up here.

Thank you for your hard work bringing fzf to neovim, I appreciate the help.