Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 2822b1f

Browse files
authored
Merge pull request #1042 from Anrock/readme-minor-cleanup
Readme minor cleanup
2 parents 177c6ed + beb5b58 commit 2822b1f

File tree

1 file changed

+65
-100
lines changed

1 file changed

+65
-100
lines changed

README.md

Lines changed: 65 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,37 @@ we talk to clients.__
9999

100100
## Installation
101101

102-
### Installation with stack on Linux
102+
### Installation on macOS
103+
104+
Download the pre-built binaries from the [releases page](https://github.com/haskell/haskell-ide-engine/releases), and copy/symlink them into `/usr/local/bin` (or somewhere else in your $PATH):
105+
106+
```bash
107+
ln -s hie-bin-dir/hie* /usr/local/bin/
108+
```
109+
110+
Alternatively, you can install from source. See instructions below
111+
112+
### Installation with Nix
113+
114+
Follow the instructions at https://github.com/domenkozar/hie-nix
115+
116+
117+
### Installation on ArchLinux
118+
119+
An [haskell-ide-engine-git](https://aur.archlinux.org/packages/haskell-ide-engine-git/) package is available on the AUR.
120+
121+
Using [Aura](https://github.com/aurapm/aura):
122+
123+
```
124+
# aura -A haskell-ide-engine-git
125+
```
126+
127+
128+
### Installation from source
103129

104130
To install HIE, you need stack version >= 1.7.1.
105131

106-
HIE builds from source code, so there's a couple of extra steps.
132+
HIE builds from source code, so there's a couple of extra steps.
107133

108134
#### Linux pre-requirements
109135

@@ -121,21 +147,23 @@ sudo dnf install libicu-devel ncurses-devel
121147
```
122148
**ArchLinux**: see [below](#installation-on-archlinux).
123149

150+
#### Windows: long paths (optional)
151+
152+
In order to avoid problems with long paths on Windows you can do the following:
153+
154+
1. Edit the group policy: set "Enable Win32 long paths" to "Enabled" (Works
155+
only for Windows 10).
156+
157+
2. Clone the `haskell-ide-engine` to the root of your logical drive (e.g. to
158+
`C:\hie`)
159+
124160
#### Download the source code
125161

126162
```bash
127163
git clone https://github.com/haskell/haskell-ide-engine --recursive
128164
cd haskell-ide-engine
129165
```
130166

131-
In order to support both stack and cabal, HIE requires `cabal-install`
132-
as well. If it is not already installed, install it and update its package list:
133-
134-
```bash
135-
stack install cabal-install
136-
cabal update
137-
```
138-
139167
#### Choose your GHC version
140168

141169
The GHC version you are going to install HIE for depends on which version of GHC you are using for your project. If you don't have a current project there are two potential options:
@@ -201,118 +229,37 @@ This will:
201229
* name them as expected by the VS Code plugin
202230
* build local hoogle docs for each version
203231

204-
For this you need the `make` tool (on Windows, see the further advice below). Use the command:
232+
On non-Windows platforms use the command:
205233

206234
```bash
207235
make build-all
208236
```
209237

210-
Then add
211-
212-
```json
213-
"languageServerHaskell.useCustomHieWrapper": true,
214-
"languageServerHaskell.useCustomHieWrapperPath": "hie-wrapper",
215-
```
216-
217-
to VS Code user settings.
218-
219-
### Installation with stack on Windows
220-
221-
To install HIE, you need stack version >= 1.7.1.
222-
223-
#### Download the source code
224-
225-
```bash
226-
git clone https://github.com/haskell/haskell-ide-engine --recursive
227-
cd haskell-ide-engine
228-
```
229-
230-
In order to support both stack and cabal, HIE requires `cabal-install`
231-
as well. If it is not already installed, install it and update its package list:
232-
233-
```bash
234-
stack install cabal-install
235-
cabal update
236-
```
237-
238-
#### Install *all* available GHC versions
239-
240-
*Warning*: Requires 20+ GB of space and potentially more than 2 hours to install, so please be patient!
241-
242-
This will:
243-
244-
* install all supported GHC versions (8.2.1 - 8.6.3)
245-
* name them as expected by the VS Code plugin
246-
* build local hoogle docs for each version
247-
248-
`make` doesn't work on Windows due to several UNIX-specific things, such
249-
as the `cp` command or extensionless executable names. Instead, a PowerShell
250-
script is provided specifically for this purpose:
251-
238+
On Windows use:
252239
**PowerShell:**
253240

254241
```
255242
./build-all.ps1
256243
```
257244

245+
or
246+
258247
**cmd.exe:**
259248

260249
```
261250
powershell -ExecutionPolicy RemoteSigned -c ./build-all.ps1
262251
```
263252

264-
#### Long paths
265-
266-
In order to avoid problems with long paths on Windows you can do the following:
267-
268-
1. Edit the group policy: set "Enable Win32 long paths" to "Enabled" (Works
269-
only for Windows 10).
270-
271-
2. Clone the `haskell-ide-engine` to the root of your logical drive (e.g. to
272-
`C:\hie`)
273253

274-
### Installation on macOS
275-
276-
Download the pre-built binaries from the [releases page](https://github.com/haskell/haskell-ide-engine/releases), and copy/symlink them into `/usr/local/bin` (or somewhere else in your $PATH):
277-
278-
```bash
279-
ln -s hie-bin-dir/hie* /usr/local/bin/
280-
```
281-
282-
Alternatively, you can install from source with `make build` or `make build-all`.
283-
284-
#### DYLD on macOS
285-
286-
If you hit a problem that looks like ```can't load .so/.DLL for: libiconv.dylib (dlopen(libiconv.dylib, 5): image not found)```, it means that libraries cannot be found in the library path. We can hint where to look for them and append more paths to `DYLD_LIBRARY_PATH`.
287-
288-
```
289-
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/lib:/usr/local/lib"
290-
```
291-
292-
On practice `/usr/local/lib` is full of dylibs linked by `brew`. After you amend `DYLD_LIBRARY_PATH`, some of the previously compiled application might not work and yell about incorrect linking, for example, `dyld: Symbol not found: __cg_jpeg_resync_to_restart`. You may need to look up where it comes from and remove clashing links, in this case it were clashing images libs:
254+
Then add
293255

294-
```sh
295-
$ brew unlink libjpeg
296-
$ brew unlink libtiff
297-
$ brew unlink libpng
256+
```json
257+
"languageServerHaskell.useCustomHieWrapper": true,
258+
"languageServerHaskell.useCustomHieWrapperPath": "hie-wrapper",
298259
```
299260

300-
Recompile.
301-
302-
### Installation with Nix
303-
304-
Follow the instructions at https://github.com/domenkozar/hie-nix
305-
306-
307-
### Installation on ArchLinux
308-
309-
An [haskell-ide-engine-git](https://aur.archlinux.org/packages/haskell-ide-engine-git/) package is available on the AUR.
310-
311-
Using [Aura](https://github.com/aurapm/aura):
261+
to VS Code user settings.
312262

313-
```
314-
# aura -A haskell-ide-engine-git
315-
```
316263

317264
### Installation with Shake
318265

@@ -687,6 +634,24 @@ All the documentation is in [the docs folder](/docs) at the root of this project
687634

688635
## Troubleshooting
689636

637+
### DYLD on macOS
638+
639+
If you hit a problem that looks like ```can't load .so/.DLL for: libiconv.dylib (dlopen(libiconv.dylib, 5): image not found)```, it means that libraries cannot be found in the library path. We can hint where to look for them and append more paths to `DYLD_LIBRARY_PATH`.
640+
641+
```
642+
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/lib:/usr/local/lib"
643+
```
644+
645+
On practice `/usr/local/lib` is full of dylibs linked by `brew`. After you amend `DYLD_LIBRARY_PATH`, some of the previously compiled application might not work and yell about incorrect linking, for example, `dyld: Symbol not found: __cg_jpeg_resync_to_restart`. You may need to look up where it comes from and remove clashing links, in this case it were clashing images libs:
646+
647+
```sh
648+
$ brew unlink libjpeg
649+
$ brew unlink libtiff
650+
$ brew unlink libpng
651+
```
652+
653+
Recompile.
654+
690655
### macOS: Got error while installing GHC 8.6.1 or 8.6.2 - dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
691656

692657
These builds have a dependency on [homebrew](https://brew.sh)'s `gmp` library. Install with brew: `brew install gmp`.

0 commit comments

Comments
 (0)