Skip to content

Commit 6f34942

Browse files
authored
updated instructions to build libheif in the Development Environment Guide (#201)
* updated instructions to build libheif in the Development Environment Guide and added ninja-build and nasm to the apt install section
1 parent 420c340 commit 6f34942

5 files changed

Lines changed: 57 additions & 43 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 libprotobuf-dev protobuf-compiler libprotobuf-java 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 libprotobuf-dev protobuf-compiler libprotobuf-java 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

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

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ <h1 id="setup-vm">Setup VM</h1>
324324
<p>Open a terminal and run <code>sudo apt update</code></p>
325325
</li>
326326
<li>
327-
<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 libprotobuf-dev protobuf-compiler libprotobuf-java 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>
327+
<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 libprotobuf-dev protobuf-compiler libprotobuf-java 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>
328328
</li>
329329
<li>
330330
<p>Run <code>sudo ln --symbolic /usr/include/x86_64-linux-gnu/openblas-pthread/cblas.h /usr/include/cblas.h</code></p>
@@ -450,13 +450,20 @@ <h1 id="setup-vm">Setup VM</h1>
450450
</ul>
451451
<pre><code class="language-bash">mkdir /tmp/libheif;
452452
cd /tmp/libheif;
453-
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.12.0.tar.gz \
453+
wget -O- https://github.com/strukturag/libheif/archive/refs/tags/v1.20.2.tar.gz \
454454
| tar --extract --gzip;
455-
cd libheif-1.12.0;
455+
cd libheif-1.20.2/third-party;
456+
bash aom.cmd;
457+
cd ..;
456458
mkdir build;
457459
cd build;
458-
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false ..;
459-
sudo make --jobs &quot;$(nproc)&quot; install;
460+
PKG_CONFIG_PATH=&quot;/tmp/libheif/libheif-1.20.2/third-party/aom/dist/lib/pkgconfig&quot; \
461+
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DWITH_EXAMPLES=false -DWITH_AOM_DECODER=true -DENABLE_PLUGIN_LOADING=false -DCMAKE_BUILD_TYPE=Release ..;
462+
sudo make --jobs &quot;$(nproc)&quot; install/strip;
463+
sudo cp heifio/libheifio.a /usr/lib64;
464+
cd ../heifio;
465+
sudo mkdir -p /usr/include/libheif/heifio;
466+
sudo cp *.h /usr/include/libheif/heifio;
460467
cd;
461468
sudo rm -rf /tmp/libheif;
462469
</code></pre>

docs/site/index.html

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

401401
<!--
402402
MkDocs version : 0.17.5
403-
Build Date UTC : 2024-09-04 16:05:50
403+
Build Date UTC : 2025-09-09 16:55:36
404404
-->

0 commit comments

Comments
 (0)