Unable to build jetson_multimedia_api samples using NVIDIA L4T JetPack container

On a (non-Xavier) machine, I’m trying to build the jetson_multimedia_api samples using the l4t-jetpack image (running through qemu), but it appears that the image is missing some dependencies.

$ docker run -it nvcr.io/nvidia/l4t-jetpack:r35.1.0
root@9821bb281e43:/# cd /usr/src/jetson_multimedia_api/
root@9821bb281e43:/usr/src/jetson_multimedia_api# make
Make in samples/00_video_decode
make[1]: Entering directory '/usr/src/jetson_multimedia_api/samples/00_video_decode'
Compiling: video_decode_csvparser.cpp
Compiling: video_decode_main.cpp
make[2]: Entering directory '/usr/src/jetson_multimedia_api/samples/common/classes'
Compiling: NvElementProfiler.cpp
Compiling: NvElement.cpp
Compiling: NvApplicationProfiler.cpp
Compiling: NvVideoDecoder.cpp
Compiling: NvJpegEncoder.cpp
Compiling: NvVideoConverter.cpp
Compiling: NvBuffer.cpp
Compiling: NvLogging.cpp
Compiling: NvEglRenderer.cpp
Compiling: NvUtils.cpp
Compiling: NvDrmRenderer.cpp
NvDrmRenderer.cpp:18:10: fatal error: xf86drm.h: No such file or directory
   18 | #include <xf86drm.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:41: NvDrmRenderer.o] Error 1
make[2]: Leaving directory '/usr/src/jetson_multimedia_api/samples/common/classes'
make[1]: *** [Makefile:45: /usr/src/jetson_multimedia_api/samples/common/classes/NvElementProfiler.o] Error 2
make[1]: Leaving directory '/usr/src/jetson_multimedia_api/samples/00_video_decode'
make: *** [Makefile:58: all] Error 1

I tried installing nvidia-jetpack inside the container to see if that would help but also ran into issues:

root@aecb93b243c6:/# apt update && apt install nvidia-jetpack
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 https://repo.download.nvidia.com/jetson/common r35.1 InRelease [2555 B]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:4 https://repo.download.nvidia.com/jetson/common r35.1/main arm64 Packages [19.1 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [1142 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1922 kB]                                                                                                
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [9073 B]                                                                                           
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [4577 B]                                                                                          
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-backports/main arm64 Packages [54.8 kB]                                                                                             
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-backports/universe arm64 Packages [27.4 kB]                                                                                         
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [4331 B]                                                                                         
Get:14 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [1533 kB]                                                                                              
Get:15 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [844 kB]                                                                                           
Fetched 5898 kB in 12s (486 kB/s)                                                                                                                                                     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
57 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-jetpack : Depends: nvidia-jetpack-runtime (= 5.0.2-b231) but it is not going to be installed
                  Depends: nvidia-jetpack-dev (= 5.0.2-b231) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Chasing down these packages (nvidia-jetpack-runtime and nvidia-jetpack-dev) and trying to install them just led to more unmet dependencies.

(Using this page as a reference: NVIDIA Container Runtime on Jetson · NVIDIA/nvidia-docker Wiki · GitHub )

Am I missing something? I understand that I won’t be able to run these binaries but I expected that building them would work.

You first need to install below prerequisite, then compile again.

mkdir -p /opt/nvidia/l4t-packages
touch /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall
echo "deb https://repo.download.nvidia.com/jetson/t194 r35.1 main" >> /etc/apt/sources.list
apt update
apt install libdrm-dev nvidia-l4t-multimedia nvidia-l4t-camera

Thanks! That did fix the problem.

Is this documented somewhere?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.