Patch 7.4.476

201 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 15, 2014, 6:07:31 AM10/15/14
to vim...@googlegroups.com

Patch 7.4.476
Problem: MingW: compiling with "XPM=no" doesn't work.
Solution: Check for the "no" value. (KF Leong) Also for Cygwin. (Ken
Takata)
Files: src/Make_ming.mak, src/Make_cyg.mak


*** ../vim-7.4.475/src/Make_ming.mak 2014-08-10 16:31:47.376709213 +0200
--- src/Make_ming.mak 2014-10-15 12:00:35.986008598 +0200
***************
*** 22,28 ****
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <rona...@yahoo.com> et al.
! # Updated 2012 Sep 5.

#>>>>> choose options:
# set to yes for a debug build
--- 22,28 ----
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <rona...@yahoo.com> et al.
! # Updated 2014 Oct 13.

#>>>>> choose options:
# set to yes for a debug build
***************
*** 613,619 ****
USE_STDCPLUS = yes
endif
endif
! ifdef XPM
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/xpm_w32.o
--- 613,619 ----
USE_STDCPLUS = yes
endif
endif
! ifneq ($(XPM),no)
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/xpm_w32.o
*** ../vim-7.4.475/src/Make_cyg.mak 2014-08-10 16:31:47.372709213 +0200
--- src/Make_cyg.mak 2014-10-15 12:06:01.170009309 +0200
***************
*** 485,491 ****
endif

##############################
! ifdef XPM
# Only allow XPM for a GUI build.
DEFINES += -DFEAT_XPM_W32
INCLUDES += -I$(XPM)/include
--- 485,491 ----
endif

##############################
! ifneq ($(XPM),no)
# Only allow XPM for a GUI build.
DEFINES += -DFEAT_XPM_W32
INCLUDES += -I$(XPM)/include
*** ../vim-7.4.475/src/version.c 2014-10-11 14:47:22.833275547 +0200
--- src/version.c 2014-10-15 12:03:39.186008999 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 476,
/**/

--
Women are probably the main cause of free software starvation.

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

Marslo Jiao

unread,
Oct 17, 2014, 6:10:18 AM10/17/14
to vim...@googlegroups.com


Error shows while using "GUI=yes" parameter, details as below:

xpm_w32.c:31:17: fatal error: xpm.h: No such file or directory
compilation terminated.
Make_cyg.mak:657: recipe for target 'gobj/xpm_w32.o' failed
make: *** [gobj/xpm_w32.o] Error 1

"GUI=no" can be built successfully.

------

My environment:
- Windows 7 64bit
- Using Cygwin
- Command:
make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no

Ken Takata

unread,
Oct 17, 2014, 7:25:29 AM10/17/14
to vim...@googlegroups.com
Hi Marslo,

Sorry, it's my mistake.
Could you try the attached patch?

Some part is copied from Make_ming.mak (7.3.653).
The patch 7.3.653 should also have updated Make_cyg.mak.

Regards,
Ken Takata

fix-7.4.476-cygwin.patch

Bram Moolenaar

unread,
Oct 17, 2014, 2:21:55 PM10/17/14
to Ken Takata, vim...@googlegroups.com
> > Error shows while using "GUI=yes" parameter, details as below:
> >
> > xpm_w32.c:31:17: fatal error: xpm.h: No such file or directory
> > compilation terminated.
> > Make_cyg.mak:657: recipe for target 'gobj/xpm_w32.o' failed
> > make: *** [gobj/xpm_w32.o] Error 1
> >
> > "GUI=no" can be built successfully.
> >
> > ------
> >
> > My environment:
> > - Windows 7 64bit
> > - Using Cygwin
> > - Command:
> > make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
>
> Sorry, it's my mistake.
> Could you try the attached patch?
>
> Some part is copied from Make_ming.mak (7.3.653).
> The patch 7.3.653 should also have updated Make_cyg.mak.

Merging Make_cyg.mak and Make_ming.mak might be a bit difficult, but
perhaps we can at least move the parts that are the same to a common
file and include it in both? We could gradually move more lines there.

--
The greatest lies of all time:
(1) The check is in the mail.
(2) We have a really challenging assignment for you.
(3) I love you.
(4) All bugs have been fixed.
(5) This won't hurt a bit.
(6) Honey, I just need to debug this program and be home in 5 minutes.
(7) I have just sent you an e-mail about that.
(8) Of course I'll respect you in the morning.
(9) I'm from the government, and I'm here to help you.

Marslo Jiao

