Updated Windows (markdown)
[dealii.wiki.git] / deal.II-on-Homebrew---Linuxbrew.md
1 # Using deal.II on Mac OS X and Linux via Homebrew/Linuxbrew
2
3 ---
4 Installing via Homebrew is currently unsupported:
5 - the [Homebrew Science tap](https://github.com/Homebrew/homebrew-science) is *[deprecated](https://github.com/Homebrew/homebrew-science/pull/6616)*,
6 - the [homebrew-dealiisuite tap](https://github.com/davydden/homebrew-dealiisuite) is *[unmaintained](https://github.com/davydden/homebrew-dealiisuite/commit/f3b8be6651d7e15077159f48f878129f9c2a8e55)*.
7
8 The most up-to-date instructions can be found at the [homebrew-dealiisuite tap](https://github.com/davydden/homebrew-dealiisuite).
9
10 ---
11
12
13 The deal.II suite is also available on Homebrew (OS-X) and Linuxbrew (https://github.com/Homebrew/linuxbrew Linux).
14
15 ## Installing Homebrew/Linuxbrew
16
17 ### Homebrew
18 ```
19 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
20 ```
21 ### Linuxbrew
22 Debian/Ubuntu needs extra packages:
23 ```
24 sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev csh subversion
25 ```
26
27 If you will be installing `opencascade`, you also need
28 ```
29 sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
30 ```
31 to be able to `brew install qt` and 
32 ```
33 sudo apt-get install libgl2ps-dev tcl8.6-dev tk8.6-dev libgl1-mesa-dev libglu1-mesa-dev libxmu-dev libxext-dev
34 ```
35 to build `opencascade` itself.
36
37 Then run
38
39 ```
40 git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
41 ```
42
43 Add to your `.bashrc` or `.zshrc`:
44 ```
45 export PATH="$HOME/.linuxbrew/bin:$PATH"
46 export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
47 export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
48 ```
49 ## Installing deal.II suite
50 In order to install deal.II suite, one needs to add Homebrew Science https://github.com/Homebrew/homebrew-science - additional repository 
51 of scientific software - by running 
52 ```
53 brew tap homebrew/science
54 ```
55 Before trying the instructions below make sure that your Homebrew/Linuxbrew is up-to-date 
56 by running `brew update`.
57 ### OS-X
58 Note that this uses the system BLAS/LAPACK libraries.
59 ```
60 brew install cmake
61 brew install openmpi --c++11
62 brew install boost --c++11
63 brew install gsl
64 brew install scalapack
65 brew install mumps
66 brew install metis
67 brew install parmetis
68 brew install hypre
69 brew install superlu43
70 brew install superlu_dist
71 brew install arpack --with-mpi --without-check
72 brew install hdf5 --with-mpi --c++11
73 brew install netcdf --with-fortran --with-cxx-compat
74 brew install suite-sparse
75 brew install hwloc
76 brew install sundials --with-mpi
77 brew install fftw --with-mpi --with-fortran
78 brew install petsc
79 brew install slepc
80 brew install p4est
81 brew install adol-c
82 brew install cppunit
83 brew install doxygen --with-graphviz
84 brew install glpk
85 brew install glm
86 brew install trilinos
87 brew install dealii
88 ```
89
90 ### Linux
91 On Linux some of the packages do not currently compile. Therefore, they have to be skipped (thus `--without-XYZ` arguments). Otherwise, the steps are pretty much equivalent to those listed above.
92
93 Note that this configuration uses OpenBLAS as opposed to the system BLAS/LAPACK libraries (such an option is currently not supported).
94 ```
95 brew install pkg-config
96 brew install cmake
97 brew install openmpi --c++11
98 brew install boost --with-mpi --without-single
99 brew install gsl
100 brew install openblas
101 brew install scalapack --with-openblas --without-check
102 brew install mumps --with-openblas
103 brew install metis
104 brew install parmetis
105 brew install hypre --with-openblas
106 brew install superlu43 --with-openblas
107 brew install superlu_dist  --with-openblas
108 brew install arpack --with-mpi --with-openblas
109 brew install hdf5 --with-mpi --c++11
110 brew install netcdf --with-fortran --with-cxx-compat
111 brew install suite-sparse --with-openblas
112 brew install hwloc
113 brew install sundials --with-mpi
114 brew install fftw --with-mpi --with-fortran
115 brew install petsc --with-openblas
116 brew install slepc --without-check
117 brew install p4est --with-openblas
118 brew install adol-c
119 brew install cppunit
120 brew install doxygen --with-graphviz
121 brew install glpk
122 brew install glm
123 brew install trilinos --with-openblas --without-scotch --without-x11
124 brew install dealii --without-opencascade --with-openblas
125 ```
126
127 Possible failures:
128
129 If `netcdf` fails, you may need to install it via something like `LD_LIBRARY_PATH=~/.linuxbrew/Cellar/netcdf/4.3.3.1/lib brew install netcdf --with-fortran --with-cxx-compat`. 
130 See https://github.com/Homebrew/homebrew-science/issues/2521#issuecomment-122032005 for a discussion.

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.