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

building on Windows #328

Closed
justinmk opened this issue Mar 7, 2014 · 7 comments
Closed

building on Windows #328

justinmk opened this issue Mar 7, 2014 · 7 comments
Labels
build building and installing Neovim using the provided scripts

Comments

@justinmk
Copy link
Member

justinmk commented Mar 7, 2014

[ Continuing discussion from issue #287 ]

I can build libuv on MSVC 2013, but not mingw. It seems that libuv only supports building on MSVC, not mingw, and definitely not cygwin: joyent/libuv#845

Using msys2 which bundles the latest mingw-w64:

$ make -f Makefile.mingw
cc -Wall -Wextra -Wno-unused-parameter -Iinclude -Isrc -Isrc/win -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600 -c -o src/fs-poll.o src/fs-poll.c
In file included from include/uv.h:61:0,
                 from src/fs-poll.c:22:
include/uv-unix.h:145:1: error: unknown type name ‘pthread_barrier_t’
 typedef pthread_barrier_t uv_barrier_t;
 ^
Makefile.mingw:82: recipe for target 'src/fs-poll.o' failed
make: *** [src/fs-poll.o] Error 1

Similar issue was reported to libuv 8 months ago. In practice, libuv only supports MSVC.

@jszakmeister
Copy link
Contributor

Good to know. I'd like to make the build system capable of using MSVC--though I don't really run Windows myself. But having done development in MSYS and cygwin, it much better to be as native as possible. It makes integration with other things under Windows that much easier.

@equalsraf
Copy link
Contributor

I gave it a whirl last night using MSVC 2012. Here is a quick progress report, I'm not on windows right now, but I will push some patches when I get the chance.

  • libUV built without issues (static)
  • There is a check for pthreads in CMakeLists.txt:31, should it be removed? I was under the impression we would rely on the uv API
  • FindLibUV.cmake was unable to find libuv without modifications - set(_uv_names uv libuv) - after that it worked ok
  • CMake was able to find the GNUWin32 curses libraries
  • I was able to start building with nmake, but it failed because MSVC 2012 does not have stdbool.h

I'll give it another shot later, either with MSVC 2013, or by defining bool/true/false by hand. In any case if c99 is what we assume for neovim (#161) then MSVC 2013 is the way to go.

@equalsraf
Copy link
Contributor

Tested with MSVC 2013, the stdbool.h error is now gone and I'm starting to get into errors related with UNIX types (timeval, uid_t, mode_t) and since most defines are currently hardcoded in config.h.in I don't think we can proceed without porting some functions to use libuv.

On a positive note

  • some problems (struct timeval) can be solved simply by including uv.h (i.e. libuv finds and includes the right headers)
  • libuv also includes some abstract types (uv_uid_t instead of uid_t)

@felipecrv
Copy link
Contributor

@mahkoh once said we're only supporting MSVC > 2013
On Mar 21, 2014 6:19 AM, "Rui Abreu Ferreira" notifications@github.com
wrote:

I gave it a whirl last night using MSVC 2012. Here is a quick progress
report, I'm not on windows right now, but I will push some patches when I
get the chance.

  • libUV built without issues (static)
  • There is a check for pthreads in CMakeLists.txt:31, should it be
    removed? I was under the impression we would rely on the uv API
  • FindLibUV.cmake was unable to find libuv without modifications -
    set(_uv_names uv libuv) - after that it worked ok
  • CMake was able to find the GNUWin32 curses libraries
  • I was able to start building with nmake, but it failed because MSVC
    2012 does not have stdbool.h

I'll give it another shot later, either with MSVC 2013, or by defining
bool/true/false by hand. In any case if c99 is what we assume for neovim (
#161 #161) then MSVC 2013 is the
way to go.

Reply to this email directly or view it on GitHubhttps://github.com//issues/328#issuecomment-38259367
.

@tarruda
Copy link
Member

tarruda commented Apr 4, 2014

We can focus on building for mingw later. Closing for now

@tarruda tarruda closed this as completed Apr 4, 2014
@justinmk
Copy link
Member Author

justinmk commented Apr 4, 2014

@tarruda this issue was also for MSVC.

@tarruda
Copy link
Member

tarruda commented Apr 4, 2014

@justinmk even so, we should focus on building for windows only after libuv/new GUI. Right now there are probably many things that just won't work on windows, one for sure is the mch_call_shell function which is used everywhere for executing commands.(Though that is being fixed by #444)

Grimy pushed a commit to Grimy/neovim that referenced this issue Jan 7, 2015
Use new Jedi API for keyword checking in goto funcs
dwb pushed a commit to dwb/neovim that referenced this issue Feb 21, 2017
butwerenotthereyet pushed a commit to butwerenotthereyet/neovim that referenced this issue Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build building and installing Neovim using the provided scripts
Projects
None yet
Development

No branches or pull requests

5 participants