Skip to content

Commit 8bf75cc

Browse files
authored
updated instructions to build libheif in the Development Environment Guide (#201) (#202)
* updated instructions to build libheif in the Development Environment Guide and added ninja-build and nasm to the apt install section
1 parent db03e0d commit 8bf75cc

5 files changed

Lines changed: 57 additions & 53 deletions

File tree

docs/docs/Development-Environment-Guide.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ end integration testing.
4646

4747
- Open a terminal and run `sudo apt update`
4848

49-
- Run `sudo apt install gnupg2 unzip xz-utils cmake make g++ libgtest-dev mediainfo libssl-dev liblog4cxx-dev libboost-dev file openjdk-17-jdk python3.8-dev python3-pip python3.8-venv libde265-dev libopenblas-dev liblapacke-dev libavcodec-dev libavcodec-extra libavformat-dev libavutil-dev libswscale-dev libavresample-dev libharfbuzz-dev libfreetype-dev ffmpeg git git-lfs redis postgresql-12 curl ansible`
49+
- Run `sudo apt install gnupg2 unzip xz-utils cmake make g++ ninja-build nasm libgtest-dev mediainfo libssl-dev liblog4cxx-dev libboost-dev file openjdk-17-jdk python3.8-dev python3-pip python3.8-venv libde265-dev libopenblas-dev liblapacke-dev libavcodec-dev libavcodec-extra libavformat-dev libavutil-dev libswscale-dev libavresample-dev libharfbuzz-dev libfreetype-dev ffmpeg git git-lfs redis postgresql-12 curl ansible`
5050

5151
- Run `sudo ln --symbolic /usr/include/x86_64-linux-gnu/openblas-pthread/cblas.h /usr/include/cblas.h`
5252

@@ -157,13 +157,20 @@ sudo ln --symbolic /opt/apache-maven-3.3.3/bin/mvn /usr/local/bin;
157157
```bash
158158
mkdir /tmp/libheif;
159159
cd /tmp/libheif;
160-
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.12.0.tar.gz \
160+
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.20.2.tar.gz \
161161
| tar --extract --gzip;
162-
cd libheif-1.12.0;
162+
cd libheif-1.20.2/third-party;
163+
bash aom.cmd;
164+
cd ..;
163165
mkdir build;
164166
cd build;
165-
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false ..;
166-
sudo make --jobs "$(nproc)" install;
167+
PKG_CONFIG_PATH="/tmp/libheif/libheif-1.20.2/third-party/aom/dist/lib/pkgconfig" \
168+
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false -DWITH_AOM_DECODER=true -DENABLE_PLUGIN_LOADING=false -DCMAKE_BUILD_TYPE=Release ..;
169+
sudo make --jobs "$(nproc)" install/strip;
170+
sudo cp heifio/libheifio.a /usr/lib64;
171+
cd ../heifio;
172+
sudo mkdir -p /usr/include/libheif/heifio;
173+
sudo cp *.h /usr/include/libheif/heifio;
167174
cd;
168175
sudo rm -rf /tmp/libheif;
169176
```

docs/site/Development-Environment-Guide/index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ <h1 id="setup-vm">Setup VM</h1>
332332
<p>Open a terminal and run <code>sudo apt update</code></p>
333333
</li>
334334
<li>
335-
<p>Run <code>sudo apt install gnupg2 unzip xz-utils cmake make g++ libgtest-dev mediainfo libssl-dev liblog4cxx-dev libboost-dev file openjdk-17-jdk python3.8-dev python3-pip python3.8-venv libde265-dev libopenblas-dev liblapacke-dev libavcodec-dev libavcodec-extra libavformat-dev libavutil-dev libswscale-dev libavresample-dev libharfbuzz-dev libfreetype-dev ffmpeg git git-lfs redis postgresql-12 curl ansible</code></p>
335+
<p>Run <code>sudo apt install gnupg2 unzip xz-utils cmake make g++ ninja-build nasm libgtest-dev mediainfo libssl-dev liblog4cxx-dev libboost-dev file openjdk-17-jdk python3.8-dev python3-pip python3.8-venv libde265-dev libopenblas-dev liblapacke-dev libavcodec-dev libavcodec-extra libavformat-dev libavutil-dev libswscale-dev libavresample-dev libharfbuzz-dev libfreetype-dev ffmpeg git git-lfs redis postgresql-12 curl ansible</code></p>
336336
</li>
337337
<li>
338338
<p>Run <code>sudo ln --symbolic /usr/include/x86_64-linux-gnu/openblas-pthread/cblas.h /usr/include/cblas.h</code></p>
@@ -455,13 +455,20 @@ <h1 id="setup-vm">Setup VM</h1>
455455
</ul>
456456
<pre><code class="language-bash">mkdir /tmp/libheif;
457457
cd /tmp/libheif;
458-
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.12.0.tar.gz \
458+
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.20.2.tar.gz \
459459
| tar --extract --gzip;
460-
cd libheif-1.12.0;
460+
cd libheif-1.20.2/third-party;
461+
bash aom.cmd;
462+
cd ..;
461463
mkdir build;
462464
cd build;
463-
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false ..;
464-
sudo make --jobs &quot;$(nproc)&quot; install;
465+
PKG_CONFIG_PATH=&quot;/tmp/libheif/libheif-1.20.2/third-party/aom/dist/lib/pkgconfig&quot; \
466+
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false -DWITH_AOM_DECODER=true -DENABLE_PLUGIN_LOADING=false -DCMAKE_BUILD_TYPE=Release ..;
467+
sudo make --jobs &quot;$(nproc)&quot; install/strip;
468+
sudo cp heifio/libheifio.a /usr/lib64;
469+
cd ../heifio;
470+
sudo mkdir -p /usr/include/libheif/heifio;
471+
sudo cp *.h /usr/include/libheif/heifio;
465472
cd;
466473
sudo rm -rf /tmp/libheif;
467474
</code></pre>

docs/site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,5 +408,5 @@ <h1 id="overview">Overview</h1>
408408

409409
<!--
410410
MkDocs version : 0.17.5
411-
Build Date UTC : 2025-07-23 18:04:17
411+
Build Date UTC : 2025-09-09 16:55:36
412412
-->

0 commit comments

Comments
 (0)