INSTALL.in 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. ---------------------------------------
  2. Installation instructions for GIMP @GIMP_APP_VERSION@
  3. ---------------------------------------
  4. There are some basic steps to building and installing GIMP.
  5. GIMP @GIMP_APP_VERSION@ replaces earlier GIMP 2.99.x versions. It is advised to
  6. uninstall them before installing GIMP @GIMP_APP_VERSION@. Since libgimp* libraries
  7. and data are all versionned anyway, it is possible to keep your older
  8. GIMP 2.x installation in parallel to GIMP @GIMP_APP_VERSION@ on a same prefix.
  9. GIMP @GIMP_APP_VERSION@ is not backward compatible with GIMP 2.10 and earlier
  10. versions. Plug-ins and scripts written for GIMP 2.10, 2.8, 2.6 or
  11. earlier GIMP 2.x versions will not work because the API changed.
  12. The most important part is to make sure the requirements for a build
  13. are fulfilled. We depend on a number of tools and libraries which are
  14. listed below. For libraries this means you need to also have the
  15. header files installed.
  16. This file is generated (versions are filled by our build system) and
  17. focuses on keeping an up-to-date list of dependencies intended to
  18. packagers, contributors or whoever wants to compile GIMP from source.
  19. Building and running self-built software often requires more setup, in
  20. particular environment variables so that your system knows where to
  21. find the various pieces of the software. The following document can
  22. help in that regard:
  23. https://developer.gimp.org/core/setup/build/
  24. ******************************************************************
  25. * Unless you are experienced with building software from source, *
  26. * you should not attempt to build all these libraries yourself! *
  27. * We suggest that you check if your distributor has development *
  28. * packages of them and use these instead. *
  29. ******************************************************************
  30. 1. You need to have installed a recent version of pkg-config (>= @GIMP_PKGCONFIG_VERSION@) available
  31. from https://www.freedesktop.org/software/pkgconfig/.
  32. The compatible pkgconf utility would also work.
  33. 2. You need gettext version 0.19.8 or newer. Older versions did not have support yet
  34. for certain file formats.
  35. 3. You need to have GEGL version @GEGL_REQUIRED_VERSION@ or newer and babl version
  36. @BABL_REQUIRED_VERSION@ or newer. You can get them from https://gegl.org/ or clone
  37. them from the GNOME git repository:
  38. https://gitlab.gnome.org/GNOME/babl.git
  39. https://gitlab.gnome.org/GNOME/gegl.git
  40. GEGL must be built with Cairo support, i.e. -Dcairo=enabled option (required
  41. for some mandatory operations such as "gegl:npd").
  42. Introspection must be enabled for both babl and GEGL with -Denable-gir=true
  43. and -Dintrospection=true respectively. The only case where we don't build
  44. GIR data is when cross-compiling because of the difficulty to make cross-tools
  45. for GObject Introspection.
  46. Nevertheless if you have working GIR cross-tools, you can force the expected
  47. behavior with GIMP's meson option -Dcan-crosscompile-gir=true
  48. Optional:
  49. - build GEGL with libumfpack (SuiteSparse) (`-Dumfpack=enabled`)
  50. for alternative Matting engine "gegl:matting-levin" and OpenEXR
  51. library (`-Dopenexr=enabled`) for OpenEXR format support.
  52. - build GEGL with maxflow (https://github.com/gerddie/maxflow) and
  53. the option -Dworkshop=true in order to be able to select the
  54. experimental Paint Select tool in the Playground (operation
  55. "gegl:paint-select" is needed).
  56. - The "Show Image Graph" item in the "Debug" menu (hidden by
  57. default on stable release) requires the GEGL operation
  58. "gegl:introspect" which is always built but deactivated unless
  59. the `dot` tool from graphviz is available (runtime dependency).
  60. 4. You need to have installed GTK version @GTK_REQUIRED_VERSION@ or newer.
  61. GIMP also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
  62. (>= @GDK_PIXBUF_REQUIRED_VERSION@), and Pango (>= @PANGO_REQUIRED_VERSION@). Sources for these can be grabbed
  63. from https://download.gnome.org/sources/.
  64. 5. We use cairo >= @CAIRO_REQUIRED_VERSION@, which is hosted at
  65. https://www.cairographics.org/.
  66. 6. We require PangoCairo, a Pango backend using Cairo. Make sure you
  67. have Cairo, FreeType2 and fontconfig installed before you compile
  68. Pango. GIMP depends on freetype2 being newer than version @FREETYPE2_REQUIRED_VERSION@
  69. and fontconfig @FONTCONFIG_REQUIRED_VERSION@ or newer. Older versions are known to have
  70. bugs that seriously affect the stability of GIMP.
  71. On Windows, we recommend fontconfig 2.13.95 (or over) where support
  72. of fonts in user directory (Windows 1809 feature) appeared.
  73. We also require HarfBuzz @HARFBUZZ_REQUIRED_VERSION@ or newer, an OpenType text shaping
  74. tool. As this is a dependency for Pango, you will likely have it
  75. installed, but you may have to install a development package for
  76. the headers.
  77. 7. The file-compressor plug-in requires zlib, libbzip2, and liblzma to
  78. be installed. All these libraries are required dependencies.
  79. 8. For metadata access GIMP requires the gexiv2 @GEXIV2_REQUIRED_VERSION@ or newer library.
  80. It is hosted at: https://wiki.gnome.org/Projects/gexiv2
  81. 9. libpng, libjpeg, libtiff, librsvg and lcms are hard dependencies
  82. that can not be disabled.
  83. There might be some issues with librsvg, based on the fact newer
  84. versions are in Rust which is not buildable on all platforms. Yet
  85. SVG support was deemed too important to be considered "optional"
  86. for a decent graphics activity. Nevertheless a packager really
  87. intent to have GIMP running on an architecture with no Rust support
  88. could still:
  89. 1) easily patch out the file-svg plug-in from build system;
  90. 2) build GIMP with -Dvector-icons=false. Ironically librsvg is
  91. needed at build time for this option, in order to create PNG
  92. variants of icons (making librsvg unneeded at runtime). So all it
  93. takes is to have a build machine with librsvg to create the PNG
  94. icons, package and deliver them for machines without librsvg.
  95. This is the compromise we came with, i.e. officially making SVG a
  96. first-class file format, yet explaining how you could ignore it if
  97. you really wanted or needed to.
  98. 10. For MyPaint brushes, brushlib (libmypaint) @LIBMYPAINT_REQUIRED_VERSION@ is used.
  99. The libmypaint repository is hosted at:
  100. https://github.com/mypaint/libmypaint
  101. If installing from repository, do not install the master branch!
  102. Checkout the last tag "v1.y.z" from `libmypaint-v1` branch instead
  103. (for instance "v1.6.1" tag at time of writing), or simply install
  104. from a tarball or from your favorite package manager.
  105. In particular, do NOT install tags or release tarballs versioned
  106. "v2.y.z". GIMP depends on the version 1 of libmypaint and is
  107. incompatible with the version 2 (which is still experimental anyway
  108. and has no stable release at time of writing).
  109. 11. We also need the mypaint-brushes data package:
  110. https://github.com/mypaint/mypaint-brushes
  111. If installing from repository, install from branch "v1.3.x" or the
  112. last tag "v1.y.z" (e.g. "v1.3.1" at time of writing).
  113. In particular do NOT install from `master` branch which installs
  114. brushes incompatible with GIMP (the `master` branch and v2 brushes
  115. are targeted to software using recent libmypaint which GIMP wasn't
  116. ported to yet).
  117. Also this is a data packages and therefore it will install the
  118. pkg-config file inside `$PREFIX/share/pkgconfig/`. If you install
  119. mypaint-brushes from repository in a non-standard prefix, you will
  120. have to make sure your $PKG_CONFIG_PATH environment variable also
  121. lists `$PREFIX/share/pkgconfig/`.
  122. 12. GIMP uses GLib's GIO library to handle file URIs and any I/O in
  123. general, transparently, regardless where the file is stored, i.e.
  124. locally, remotely, with which scheme, and so on. GIO in turn
  125. supports various backends through modules. We don't know all the
  126. modules available but since HTTP and HTTPS are so pervasive
  127. nowadays, we kind of consider a least GIO modules for these schemes
  128. mandatory (it allows to open from a pasted URL or just drag'n drop
  129. from e.g. a browser).
  130. For HTTP support (and many other schemes), on Linux at least, you
  131. should install `gvfs`:
  132. https://wiki.gnome.org/Projects/gvfs
  133. It is unclear whether `gvfs` can be built and installed on other
  134. platforms such as Windows and macOS.
  135. For HTTPS support, you should install `glib-networking`:
  136. https://gitlab.gnome.org/GNOME/glib-networking
  137. Of course there might be more modules providing support of more
  138. storage backends. Ideally GIMP would have support to load from any
  139. backend so packaging together with more GIO modules or recommending
  140. them in a package manager would be ideal. In any case, installing
  141. the ones for HTTP and HTTPS seems like the minimum nowadays.
  142. 13. You may want to install other third party libraries or programs
  143. that are needed for some of the available plug-ins. We recommend
  144. to check that the following libraries are installed: openjpeg,
  145. libmng, libwmf, libaa and libgs (Ghostscript).
  146. 14. HEIF support depends on the libheif library. If you don't have
  147. access to pre-built packages, the code is available at:
  148. https://github.com/strukturag/libheif
  149. Make sure you build libheif with libde265 and libx265 support (for
  150. respectively decoding and encoding of HEVC, i.e. HEIC files), and
  151. libaom decoder and encoder (for AV1, i.e. AVIF files), otherwise
  152. the plug-in is mostly useless.
  153. 15. GObject Introspection requires the following dependencies to be
  154. built and installed with introspection as well: babl, cairo,
  155. GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
  156. 16. Windows builds can now generate backtrace logs upon a crash.
  157. The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
  158. The feature depends on Dr.MinGW's ExcHndl library:
  159. https://github.com/jrfonseca/drmingw
  160. 17. Optional step if compiling GIMP from git (unneeded from tarball): you need
  161. to initialize submodules with command `git submodule update --init`.
  162. 18. Configure GIMP by running `meson _build`. You may want to pass some
  163. options to it, see below.
  164. 19. Build GIMP by running `ninja -C _build'.
  165. 20. Install GIMP by running `ninja -C _build install'. In order to
  166. avoid clashes with other versions of GIMP, we install a binary
  167. called gimp-@GIMP_APP_VERSION@. By default there's also a link created so that
  168. you can type 'gimp' to start gimp-@GIMP_APP_VERSION@.
  169. 21. Summary of required packages and what version you need:
  170. Package Name Version
  171. appstream-glib @APPSTREAM_GLIB_REQUIRED_VERSION@
  172. ATK @ATK_REQUIRED_VERSION@
  173. babl @BABL_REQUIRED_VERSION@
  174. cairo @CAIRO_REQUIRED_VERSION@
  175. Fontconfig @FONTCONFIG_REQUIRED_VERSION@
  176. freetype2 @FREETYPE2_REQUIRED_VERSION@
  177. GDK-PixBuf @GDK_PIXBUF_REQUIRED_VERSION@
  178. GEGL @GEGL_REQUIRED_VERSION@
  179. gexiv2 @GEXIV2_REQUIRED_VERSION@
  180. GIO
  181. GLib @GLIB_REQUIRED_VERSION@
  182. glib-networking
  183. GTK @GTK_REQUIRED_VERSION@
  184. gvfs (on Linux)
  185. HarfBuzz @HARFBUZZ_REQUIRED_VERSION@
  186. libbzip2
  187. libjpeg
  188. liblzma @LIBLZMA_REQUIRED_VERSION@
  189. libmypaint @LIBMYPAINT_REQUIRED_VERSION@
  190. libpng @LIBPNG_REQUIRED_VERSION@
  191. libpoppler-glib @POPPLER_REQUIRED_VERSION@
  192. librsvg @RSVG_REQUIRED_VERSION@
  193. libtiff @LIBTIFF_REQUIRED_VERSION@
  194. Little CMS @LCMS_REQUIRED_VERSION@
  195. mypaint-brushes-1.0
  196. pangocairo @PANGO_REQUIRED_VERSION@
  197. poppler-data @POPPLER_DATA_REQUIRED_VERSION@
  198. zlib
  199. 22. Summary of optional packages:
  200. Package Name Version Feature
  201. cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
  202. cfitsio - FITS
  203. ExcHndl - Crash logs on Windows with Dr. MinGW
  204. gs - ghostscript
  205. libaa - ASCII art
  206. libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
  207. libilbm - Amiga IFF/ILBM
  208. libmng - MNG
  209. libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
  210. libwmf @WMF_REQUIRED_VERSION@ WMF
  211. libXcursor - X11 Mouse Cursor
  212. libxpm - XPM
  213. openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
  214. OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
  215. qoi - QOI
  216. webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
  217. vala - Vala plug-ins
  218. 23. Summary of optional runtime dependencies:
  219. darktable >= 1.7, with lua support enabled for raw loading
  220. RawTherapee >= 5.2 for raw loading
  221. xdg-email for sending emails
  222. sendmail for sending emails if --with-sendmail enabled
  223. gdb or lldb for our new bug-reporting dialog
  224. "gegl:matting-levin" GEGL operation for alternative matting engine
  225. Python @PYTHON3_REQUIRED_VERSION@ and PyGObject for Python 3 plug-ins
  226. GJS for Javascript plug-ins
  227. LuaJIT and LGI for Lua plug-ins
  228. dot for "Show Image Graph" (unstable branches)
  229. xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)
  230. Generic instructions for configuring and compiling auto-configured
  231. packages are included below. Here is an illustration of commands that
  232. might be used to build and install GIMP. The actual configuration,
  233. compilation and installation output is not shown.
  234. % tar xvf gimp-@GIMP_VERSION@.tar.xz # unpack the sources
  235. % cd gimp-@GIMP_VERSION@ # change to the toplevel directory
  236. % meson _build # `configure' step
  237. % ninja -C _build # build GIMP
  238. % ninja -C _build install # install GIMP
  239. The `configure' step examines your system, and adapts GIMP to run on
  240. it. The script has many options, some of which are described in the
  241. generic instructions included at the end of this file. All of the
  242. options can be listed using the command `meson configure' if you
  243. successfully configured already, or by reading the file `meson_options.txt`.
  244. There are several special options the GIMP configure script recognizes.
  245. These are:
  246. -Dvector-icons=false This option installs raster icons instead of
  247. vector icons.
  248. -Drelocatable-bundle=yes This option forces GIMP to search some
  249. resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
  250. running prefix, rather than using build-time paths.
  251. -Dansi=true This option causes stricter ANSI C checking to be
  252. performed when compiling with GCC. The default is for strict
  253. checking to be disabled. NOTE: This option is intended primarily as
  254. a convenience for developers.
  255. -Dgimpdir=DIR. This option changes the default directory GIMP uses to
  256. search for its configuration files from ~/.config/GIMP/@GIMP_APP_VERSION@ (the
  257. directory .config/GIMP/@GIMP_APP_VERSION@ in the user's home directory) to
  258. ~/.config/DIR/@GIMP_APP_VERSION@.
  259. If DIR is an absolute path, the directory will be changed to DIR.
  260. -Dshmem-type=[none|sysv|posix|win32|auto]. This option allows you to
  261. specify how image data is transported between the core and plug-ins.
  262. Usually the best way to do this is detected automatically.
  263. -Daa=disabled The AA plug-in needs libaa and configure checks for
  264. its presence. Use -Daa=disabled if you run into problems.
  265. -Dxpm=disabled The XPM plug-in needs libxpm and configure checks
  266. for its presence. If for some reason you don't want to build the
  267. XPM plug-in even though the library is installed, use
  268. -Dxpm=disabled to disable it explicitly.
  269. -Dmng=disabled The MNG plug-in needs libmng and configure checks
  270. for its presence. If for some reason you don't want to build the
  271. MNG plug-in even though the library is installed, use
  272. -Dmng=disabled to disable it explicitly.
  273. -Dwmf=disabled The WMF plug-in needs libwmf2 and configure checks for
  274. its presence. Use -Dwmf=disabled if you run into problems.
  275. -Dwebkit-unmaintained=true We do not recommend to install the Help
  276. browser and Webpage plug-ins anymore. If for some reason you want
  277. these anyway, you can force the build with this explicit option.
  278. -Dprint=false If for some reason you don't want to build the Print
  279. plug-in based on the GtkPrint API, you can build with -Dprint=false.
  280. -Dalsa=disabled If you don't want to compile ALSA support into the
  281. MIDI input controller module, you can use the -Dalsa=disabled option.
  282. -Dlinux-input=disabled If you don't want to compile the Linux Input
  283. controller module, you can use the -Dlinux-input=disabled option.
  284. -Dgi-docgen=enabled|disabled This option controls whether the libgimp
  285. C API references will be created using gi-docgen.
  286. -Dg-ir-doc=true This option controls whether the libgimp API
  287. references for some binding languages will be created using
  288. g-ir-doc-tool and yelp-build.
  289. -Denable-multiproc=false This option allows you to disable support for
  290. multiple processors. It is enabled by default.
  291. -Dwith-sendmail[=PATH] This option is used to tell GIMP to send email
  292. through sendmail instead of xdg-email. You can optionally indicate
  293. where to find the sendmail command. Otherwise sendmail will simply
  294. be searched in your $PATH at runtime.
  295. -Denable-default-bin=false Use this option if you don't want to make
  296. gimp-@GIMP_APP_VERSION@ the default GIMP installation. Otherwise a link called
  297. gimp pointing to the gimp-@GIMP_APP_VERSION@ executable will be installed.
  298. -Denable-console-bin=false Use this option if you don't want the
  299. gimp-console binary to be built in addition to the standard binary.
  300. gimp-console is useful for command-line batch mode or as a server.
  301. -Dpython=false If for some reason you don't want to install the
  302. Python plug-ins, you can use -Dpython=false.
  303. -Djavascript=false If for some reason you don't want to install the
  304. JavaScript plug-ins, you can use -Djavascript=false.
  305. -Dlua=false If for some reason you don't want to install the
  306. Lua plug-ins, you can use -Dlua=false.
  307. -Dvala-plugins=disabled If for some reason you don't want to install the
  308. Vala plug-ins, you can use -Dvala-plugins=disabled.
  309. This list is manually maintained. To get an exhaustive listing of options,
  310. read `meson_options.txt'.
  311. Additionally meson supports a wide range of common built-in options. See
  312. documentation: https://mesonbuild.com/Builtin-options.html
  313. The `ninja' command builds several things:
  314. - A bunch of public libraries in the directories starting with 'libgimp'.
  315. - The plug-in programs in the 'plug-ins' directory.
  316. - Some modules in the 'modules' subdirectory.
  317. - The main GIMP program 'gimp-@GIMP_APP_VERSION@' in `app'.
  318. The `ninja install' command installs the GIMP header files associated
  319. with the libgimp libraries, the plug-ins, some data files and the GIMP
  320. executable. After running `ninja install' and assuming the build process
  321. was successful you should be able to run `gimp'.
  322. When configure fails
  323. ======================
  324. The configuration step uses pkg-config, a tool that replaces the old foo-config
  325. scripts. The most recent version is available from
  326. https://www.freedesktop.org/software/pkgconfig/
  327. 'configure' tries to compile and run a short GTK program. There are
  328. several reasons why this might fail:
  329. * pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
  330. with GTK. (This file is used to get information about where GTK+ is
  331. installed.)
  332. Fix: Either make sure that this file is in the path where pkg-config
  333. looks for it (try 'pkg-config --debug' or add the location of
  334. gtk+-3.0.pc to the environment variable PKG_CONFIG_PATH before running
  335. configure.
  336. * Libraries you installed are not found when you attempt to start GIMP.
  337. The details of how to fix this problem will depend on the system:
  338. On Linux and other systems using ELF libraries, add the directory to
  339. holding the library to /etc/ld.so.conf or to the environment variable
  340. LD_LIBRARY_PATH, and run 'ldconfig'.
  341. On other systems, it may be necessary to encode this path
  342. into the executable, by setting the LDFLAGS environment variable
  343. before running configure. For example:
  344. LDFLAGS="-R/home/joe/lib" ./configure
  345. or
  346. LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
  347. * An old version of the GTK libraries was found instead of
  348. your newly installed version. This commonly happens if a
  349. binary package of GTK was previously installed on your system,
  350. and you later compiled GTK from source.
  351. Fix: Remove the old libraries and include files. If you are afraid
  352. that removing the old libraries may break other packages supplied by
  353. your distributor, you can try installing GLib, GTK and other
  354. libraries in a different prefix after setting the environment
  355. variable PKG_CONFIG_LIBDIR to point to lib/pkgconfig/ in that new
  356. prefix so that it does not try to read the *.pc files from the
  357. default directory (/usr/lib/pkgconfig). However, removing the old
  358. packages is often the easier solution.
  359. A detailed log of the meson output is written to the file meson-logs/meson-log.txt.
  360. This may help diagnose problems.
  361. When meson configure fails on plug-ins
  362. ======================================
  363. There are some GIMP plug-ins that need additional third-party libraries
  364. installed on your system. For example to compile the plug-ins that load
  365. and save JPEG, PNG or TIFF files you need the related libraries and header
  366. files installed, otherwise you'll get a message that plug-in xyz will not
  367. be built.
  368. If you are sure that those libraries are correctly installed, but configure
  369. fails to detect them, the following might help:
  370. Set your LDFLAGS environment variable to look for the library in a certain
  371. place, e.g. if you are working in a bash shell you would say:
  372. export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
  373. before you run configure.
  374. Set your CPPFLAGS environment variable to look for the header file in a
  375. certain place, e.g. if you are working in a bash shell you would say:
  376. export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
  377. before you run meson.