|
Building
How to build MacVim
Building MacVim from the Git repositorySummaryIf you know what you are doing, then this should be enough to get you going:
Downloading and buildingTo get the source code you need Git, see below for installation instructions if you have not installed Git already. (Note that it is possible to get the source code without installing Git but it will be much easier to keep your local copy of the source code up to date once you have installed Git. See the comment at the end of this page on how to download the source code without using Git.) Once you have Git installed you first have to clone the MacVim.git repo, so open up Terminal and type the following commands: localhost:~ user$ git clone git://repo.or.cz/MacVim.git vim7 This will create a folder named vim7 and populate it with all the source code needed to build MacVim (you can choose any name you want instead of vim7). Next, you have to configure Vim to include the MacVim specific code (see the next section on how to enable extra features) and then build it localhost:~ user$ cd vim7/src localhost:~/vim7/src user$ ./configure localhost:~/vim7/src user$ make After make finishes you can find MacVim.app in the MacVim/build/Release/ folder; try to run it by typing localhost:~/vim7/src user$ open MacVim/build/Release/MacVim.app Once you are satisfied with the build, simply drag and drop MacVim.app into the /Applications folder (this is the preferred location, but it can be run from any folder). Enabling extra featuresThese are the parameters to configure you are most likely to want to enable:
As an example, say you are on OS X 10.6 and want to build a 32 bit binary (64 bit is the default on 10.6) with the "usual" features, and Python support. Then call configure like this: localhost:~/vim7/src user$ ./configure --with-macarchs=i386 --with-features=huge --enable-pythoninterp To see the list of all parameters, type ./configure --help (note that not all parameters in that list apply to Mac OS X). Updating an existing Git repositoryIf you already have the MacVim.git repo then updating it is as easy as localhost:~ user$ cd vim7 localhost:~/vim7 user$ git pull Contributing with patchesSee the wiki page on Contributing. Installing GitUsing the installerA prebuilt binary of Git for Mac OS X can be found here. Using MacPortsNote! If you do not already have MacPorts installed then be warned that installing both MacPorts and Git will take a long time. If you already have MacPorts installed, then you can install Git by opening a Terminal window and typing localhost:~ user$ sudo port install git-core +svn (The +svn flag is not strictly necessary, but if you might ever need to use the git-svn command in the future it is best to include it.) From the Git source codeThe source code for Git can be downloaded from http://git-scm.com. Using the ASL logging systemThere are four different filters controlling what gets logged or not
localhost:~ user$ defaults write org.vim.MacVim MMLogLevel 7 will enable all log messages past the local filter (requires a restart of MacVim). ASL will still block them however since the database filter blocks Debug and Info level messages as well. To change this use the syslog command: localhost:~ user$ sudo syslog -c syslogd -d Now you'll be able to see all logs from MacVim in Console.app, or by using syslog: localhost:~ user$ syslog -w | grep Vim When you are done debugging you can reset the database filter as follows: localhost:~ user$ sudo syslog -c syslogd off It is also possible to have MacVim log to stderr as follows: localhost:~ user$ defaults write org.vim.MacVim MMLogToStdErr 1 This requires a restart of MacVim. To disable substitute the 1 for a 0. Note that getting the logs to appear on stder does not require that you change the database filter as described above. A tip: instead of using defaults to change MMLogLevel and MMLogToStdErr you can pass these as command line options to the MacVim binary (inside the app bundle) as follows: localhost:~ user$ ./MacVim.app/Contents/MacOS/MacVim -MMLogLevel 7 -MMLogToStdErr 1 The levels passed to MMLogLevel are the same as are used by ASL, see man syslog for a complete list (5 is the default level). Random notes
cd /usr/lib/ruby/1.8/powerpc-darwin8.0 sudo ln -s ../universal-darwin8.0/*.h ./ Building MacVim from the Subversion repositoryThe subversion repository has been deprecated, please use Git to download and build MacVim. |
Sign in to add a comment
Please note, that it is not necessary to install git! Go to the Git repository. Pick the desired changeset in the list and use the "snapshot" link to download a tar.gz. Extract the tar.gz and go on with building MacVim?. -- mb
Leopard Intel Installers for Git can be found over here, if you don't want to compile them:
http://code.google.com/p/git-osx-installer/
build errors
I got build errors right after a git clone, barfing about not finding some osdefs.shind src/auto.
Google yields http://www.nabble.com/Re:-Problems-compiling-vim-with---enable-gui-on-Debian-4.0-td16786854.html
The scoop is that a
Is sometimes needed.
Is --enable-pythoninterp the correct option to enable python support?
Try "./configure --help" in the src/ folder.
In the future, please direct questions to the vim_mac mailing list. Thanks!
Makefile ignores --enable-rubyinterp
and
undefined symbols for architecture ppc
Un-commenting the line '#CONF_OPT_RUBY = --enable-rubyinterp' in the Makefile was ignored on my system. I had to specify Ruby explicitly in the Configure:
./configure --enable-gui-macvim --enable-rubyinterp
But attempting to 'make' that config failed with the 'undefined symbols for architecture ppc' error. I avoided making the ppc config by editing the 'auto/config.mk' file produced by 'configure' to delete the '--arch ppc' flag.
I have no idea why the configure was adding 'ppc' to the compiler flags - I tried explicitly setting '--with-mac-arch=i386' (and even '=intel', after looking at at post from Bjorn) to no avail.
Editing auto/config.mk by hand is not the right answer, as the unwanted 'ppc' flags will return every time you re-run configure. I hope somebody can explain why 'ppc' is creeping into my config, and post the proper procedure...
One clue is that 'ppc' does not appear until I compile with Ruby enabled.
I'm interested in Python 2.5 support. These instructions don't work for me on Leopard--
/configure --enable-perlinterp --enable-pyttyhoninterp --enable-rubyinterp --enable-cscope --enable-gui=macvim --with-mac-arch=intel --with-features=huge
results in
checking for tgetent()... configure: error: NOT FOUND!
So then I tried
./configure --enable-perlinterp --enable-pyttyhoninterp --enable-rubyinterp --enable-cscope --enable-gui=macvim --with-mac-arch=intel --with-features=huge --with-tlib=ncurses
But configure fails again with
checking --with-tlib argument... ncurses checking for linking with ncurses library... configure: error: FAILED
If I run "otool -L which vim | grep curses" I see
I really don't want to have to install MacPorts? to build this. What can I do?
Please post all questions to the vim_mac mailing list. There are several people reading that list whereas there are not many people reading these comment sections. I'll try to reply to your question once you've posted to vim_mac. Thanks!
awesome work, build on Snow Leopard from git is worked! Thanks.