---
# System prepended metadata

title: Workaround calimages with giflib on Homebrew

---

# Workaround calimages with giflib on Homebrew

* brew install giflib
* Fake /opt/homebrew/lib/pkgconfig/libgif.pc with the following contents:
  ```
  prefix=/opt/homebrew/Cellar/giflib/5.2.1/
  exec_prefix=/opt/homebrew/Cellar/giflib/5.2.1/
  libdir=/opt/homebrew/Cellar/giflib/5.2.1/lib
  includedir=/opt/homebrew/Cellar/giflib/5.2.1/include

  Name: libgif
  Description: libgif libgif libgif
  Version: 5.2.1
  Libs: -L${libdir} -lgif
  Cflags: -I${includedir}
  ```
* opam reinstall camlimages

Good luck.