unread,
Oct 19, 2014, 11:50:31 PM10/19/14
to vim...@googlegroups.com
Hi Ken,

On Friday, 17 October 2014 19:25:29 UTC+8, Ken Takata wrote:
> Hi Marslo,
>

> Sorry, it's my mistake.
> Could you try the attached patch?
> Some part is copied from Make_ming.mak (7.3.653).
> The patch 7.3.653 should also have updated Make_cyg.mak.
> Regards,
> Ken Takata

Your patch works. Thanks a lot!
Built files can be found at : https://sourceforge.net/projects/marslosvimgvim/files/7.4.476/

However, there something awkward... because the same error shows in v7-4-477, v7-4-478:

xpm_w32.c:31:17: fatal error: xpm.h: No such file or directory
compilation terminated.
Make_cyg.mak:657: recipe for target 'gobj/xpm_w32.o' failed
make: *** [gobj/xpm_w32.o] Error 1

I'm maintenance a project for vim/gvim version for windows. What should I do by using Cygwin?
You can tell me how to make the patch, and I can do that by myself. :)

Ken Takata

unread,
Oct 20, 2014, 7:33:11 AM10/20/14
to vim...@googlegroups.com
Hi Marslo,

2014/10/20 Mon 12:50:31 UTC+9 Marslo Jiao wrote:
> Hi Ken,
>
> On Friday, 17 October 2014 19:25:29 UTC+8, Ken Takata wrote:
> > Hi Marslo,
> >
> > Sorry, it's my mistake.
> > Could you try the attached patch?
> > Some part is copied from Make_ming.mak (7.3.653).
> > The patch 7.3.653 should also have updated Make_cyg.mak.
> > Regards,
> > Ken Takata
>
> Your patch works. Thanks a lot!
> Built files can be found at : https://sourceforge.net/projects/marslosvimgvim/files/7.4.476/
>
> However, there something awkward... because the same error shows in v7-4-477, v7-4-478:
>
> xpm_w32.c:31:17: fatal error: xpm.h: No such file or directory
> compilation terminated.
> Make_cyg.mak:657: recipe for target 'gobj/xpm_w32.o' failed
> make: *** [gobj/xpm_w32.o] Error 1

It's very strange. I couldn't reproduce it.
The patches from 7.4.477 to 7.4.481 didn't change anything related to xpm_w32.c.
So they should be compiled successfully if my patch is applied. (except
7.4.479)


> I'm maintenance a project for vim/gvim version for windows. What should I do by using Cygwin?
> You can tell me how to make the patch, and I can do that by myself. :)

I think there's nothing special to make a patch for Cygwin.
(Write a patch, do test, post the patch to vim_dev.)
This page might be a help? http://www.vim.org/develop.php

Regards,
Ken Takata

Ken Takata

unread,
Oct 21, 2014, 8:58:49 AM10/21/14
to vim...@googlegroups.com, ktakat...@gmail.com
Hi Bram,

2014/10/18 Sat 3:21:55 UTC+9 Bram Moolenaar wrote:
> Merging Make_cyg.mak and Make_ming.mak might be a bit difficult, but
> perhaps we can at least move the parts that are the same to a common
> file and include it in both? We could gradually move more lines there.

I have made patches following your idea.

1. 01-rename-ming-mak.patch
* Rename the old Make_ming.mak to cyg_ming.mak.

2. 02-remove-old-cyg-mak.patch
* Remove the old Make_cyg.mak.

