Building an OpenGL application


I have the latest version of Jetpack (24.1), Jetson TX1.
When I try to build an OpenGL application with Nsight Eclipse on Jetson TX1, I get the following “undefined reference” errors. (On host side I can build it successfully.)

../arm-linux-gnueabihf/ undefined reference to `drmMap'
../arm-linux-gnueabihf/ undefined reference to `drmCloseOnce'
../arm-linux-gnueabihf/ undefined reference to `drmUnmap'
../arm-linux-gnueabihf/ undefined reference to `drmOpenOnce'
../arm-linux-gnueabihf/ undefined reference to `drmCommandWriteRead'

With the previous version of Jetpack, I had no problem building the same program.

Could anyone help me to solve this problem, please?


We noticed that problem too, while compiling the CUDA samples.
Our solution was to change the Link of the GL library from pointing to “/usr/lib/aarch64-linux-gnu/mesa” to "/usr/lib/aarch64-linux-gnu/tegra.
The first path will be different, depending on your application.

cd /home/ubuntu/NVIDIA_CUDA-7.0_Samples/common/lib/linux/aarch64
sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/


You were right!
Changing directly the link file “” in /usr/lib/arm-linux-gnueabihf/ to “/usr/lib/arm-linux-gnueabihf/tegra/” solved my problem.

Thank you very much! :D

Hi blabla019 and kamm,

Thanks for raising this softlink problem, and given the solution.
We’re investigating this packaging issue to find out if there is way to blacklist mesa drivers.


I have the same issue while trying to install gstreamer using:

gst-install --prefix=/home/ubuntu/gst-1.8.2 --version=1.8.2

I think I understand the fix, but cant find where is referenced.

How should I install gstreamer on r24.1???

I had a similar issue however I was building dolphin emulator. My solution is similar to what has been presented. There seems to be an issue with the provided by mesa. I successfully built dolphin emulator and executed ‘gst-install --prefix=/home/ubuntu/gst-1.8.2 --version=1.8.2’.

cd /usr/lib/aarch64-linux-gnu
sudo rm
sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/

Hopefully this helps in the meantime

This works for me, Thanks!

yet, there is another way

LIBRARIES += -lGL -lGLEW -lGLU -lglut -lX11 -ldrm

direct link the /usr/lib/aarch64-linux-gnu/tegra/ could disolve it, means, this library could talk to the kernel directly.