Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better windows support (makefile) #24

Closed
luisiacc opened this issue Jun 13, 2021 · 5 comments · Fixed by #25
Closed

Better windows support (makefile) #24

luisiacc opened this issue Jun 13, 2021 · 5 comments · Fixed by #25

Comments

@luisiacc
Copy link

luisiacc commented Jun 13, 2021

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.

  • Tried with version 3.81 of make, same error.
@luisiacc
Copy link
Author

luisiacc commented Jun 13, 2021

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
Copy link
Member

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.

@Conni2461 Conni2461 reopened this Jun 13, 2021
@Conni2461 Conni2461 changed the title Error running make Better windows support (makefile) Jun 13, 2021
@luisiacc
Copy link
Author

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

@Conni2461
Copy link
Member

On linux mkdir throws an error without -p 🤣

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

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

@kylo252
Copy link

kylo252 commented Oct 19, 2021

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

  • documentation: how do you get gcc and make on Windows? should the user have MinGW or Cygwin?
  • "native" approach, whatever that might end up being. Maybe rely on something with MSVC and vcredist.

Related: some of the comments about moving fzf-native into telescope-core nvim-telescope/telescope.nvim#1228 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants