It seems to be a known issue that the built-in version of vim in OSX Lion is broken and sometimes segfaults. For me, this happens when I open a combination of vertical and horizontal splits of different files and try to save one of them.
I found instructions at
http://www.jprabawa.com/2011/11/segmentation-fault-running-vim-on-os-x.html
that gives instructions on how to install a different version of vim to fix the problem, but when I run configure I get the following error:
jeff~/Documents/vim73$ ./configure --enable-gui=no
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/jeffreyhodes/Documents/vim73/src':
configure: error: C compiler cannot create executables
See `config.log' for more details.
I cannot find a config.log
file.
I've been using MacVim in the meantime, but having two separate apps for editing programs and running them is a pain. Does anyone have any wisdom to share on this problem?
EDIT: After installing the command line tools from X-Code 4.3, ./configure works, but now running make
gives the following error:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from os_macosx.m:19:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:9,
from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:10,
from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:17,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:54,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:52: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:194,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: 'type name' declared as function returning a function
make[1]: *** [objects/os_macosx.o] Error 1
make: *** [first] Error 2
I've temporarily patched this problem by running macvim through the command line with mvim -v
, but does anyone know how to solve the above problem?