nvim-telescope / telescope-fzf-native.nvim

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

Better windows support (makefile) #24

Closed luisiacc closed 3 years ago

luisiacc commented 3 years ago

Got this error while compiling the plugin with make

mkdir -p build
cc -O3 -Wall -Werror -fpic -shared src/fzf.c -o build/libfzf.so
process_begin: CreateProcess(NULL, cc -O3 -Wall -Werror -fpic -shared src/fzf.c -o build/libfzf.so, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:8: build/libfzf.so] Error 2

make version:

GNU Make 4.3
Built for Windows32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

As you can see, I'm on Windows 10. Same error on powershell, cmd and alacritty.

luisiacc commented 3 years ago

So, I found out that this its because it is not recognizing cc as a command, changing it for a hardcoded gcc makes it work. What is cc ? Is it an environment variable for a c compiler ?

Conni2461 commented 3 years ago

On default $(CC) = cc and cc links to gcc. Thats the default usually for any unix based system. image

I have to admit, windows is not really supported by me because i don't use it or have any windows knowledge. But i will definitely address this at some point, maybe with a CI job. Thanks for bringing it on my table.

luisiacc commented 3 years ago

Since you are considering windows, mkdir -p build on windows creates 2 folders -p and build, I know, weird.

Conni2461 commented 3 years ago

On linux mkdir throws an error without -p :rofl:

       -p, --parents
              no error if existing, make parent directories as needed

I'll look into all this. Thanks for telling me

kylo252 commented 2 years ago

This is still hard to use on Windows. It needs either:

Related: some of the comments about moving fzf-native into telescope-core https://github.com/nvim-telescope/telescope.nvim/issues/1228#issuecomment-916664040.