3. 03-merge-cyg-ming-mak.patch
* Make new Make_ming.mak/Make_cyg.mak which include cyg_ming.mak.
Common parts are left in cyg_ming.mak, and MinGW/Cygwin specific parts are
moved to the each file.
* Some comments and documents are also updated.
* The default Ruby version is changed from 1.6 to 1.8 since it is already 1.8
in Make_mvc.mak.
(I think the default Python version (2.2) and Perl version (5.8) are very
old, but I didn't change them at this time.)

Regards,
Ken Takata

01-rename-ming-mak.patch
02-remove-old-cyg-mak.patch
03-merge-cyg-ming-mak.patch

Bram Moolenaar

unread,
Oct 21, 2014, 9:13:01 AM10/21/14
to Ken Takata, vim...@googlegroups.com
Thanks, sounds good. I'll leave testing to others.

I would prefer cyg_ming.mak to be called Make_cyg_ming.mak.
I don't think the long name is a problem these days.
It keeps the Makefiles sorted together.


--
The psychic said, "God bless you." I said, "I didn't sneeze." She
looked deep into my eyes and said, "You will, eventually." And, damn
if she wasn't right. Two days later, I sneezed. --Ellen Degeneres

Ken Takata

unread,
Oct 21, 2014, 9:41:46 AM10/21/14
to vim...@googlegroups.com, ktakat...@gmail.com
Hi,

Updated.

Regards,
Ken Takata

01-rename-ming-mak.patch
02-remove-old-cyg-mak.patch
03-merge-cyg-ming-mak.patch

KF Leong

unread,
Oct 21, 2014, 12:02:15 PM10/21/14
to vim...@googlegroups.com, ktakat...@gmail.com

> Updated.
>
> Regards,
> Ken Takata

Make_cyg.mak comments in lines 10, 12 and 44 still referring to cyg_ming.mak.

KF

KF Leong

unread,
Oct 21, 2014, 12:08:23 PM10/21/14
to vim...@googlegroups.com, ktakat...@gmail.com

> Updated.
>
> Regards,
> Ken Takata

Make_ming.mak comments in line 9 still referring cyg_ming.mak.

KF

Ken Takata

unread,
Oct 21, 2014, 12:15:56 PM10/21/14
to vim...@googlegroups.com, ktakat...@gmail.com
Hi KF,

Thanks. INSTALLpc.txt also still referred cyg_ming.mak.
03-merge-cyg-ming-mak.patch is updated.

Ken Takata

03-merge-cyg-ming-mak.patch

Marslo Jiao

unread,
Oct 23, 2014, 11:48:09 PM10/23/14
to vim...@googlegroups.com
Hi Ken,

On Monday, 20 October 2014 19:33:11 UTC+8, Ken Takata wrote:
> Hi Marslo,

> I think there's nothing special to make a patch for Cygwin.
> (Write a patch, do test, post the patch to vim_dev.)
> This page might be a help? http://www.vim.org/develop.php
>
> Regards,
> Ken Takata

Sorry for reply late.
I've tried patch fix-7.4.476-cygwin.patch to V7-4-477 (*patch -p1 < ../../fix-7.4.476-cygwin.patch*), and the error still shows in Cygwin:

$ make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
...
i686-pc-mingw32-gcc -c -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_huge -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python34.dll\" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -march=i386 -Iproto -s -I/include xpm_w32.c -o gobj/xpm_w32.o

Ken Takata

unread,
Oct 24, 2014, 1:07:16 AM10/24/14
to vim...@googlegroups.com
Hi,

2014/10/24 Fri 12:48:09 UTC+9 Marslo Jiao wrote:
> Hi Ken,
>
> On Monday, 20 October 2014 19:33:11 UTC+8, Ken Takata wrote:
> > Hi Marslo,
> > I think there's nothing special to make a patch for Cygwin.
> > (Write a patch, do test, post the patch to vim_dev.)
> > This page might be a help? http://www.vim.org/develop.php
> >
> > Regards,
> > Ken Takata
>
> Sorry for reply late.
> I've tried patch fix-7.4.476-cygwin.patch to V7-4-477 (*patch -p1 < ../../fix-7.4.476-cygwin.patch*), and the error still shows in Cygwin:
>
> $ make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
> ...
> i686-pc-mingw32-gcc -c -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_huge -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python34.dll\" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -march=i386 -Iproto -s -I/include xpm_w32.c -o gobj/xpm_w32.o

Hmm, strange.
If my patch is properly applied, the last part of the gcc command line:

-s -I/include xpm_w32.c -o gobj/xpm_w32.o

should be:

-s -Ixpm/x86/include -Ixpm/x86/../include xpm_w32.c -o gobj/xpm_w32.o


I verified with the following steps:

$ cd vim/src
$ hg update -r v7-4-477
$ patch -p2 < fix-7.4.476-cygwin.patch
patching file Make_cyg.mak
$ hg diff # Check if the patch is properly applied.
$ make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes GUI=yes
...
i686-pc-mingw32-gcc -c -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_huge -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python34.dll\" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -march=i386 -Iproto -s -Ixpm/x86/include -Ixpm/x86/../include xpm_w32.c -o gobj/xpm_w32.o

I didn't see any errors.

Regards,
Ken Takata

Marslo Jiao

unread,
Oct 24, 2014, 2:50:07 AM10/24/14
to vim...@googlegroups.com
Hi Ken,

Sorry for my mistake.
I've use -p1 in patch parameter, and it might something wrong with p1. After using parameter p2, the compile works fine!
Thanks again!

Br, Marslo
Reply all
Reply to author
Forward
0 new messages