Building Vim on Windows

54 views
Skip to first unread message

Salman Halim

unread,
Jun 24, 2013, 11:15:30 AM6/24/13
to v...@vim.org
Hello,

I've been building GVim on Windows (7, these days) since the Vim 6 days and haven't had these problems before. Bram didn't know what was going on and suggested I ask here. Hoping someone can help shed some light on the issue:

I use the BCC (Borland's free compiler) to build Vim; as of 7.3.944 (the last one that built and worked for me), I have been getting a lot of warnings where it eventually aborts after 100 warnings. The warnings have to do with function prototypes not being defined (these warnings are legitimate and go away after I define the prototypes myself) and something in the if_py_both.h file, with which I'm not familiar (obviously, it's for both Python versions).

Anyway, after I've removed the 100-warning limit (by adding a -g0 to the makefile), the build proceeds. However, the resulting GVim doesn't read anything from my autoload directory AND immediately erases every file I try to edit by removing everything in it and saving it (this might be a plugin, but there are so many errors that I can't work it out).

Has anybody else tried to build a huge GVim (with Python) on Windows? I'd appreciate if you would share your environment/build process with me, please.

Thank you,

Salman

--
سلمان حلیم

Ben Fritz

unread,
Jun 24, 2013, 11:36:58 AM6/24/13
to vim...@googlegroups.com, v...@vim.org
On Monday, June 24, 2013 10:15:30 AM UTC-5, Salman Halim wrote:
>
> Has anybody else tried to build a huge GVim (with Python) on Windows? I'd appreciate if you would share your environment/build process with me, please.
>

I don't have any input on the warnings and such, but I can answer this.

I build on Windows (vista and previously XP) using MinGW, and build the huge version with python.

I do not recall what the last version I've built however. I will try that tonight with the latest version.

Here is the .bat script I use to build:

https://code.google.com/r/fritzophrenic-vim-clone/source/browse/build.bat?name=2html-dev

Salman Halim

unread,
Jun 24, 2013, 12:03:50 PM6/24/13
to Vim Users
Ben,
Thank you for this; I was wondering: does building with MinGW change GVim into a GNU-ish application? Can I still use paths like "c:\test\some\file.txt"? While I use the forward slash almost exclusively, it is nice to occasionally be able to take a file path someone else gave me and just :e or :sp it.

It might be time to get MinGW (already have Cygwin and very pleased with it).

Thank you,

Salman

Ben Fritz

unread,
Jun 24, 2013, 12:28:01 PM6/24/13
to vim...@googlegroups.com
On Monday, June 24, 2013 11:03:50 AM UTC-5, Salman Halim wrote:
>
> Thank you for this; I was wondering: does building with MinGW change GVim into a GNU-ish application? Can I still use paths like "c:\test\some\file.txt"? While I use the forward slash almost exclusively, it is nice to occasionally be able to take a file path someone else gave me and just :e or :sp it.
>

Nope, MinGW just uses unix-like tools to build a native Windows application. I actually can't use cygwin paths from my MinGW Vim build, it's all native Windows paths.

You can use the forward slash on Windows, though, like :e c:/test/some/file.txt. This doesn't depend on what you used to compile.

Salman Halim

unread,
Jun 24, 2013, 12:53:42 PM6/24/13
to Vim Users

Ben,

Thank you, again; I'll make the switch and see how it works out. I really appreciate your suggestions and responses.

Now, I wonder what can be done about the Borland compiler's issues.

Salman

Nikolay Pavlov

unread,
Jun 24, 2013, 1:14:25 PM6/24/13
to vim...@googlegroups.com

Nothing until you post them. Most developers here are on linux like me (with gcc or clang or both) or on windows, but with mingw. With warnings posted we may be able to guess a fix, but without you will have to wait for someone with Windows and bcc which is a very unpopular choice.

Note that at least some problems (I would expect one or two, but I do not know how verbose is bcc with macros error) in if_py_both.h may be fixed by one of the patches posted here.

> Salman
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>  
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Salman Halim

unread,
Jun 24, 2013, 1:21:57 PM6/24/13
to Vim Users
On Mon, Jun 24, 2013 at 1:14 PM, Nikolay Pavlov <zyx...@gmail.com> wrote:


On Jun 24, 2013 8:53 PM, "Salman Halim" <salma...@gmail.com> wrote:

> Now, I wonder what can be done about the Borland compiler's issues.

Nothing until you post them. Most developers here are on linux like me (with gcc or clang or both) or on windows, but with mingw. With warnings posted we may be able to guess a fix, but without you will have to wait for someone with Windows and bcc which is a very unpopular choice.

Makes sense; will do as soon as am able.

Note that at least some problems (I would expect one or two, but I do not know how verbose is bcc with macros error) in if_py_both.h may be fixed by one of the patches posted here.

I've posted them in a previous post, but the only response I got was from Bram and he just said to try the next patch, which didn't help at all (as I was already well past the 944 in my Mercurial pull of the code base), after which he said to just post here again.

I was able to fix the "prototype not found" warnings easily enough myself; will post the Python ones when I'm back at the home computer.

I concede that BCC might be an unpopular choice, but as long as Vim continues to include a make file for it, I assume it's because someone (besides me; my use of it wasn't public knowledge until I just admitted it on this email list!) uses it. If not, why bother?

Thank you,

Salman

Salman Halim

unread,
Jun 25, 2013, 9:48:00 AM6/25/13
to Vim Users
On Mon, Jun 24, 2013 at 1:21 PM, Salman Halim <salma...@gmail.com> wrote:
I was able to fix the "prototype not found" warnings easily enough myself; will post the Python ones when I'm back at the home computer.

I concede that BCC might be an unpopular choice, but as long as Vim continues to include a make file for it, I assume it's because someone (besides me; my use of it wasn't public knowledge until I just admitted it on this email list!) uses it. If not, why bother?

After fiddling a bit with the MinGW paths (I also have Cygwin installed), I got a clean build with MinGW, which is great: thanks again, Ben, for the pointer. As for the BCC warnings, the list is large, so I'm including it here in as an attachment. However, to summarize, here are a few sample lines from the output (again, the addition of a function prototype earlier in the file got rid of this warning, but it's not there when I build with MinGW at all):

Warning W8065 .\regexp_nfa.c 2625: Call to function 'nfa_max_width' with no prototype in function nfa_max_width

Warning W8066 .\regexp_nfa.c 2814: Unreachable code in function nfa_max_width

Also, there are about 100 of these (on steadily increasing line numbers):

Warning W8060 if_python.c 772: Possibly incorrect assignment in function py_memsave

These seem rather suspicious:

Warning W8053 .\os_win32.c 2681: '_chmod(const signed char *,int,...)' is obsolete in function mch_setperm
Warning W8070 .\os_win32.c 3614: Function should return a value in function sub_process_writer

There are no actual errors, just a bunch of warnings. The final build, however, corrupts every file it touches absolutely.

This is no longer pressing for me, personally, but I do feel that we should either renege on support for BCC or fix it. It would help if we knew if anybody still uses BCC...

Salman
b.out
Reply all
Reply to author
Forward
0 new messages