Mercurial > vim
annotate src/INSTALL @ 25315:cf45fde10bdb
Added tag v8.2.3194 for changeset 7e620652bd13fd4313bc3cb7d4d34ccd48166ec4
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Jul 2021 19:15:04 +0200 |
parents | 5bda4653aced |
children | d4faa2c5211b |
rev | line source |
---|---|
7 | 1 INSTALL - Installation of Vim on different machines. |
2 | |
3 This file contains instructions for compiling Vim. If you already have an | |
4 executable version of Vim, you don't need this. | |
5 | |
6 Contents: | |
7 1. Generic | |
8 2. Unix | |
2834 | 9 3. OS/2 (with EMX 0.9b) |
10 4. Atari MiNT | |
7 | 11 |
1268 | 12 See INSTALLami.txt for Amiga |
13 See INSTALLmac.txt for Macintosh | |
15034
6e4e0d43b20b
patch 8.1.0528: various typos in comments
Bram Moolenaar <Bram@vim.org>
parents:
10375
diff
changeset
|
14 See INSTALLpc.txt for PC (Windows XP/Vista/7/8/10) |
1268 | 15 See INSTALLvms.txt for VMS |
1622 | 16 See INSTALLx.txt for cross-compiling on Unix |
15034
6e4e0d43b20b
patch 8.1.0528: various typos in comments
Bram Moolenaar <Bram@vim.org>
parents:
10375
diff
changeset
|
17 See ../READMEdir/README_390.txt for z/OS and OS/390 Unix |
19526
22f0dda71638
patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents:
15034
diff
changeset
|
18 See ../runtime/doc/os_haiku.txt for Haiku |
7 | 19 |
20 1. Generic | |
21 ========== | |
22 | |
23 If you compile Vim without specifying anything, you will get the default | |
24 behaviour as is documented, which should be fine for most people. | |
25 | |
26 For features that you can't enable/disable in another way, you can edit the | |
27 file "feature.h" to match your preferences. | |
28 | |
29 | |
30 2. Unix | |
31 ======= | |
32 | |
33 Summary: | |
34 1. make run configure, compile and link | |
35 2. make install installation in /usr/local | |
36 | |
37 This will include the GUI and X11 libraries, if you have them. If you want a | |
38 version of Vim that is small and starts up quickly, see the Makefile for how | |
1268 | 39 to disable the GUI and X11. If you don't have GUI libraries and/or X11, these |
7 | 40 features will be disabled automatically. |
41 | |
24520 | 42 To build Vim on Ubuntu from scratch on a clean system using git: |
23796
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
43 Install tools required to be able to get and build Vim: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
44 % sudo apt install git |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
45 % sudo apt install make |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
46 % sudo apt install clang |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
47 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
48 Build Vim with default features: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
49 % git clone https://github.com/vim/vim.git |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
50 % cd vim/src |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
51 % make |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
52 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
53 Run tests to check there are no problems: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
54 % make test |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
55 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
56 Install Vim in /usr/local: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
57 % sudo make install |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
58 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
59 Add X windows clipboard support (also needed for GUI): |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
60 % sudo apt install libxt-dev |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
61 % make reconfig |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
62 |
24103 | 63 Add GUI support: |
64 % sudo apt install libgtk-3-dev | |
23796
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
65 % make reconfig |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
66 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
67 Add Python 3 support: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
68 % sudo apt install libpython3-dev |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
69 Uncomment this line in Makefile: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
70 "CONF_OPT_PYTHON3 = --enable-python3interp" |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
71 % make reconfig |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
72 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
73 Debugging: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
74 % sudo apt install valgrind |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
75 Uncomment this line in Makefile: |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
76 CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
77 % make reconfig |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
78 % make test_{test-name} |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
79 See output in testdir/valgrind.test_{test-name} |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
80 |
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
81 |
7 | 82 See the start of Makefile for more detailed instructions about how to compile |
83 Vim. | |
84 | |
85 If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS | |
86 before starting configure. Example: | |
87 | |
23796
4284b0a2b901
patch 8.2.2439: not easy to figure out what packages to get
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
88 env CFLAGS=-I/usr/local/include LIBS=-lm make |
7 | 89 |
90 This is only needed for things that configure doesn't offer a specific argument | |
91 for or figures out by itself. First try running configure without extra | |
92 arguments. | |
93 | |
94 GNU Autoconf and a few other tools have been used to make Vim work on many | |
95 different Unix systems. The advantage of this is that Vim should compile | |
2278
0b3be97064e5
Various small fixes from Dominique Pelle.
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
96 on most systems without any adjustments. The disadvantage is that when |
7 | 97 adjustments are required, it takes some time to understand what is happening. |
98 | |
99 If configure finds all library files and then complains when linking that some | |
100 of them can't be found, your linker doesn't return an error code for missing | |
101 libraries. Vim should be linked fine anyway, mostly you can just ignore these | |
102 errors. | |
103 | |
104 If you run configure by hand (not using the Makefile), remember that any | |
105 changes in the Makefile have no influence on configure. This may be what you | |
106 want, but maybe not! | |
107 | |
108 The advantage of running configure separately, is that you can write a script | |
109 to build Vim, without changing the Makefile or feature.h. Example (using sh): | |
110 | |
111 CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif | |
112 | |
113 One thing to watch out for: If the configure script itself changes, running | |
114 "make" will execute it again, but without your arguments. Do "make clean" and | |
115 run configure again. | |
116 | |
117 If you are compiling Vim for several machines, for each machine: | |
118 a. make shadow | |
119 b. mv shadow machine_name | |
120 c. cd machine_name | |
121 d. make; make install | |
122 | |
123 [Don't use a path for machine_name, just a directory name, otherwise the links | |
124 that "make shadow" creates won't work.] | |
125 | |
126 | |
127 Unix: COMPILING WITH/WITHOUT GUI | |
128 | |
1268 | 129 NOTE: This is incomplete, look in Makefile for more info. |
130 | |
7 | 131 These configure arguments can be used to select which GUI to use: |
1268 | 132 --enable-gui=gtk or: gtk2, motif, athena or auto |
7 | 133 --disable-gtk-check |
134 --disable-motif-check | |
135 --disable-athena-check | |
136 | |
24103 | 137 This configure argument can be used to disable the GUI, even when the necessary |
138 files are found: | |
139 --disable-gui | |
140 | |
7 | 141 --enable-gui defaults to "auto", so it will automatically look for a GUI (in |
24103 | 142 the order of GTK, Motif, then Athena). If one is found, then it is used and |
7 | 143 does not proceed to check any of the remaining ones. Otherwise, it moves on |
144 to the next one. | |
145 | |
1268 | 146 --enable-{gtk,gtk2,kde,motif,athena}-check all default to "yes", such that if |
7 | 147 --enable-gui is "auto" (which it is by default), GTK, Motif, and Athena will |
148 be checked for. If you want to *exclude* a certain check, then you use | |
1268 | 149 --disable-{gtk,gtk2,kde,motif,athena}-check. |
7 | 150 |
151 For example, if --enable-gui is set to "auto", but you don't want it look for | |
152 Motif, you then also specify --disable-motif-check. This results in only | |
153 checking for GTK and Athena. | |
154 | |
155 Lastly, if you know which one you want to use, then you can just do | |
1268 | 156 --enable-gui={gtk,gtk2,kde,motif,athena}. So if you wanted to only use Motif, |
157 then you'd specify --enable-gui=motif. Once you specify what you want, the | |
158 --enable-{gtk,gtk2,kde,motif,athena}-check options are ignored. | |
159 | |
160 On Linux you usually need GUI "-devel" packages. You may already have GTK | |
161 libraries installed, but that doesn't mean you can compile Vim with GTK, you | |
162 also need the header files. | |
7 | 163 |
164 For compiling with the GTK+ GUI, you need a recent version of glib and gtk+. | |
1268 | 165 Configure checks for at least version 1.1.16. An older version is not selected |
166 automatically. If you want to use it anyway, run configure with | |
167 "--disable-gtktest". | |
7 | 168 GTK requires an ANSI C compiler. If you fail to compile Vim with GTK+ (it |
169 is the preferred choice), try selecting another one in the Makefile. | |
170 If you are sure you have GTK installed, but for some reason configure says you | |
171 do not, you may have left-over header files and/or library files from an older | |
172 (and incompatible) version of GTK. if this is the case, please check | |
173 auto/config.log for any error messages that may give you a hint as to what's | |
174 happening. | |
175 | |
1268 | 176 There used to be a KDE version of Vim, using Qt libraries, but since it didn't |
177 work very well and there was no maintainer it was dropped. | |
11 | 178 |
179 | |
7 | 180 Unix: COMPILING WITH MULTI-BYTE |
181 | |
182 When you want to compile with the multi-byte features enabled, make sure you | |
2278
0b3be97064e5
Various small fixes from Dominique Pelle.
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
183 compile on a machine where the locale settings actually work, otherwise the |
7 | 184 configure tests may fail. You need to compile with "big" features: |
185 | |
186 ./configure --with-features=big | |
187 | |
188 Unix: COMPILING ON LINUX | |
189 | |
190 On Linux, when using -g to compile (which is default for gcc), the executable | |
191 will probably be statically linked. If you don't want this, remove the -g | |
192 option from CFLAGS. | |
193 | |
194 Unix: PUTTING vimrc IN /etc | |
195 | |
196 Some Linux distributions prefer to put the global vimrc file in /etc, and the | |
197 Vim runtime files in /usr. This can be done with: | |
198 ./configure --prefix=/usr | |
199 make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e" | |
200 | |
201 Unix: COMPILING ON NeXT | |
202 | |
203 Add the "-posix" argument to the compiler by using one of these commands: | |
204 setenv CC 'cc -posix' (csh) | |
205 export CC='cc -posix' (sh) | |
206 And run configure with "--disable-motif-check". | |
207 | |
1668 | 208 Unix: LOCAL HEADERS AND LIBRARIES NOT IN /usr/local |
209 | |
210 Sometimes it is necessary to search different path than /usr/local for locally | |
211 installed headers (/usr/local/include) and libraries (/usr/local/lib). | |
212 To search /stranger/include and /stranger/lib for locally installed | |
213 headers and libraries, use: | |
214 ./configure --with-local-dir=/stranger | |
215 And to not search for locally installed headers and libraries at all, use: | |
216 ./configure --without-local-dir | |
217 | |
7 | 218 |
2834 | 219 3. OS/2 |
7 | 220 ======= |
221 | |
7408
1886f2863437
commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents:
6448
diff
changeset
|
222 OS/2 support was removed in patch 7.4.1008 |
7 | 223 |
224 | |
2834 | 225 4. Atari MiNT |
7 | 226 ============= |
227 | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20758
diff
changeset
|
228 Atari MiNT support was removed in patch 8.2.1215. |