Mingw-make Building Vim.8.2.4398 causes error

32 views
Skip to first unread message

Ni Va

unread,
Feb 16, 2022, 2:18:37 PM2/16/22
to vim_dev
Hi, 

Trying to build gvim under MSYS2 Win10 with make_ming.mak cause error.


mingw-make error on attempt to build Vim.8.2.4398

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=i686 -Wall -I./lua-5.4.4/src/include -I./lua-5.4.4/src -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_RUBY -I c:/Ruby31/include/ruby-3.1.0 -I c:/Ruby31/include/ruby-3.1.0/i386-mingw32 -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby310.dll\" -DRUBY_VERSION=31 -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python311.dll\" -O3 -fomit-frame-pointer -freg-struct-return -std=gnu++11 if_ole.cpp -o gobji686/if_ole.o
In file included from vim.h:433,
                 from if_ole.cpp:16:
termdefs.h:127:16: warning: unnecessary parentheses in declaration of 'term_strings' [-Wparentheses]
  127 | extern char_u *(term_strings[]);    // current terminal strings
      |                ^~~~~~~~~~~~~~~~
termdefs.h:127:16: note: remove parentheses
  127 | extern char_u *(term_strings[]);    // current terminal strings
      |                ^~~~~~~~~~~~~~~~
      |                -              -
In file included from vim.h:1882,
                 from if_ole.cpp:16:
structs.h:2790:18: warning: unnecessary parentheses in declaration of 'b_maphash' [-Wparentheses]
 2790 |     mapblock_T  *(b_maphash[256]);
      |                  ^~~~~~~~~~~~~~~~
structs.h:2790:18: note: remove parentheses
 2790 |     mapblock_T  *(b_maphash[256]);
      |                  ^~~~~~~~~~~~~~~~
      |                  -              -
structs.h:3244:22: warning: unnecessary parentheses in declaration of 'tp_diffbuf' [-Wparentheses]
 3244 |     buf_T           *(tp_diffbuf[DB_COUNT]);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
structs.h:3244:22: note: remove parentheses
 3244 |     buf_T           *(tp_diffbuf[DB_COUNT]);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
      |                      -                    -
structs.h:3248:22: warning: unnecessary parentheses in declaration of 'tp_snapshot' [-Wparentheses]
 3248 |     frame_T         *(tp_snapshot[SNAP_COUNT]);  // window layout snapshots
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
structs.h:3248:22: note: remove parentheses
 3248 |     frame_T         *(tp_snapshot[SNAP_COUNT]);  // window layout snapshots
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                      -                       -
In file included from proto.h:210,
                 from vim.h:2244,
                 from if_ole.cpp:16:
proto/usercmd.pro:3:76: error: expected ')' before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                   ~                                        ^~~~~~
      |                                                                            )
proto/usercmd.pro:3:77: error: expected initializer before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                                                             ^~~~~
mingw32-make: *** [Make_cyg_ming.mak:1274: gobji686/if_ole.o] Error 1
         24,151 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)

Bram Moolenaar

unread,
Feb 16, 2022, 3:06:45 PM2/16/22
to vim...@googlegroups.com, Ni Va
This is a bogus warning, the parentheses are fine. They have been added
because precedence in C declarations is often unclear. You can probably
avoid the warning by tuning your compiler arguments.

> In file included from proto.h:210,
> from vim.h:2244,
> from if_ole.cpp:16:
> proto/usercmd.pro:3:76: error: expected ')' before 'compl' token
> 3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long
> argt, int compl, expand_T *xp, int forceit);
> | ~
> ^~~~~~
> |
> )
> proto/usercmd.pro:3:77: error: expected initializer before 'compl' token
> 3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long
> argt, int compl, expand_T *xp, int forceit);
> |
> ^~~~~

Don't see anything wrong here.

--
Master: Boy, there is nothing more for you to learn
Student: I didn't know that!

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Ni Va

unread,
Feb 16, 2022, 4:34:22 PM2/16/22
to vim_dev
Here is the error

In file included from proto.h:210,
                 from vim.h:2244,
                 from if_ole.cpp:16:
proto/usercmd.pro:3:76: error: expected ')' before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                   ~                                        ^~~~~~
      |                                                                            )
proto/usercmd.pro:3:77: error: expected initializer before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                                                             ^~~~~
mingw32-make: *** [Make_cyg_ming.mak:1274: gobji686/if_ole.o] Error 1

Ni Va

unread,
Feb 18, 2022, 8:05:21 AM2/18/22
to vim_dev
Here are my flags 

FLAGS="OLE=yes GUI=yes XPM=no DIRECTx=yes DYNAMIC_LUA=yes LUA=./$LuaDir/src LUA_VER=54 \
        PYTHON3=$Python3Dir DYNAMIC_PYTHON3=yes PYTHON3_VER=311 DYNAMIC_PYTHON3_DLL=python311.dll \
        RUBY=$RubyDir DYNAMIC_RUBY=yes RUBY_VER=31 RUBY_API_VER_LONG=3.1.0 -I/c/Ruby31-x64/include/ruby-3.1.0/ruby \
        TERMINAL=yes EVENT_LOOP=yes STATIC_STDCPLUS=yes WINVER=0x0A00"

With dirs
     LuaDir="./lua-5.4.4"
     RubyDir="c:/Ruby31"
     Python3Dir="c:/Python310"


Here is the make command that build gvim.exe when OLE fag is set to no.
mingw32-make -f Make_ming.mak ${FLAGS} DIRECTX=yes DEBUG=no OLE=no

And then if i set OLE flag to yes causes error
# mingw32-make -f Make_ming.mak ${FLAGS} DIRECTX=yes DEBUG=no OLE=yes

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=i686 -Wall -I./lua-5.4.4/src/include -I./lua-5.4.4/src -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_RUBY -I c:/Ruby31/include/ruby-3.1.0 -I c:/Ruby31/include/ruby-3.1.0/i386-mingw32 -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby310.dll\" -DRUBY_VERSION=31 -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python311.dll\" -O3 -fomit-frame-pointer -freg-struct-return -std=gnu++11 if_ole.cpp -o gobji686/if_ole.o
In file included from vim.h:433,
                 from if_ole.cpp:16:

proto/usercmd.pro:3:76: error: expected ')' before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                   ~                                        ^~~~~~
      |                                                                            )
proto/usercmd.pro:3:77: error: expected initializer before 'compl' token
    3 | char_u *set_context_in_user_cmdarg(char_u *cmd, char_u *arg, long argt, int compl, expand_T *xp, int forceit);
      |                                                                             ^~~~~
mingw32-make: *** [Make_cyg_ming.mak:1274: gobji686/if_ole.o] Error 1

Bram Moolenaar

unread,
Feb 18, 2022, 8:58:18 AM2/18/22
to vim...@googlegroups.com, Ni Va
It turns out that some C++ standard added "compl" as a keyword. It's an
alternative for the ~ operator.

Strange that there is no complaint from any other build setup.

I'll rename it.

--
I got a new desk stapler. It broke on the first desk I tried.

Ni Va

unread,
Feb 18, 2022, 9:01:28 AM2/18/22
to vim_dev
Thank you ! Bram :)
Reply all
Reply to author
Forward
0 new messages