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

Commit 68b0b29

Browse files
committed
Move OSX DYLD section to troubleshooting
1 parent f1f0a79 commit 68b0b29

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -245,24 +245,6 @@ ln -s hie-bin-dir/hie* /usr/local/bin/
245245

246246
Alternatively, you can install from source with `make build` or `make build-all`.
247247

248-
#### DYLD on macOS
249-
250-
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`.
251-
252-
```
253-
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/lib:/usr/local/lib"
254-
```
255-
256-
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:
257-
258-
```sh
259-
$ brew unlink libjpeg
260-
$ brew unlink libtiff
261-
$ brew unlink libpng
262-
```
263-
264-
Recompile.
265-
266248
### Installation with Nix
267249

268250
Follow the instructions at https://github.com/domenkozar/hie-nix
@@ -651,6 +633,24 @@ All the documentation is in [the docs folder](/docs) at the root of this project
651633

652634
## Troubleshooting
653635

636+
### DYLD on macOS
637+
638+
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`.
639+
640+
```
641+
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/lib:/usr/local/lib"
642+
```
643+
644+
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:
645+
646+
```sh
647+
$ brew unlink libjpeg
648+
$ brew unlink libtiff
649+
$ brew unlink libpng
650+
```
651+
652+
Recompile.
653+
654654
### 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
655655

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

0 commit comments

Comments
 (0)