Error building Libargus samples

Hi
I’m having some trouble building and running the sample programs for Libargus that come with the SDK.
I’m following the steps on this page → L4T Multimedia API Reference: 09_camera_jpeg_capture

Skipped step 2 of the ‘Building and Running’ section because CUDA,Opencv4tegra,cuDNN, and TensorRT were already installed (through the NVIDIA SDK Manager, during setup and OS flashing). I’m not using a host Linux system either, so skipped step 4 too.

The samples were located in a different location from what’s mentioned in the documentation - /usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture. In case this is relevant.

When I run ‘sudo make’, I’m getting this error:

jetson@jetsontx:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ sudo make
Compiling: main.cpp
Compiling: /usr/src/jetson_multimedia_api/argus/samples/utils/Thread.cpp
Linking: camera_jpeg_capture
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
collect2: error: ld returned 1 exit status
Makefile:60: recipe for target 'camera_jpeg_capture' failed
make: *** [camera_jpeg_capture] Error 1

What is causing the problem, and how can it be resolved? Is it an installation problem with EGL, and if so - is there a way to reinstall just those components that would fix the issue and not cause any other problems? If there’s any other info I need to provide, I can do that. Very new to Jetson development.

Any help is appreciated! Thanks.

hello vishnuvenkatesh99,

may I know which JetPack release version you’re working with,
please also double check you’re using the same release of L4T Multimedia API Reference package.
thanks

Hi JerryChang, thanks for the reply.

I’m using JetPack 4.3, the most recent version (we installed JetPack using NVIDIA SDK Manager barely around two weeks ago). I presume I should be looking at the most recent version of the L4T Multimedia API Reference too - which is 32.3.1. I did happen to be looking at a slightly older version - 28.1 - but the relevant sections are the same in both versions, and slightly different from what actually was. Please advise.
Thanks

hello vishnuvenkatesh99,

could you please have a try again with SDKmanager to install SDK components,
or, you may execute commands on your platform to install those components, $ sudo apt-get install nvidia-jetpack
thanks

Hi vishnuvenkatesh99,

You can try following command and make again:

sudo apt-get install libegl1-mesa-dev
sudo apt-get install libgles2-mesa-dev
cd /usr/lib/aarch64-linux-gnu/
sudo ln -sf tegra-egl/libEGL.so libEGL.so

Tried both of these. Installation was giving us some trouble (https://devtalk.nvidia.com/default/topic/1071378/jetson-tx1/failed-to-install-sdk-components-on-jetson-tx1-using-sdk-manager/post/5427904/#5427904) so we managed to just flash the OS without installing JetPack, and then ran ‘$ sudo apt-get install nvidia-jetpack’ from the TX1’s terminal. It gave me different errors this time:

jetson@jetson-desktop:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ sudo make
Linking: camera_jpeg_capture
/usr/bin/ld: cannot find -lv4l2
/usr/bin/ld: cannot find -lEGL
collect2: error: ld returned 1 exit status
Makefile:60: recipe for target 'camera_jpeg_capture' failed
make: *** [camera_jpeg_capture] Error 1

Tried executing all of these as well. The first two packages were already installed and the last one created a broken link (screenshots attached) - so I took a look at the tegra-egl directory, and found that there was no “libEGL.so” there. The link doesn’t point to anything at the moment.

jetson@jetson-desktop:/usr/lib/aarch64-linux-gnu/tegra-egl$ ls
ld.so.conf  libEGL_nvidia.so.0  libGLESv1_CM_nvidia.so.1  libGLESv2_nvidia.so.2  nvidia.json

No luck with either of the attempts. Please assist. Thanks!


Hi vishnuvenkatesh99,

Run below command can fix the error:

sudo apt-get install libv4l-dev
1 Like

I ran this command and it resolved one of the errors, but I still have one error left.

jetson@jetson-desktop:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ sudo make
Linking: camera_jpeg_capture
/usr/bin/ld: cannot find -lEGL
collect2: error: ld returned 1 exit status
Makefile:60: recipe for target 'camera_jpeg_capture' failed
make: *** [camera_jpeg_capture] Error 1

I thought of running this command, which JerryChang suggested:

sudo ln -sf tegra-egl/libEGL.so libEGL.so

with the libEGL files present in the tegra-egl folder (I thought the names might have changed slightly from libEGL.so):

jetson@jetson-desktop:/usr/lib/aarch64-linux-gnu/tegra-egl$ ls
ld.so.conf  libEGL_nvidia.so.0  libGLESv1_CM_nvidia.so.1  libGLESv2_nvidia.so.2  nvidia.json

The link was created and I tried running ‘sudo make’ from the 09_camera_jpeg_capture directory. But now I am getting this error:

jetson@jetson-desktop:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ sudo make
Linking: camera_jpeg_capture
/usr/bin/ld: /usr/src/jetson_multimedia_api/samples/common/classes/NvEglRenderer.o: undefined reference to symbol 'eglDestroySurface'
//usr/lib/aarch64-linux-gnu/libEGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:60: recipe for target 'camera_jpeg_capture' failed
make: *** [camera_jpeg_capture] Error 1

for each link.

Any help will be appreciated. Thanks!

Hi vishnuvenkatesh99,

Looks you lost many files.
Does the “sudo apt-get install nvidia-jetpack” command run success and full finish?
$ sudo apt-get update
$ sudo apt-get install nvidia-jetpack

Could you try using sdkmanager to flash and install sdk components again?

Tried flashing again, and encountered these errors:

04:24:46 ERROR : File System and OS : /bin/ls:
04:24:46 ERROR : File System and OS : cannot access '*.dtb'
04:24:46 ERROR : File System and OS : : No such file or directory
04:38:35 ERROR : Flash Jetson TX1 : Board ID(2180) version(410)
04:38:35 ERROR : Flash Jetson TX1 : 1+0 records in
04:44:37 ERROR : Flash Jetson TX1 :
04:44:37 ERROR : Flash Jetson TX1 : 0: RAW: 4259840( 1040 blks) ==> 28:4259852
04:44:37 ERROR : Flash Jetson TX1 : 1: SKP: 12288( 3 blks) ==> 4259880:12
04:44:37 ERROR : Flash Jetson TX1 : 3: SKP: 61440( 15 blks) ==> 4264000:12
04:44:38 ERROR : Flash Jetson TX1 : 5: SKP: 33550336( 8191 blks) ==> 4268120:12
04:44:38 ERROR : Flash Jetson TX1 : 6: RAW: 28672( 7 blks) ==> 4268132:28684
04:44:38 ERROR : Flash Jetson TX1 : 7: SKP: 96296960( 23510 blks) ==> 4296816:12
04:44:38 ERROR : Flash Jetson TX1 : 8: RAW: 12288( 3 blks) ==> 4296828:12300
04:44:38 ERROR : Flash Jetson TX1 : 9: SKP: 4464640( 1090 blks) ==> 4309128:12
04:44:38 ERROR : Flash Jetson TX1 : 10: RAW: 3444736( 841 blks) ==> 4309140:3444748
04:44:38 ERROR : Flash Jetson TX1 : 12: RAW: 90112( 22 blks) ==> 7753900:90124
04:44:38 ERROR : Flash Jetson TX1 : 13: SKP: 368640( 90 blks) ==> 7844024:12
04:44:38 ERROR : Flash Jetson TX1 : 14: RAW: 15593472( 3807 blks) ==> 7844036:15593484
04:44:38 ERROR : Flash Jetson TX1 : 16: RAW: 147456( 36 blks) ==> 23437532:147468
04:44:38 ERROR : Flash Jetson TX1 : 18: RAW: 77824( 19 blks) ==> 23585012:77836
04:44:38 ERROR : Flash Jetson TX1 : 20: RAW: 331776( 81 blks) ==> 23662860:331788
04:44:38 ERROR : Flash Jetson TX1 : 22: RAW: 835584( 204 blks) ==> 23994660:835596
04:44:38 ERROR : Flash Jetson TX1 : 24: RAW: 143360( 35 blks) ==> 24830268:143372
04:44:38 ERROR : Flash Jetson TX1 : 25: SKP: 290816( 71 blks) ==> 24973640:12
04:44:38 ERROR : Flash Jetson TX1 : 26: RAW: 4194304( 1024 blks) ==> 24973652:4194316
04:44:38 ERROR : Flash Jetson TX1 : 28: RAW: 196608( 48 blks) ==> 29167980:196620
04:44:38 ERROR : Flash Jetson TX1 : 29: SKP: 274432( 67 blks) ==> 29364600:12
04:44:38 ERROR : Flash Jetson TX1 : 30: RAW: 278528( 68 blks) ==> 29364612:278540
04:44:38 ERROR : Flash Jetson TX1 : 32: RAW: 434176( 106 blks) ==> 29643164:434188
04:44:38 ERROR : Flash Jetson TX1 : 34: RAW: 4096( 1 blks) ==> 30077364:4108
04:44:38 ERROR : Flash Jetson TX1 : 35: SKP: 1339392( 327 blks) ==> 30081472:12
04:44:38 ERROR : Flash Jetson TX1 : 36: RAW: 45056( 11 blks) ==> 30081484:45068
04:44:38 ERROR : Flash Jetson TX1 : 37: SKP: 372736( 91 blks) ==> 30126552:12
04:44:38 ERROR : Flash Jetson TX1 : 38: RAW: 20480( 5 blks) ==> 30126564:20492
04:44:38 ERROR : Flash Jetson TX1 : 40: RAW: 16384( 4 blks) ==> 30147068:16396
04:44:38 ERROR : Flash Jetson TX1 : 41: SKP: 4096( 1 blks) ==> 30163464:12
04:44:38 ERROR : Flash Jetson TX1 : 42: RAW: 4096( 1 blks) ==> 30163476:4108
04:44:38 ERROR : Flash Jetson TX1 : 43: SKP: 16384( 4 blks) ==> 30167584:12
04:44:38 ERROR : Flash Jetson TX1 : 44: RAW: 4096( 1 blks) ==> 30167596:4108
04:44:38 ERROR : Flash Jetson TX1 : 45: SKP: 4096( 1 blks) ==> 30171704:12
04:44:38 ERROR : Flash Jetson TX1 : 46: RAW: 4096( 1 blks) ==> 30171716:4108
04:44:38 ERROR : Flash Jetson TX1 : 47: SKP: 8192( 2 blks) ==> 30175824:12
04:44:38 ERROR : Flash Jetson TX1 : 48: RAW: 4096( 1 blks) ==> 30175836:4108
04:44:38 ERROR : Flash Jetson TX1 : 49: SKP: 8192( 2 blks) ==> 30179944:12
04:44:38 ERROR : Flash Jetson TX1 : 50: RAW: 4096( 1 blks) ==> 30179956:4108
04:44:38 ERROR : Flash Jetson TX1 : 51: SKP: 8192( 2 blks) ==> 30184064:12
04:44:38 ERROR : Flash Jetson TX1 : 52: RAW: 6422528( 1568 blks) ==> 30184076:6422540
04:44:38 ERROR : Flash Jetson TX1 : 53: SKP: 73728( 18 blks) ==> 36606616:12
04:44:38 ERROR : Flash Jetson TX1 : 55: SKP: 8192( 2 blks) ==> 36618928:12
04:44:38 ERROR : Flash Jetson TX1 : 56: RAW: 1536000( 375 blks) ==> 36618940:1536012
04:44:38 ERROR : Flash Jetson TX1 : 58: RAW: 49152( 12 blks) ==> 38154964:49164
04:44:38 ERROR : Flash Jetson TX1 : 60: RAW: 331776( 81 blks) ==> 38204140:331788
04:44:38 ERROR : Flash Jetson TX1 : 62: RAW: 200704( 49 blks) ==> 38535940:200716
04:44:38 ERROR : Flash Jetson TX1 : 64: RAW: 86016( 21 blks) ==> 38736668:86028
04:44:38 ERROR : Flash Jetson TX1 : 65: SKP: 28672( 7 blks) ==> 38822696:12
04:44:38 ERROR : Flash Jetson TX1 : 66: RAW: 12288( 3 blks) ==> 38822708:12300
04:44:38 ERROR : Flash Jetson TX1 : 67: SKP: 12288( 3 blks) ==> 38835008:12
04:44:38 ERROR : Flash Jetson TX1 : 68: RAW: 4096( 1 blks) ==> 38835020:4108
04:44:38 ERROR : Flash Jetson TX1 : 69: SKP: 28672( 7 blks) ==> 38839128:12
04:44:38 ERROR : Flash Jetson TX1 : 70: RAW: 6791168( 1658 blks) ==> 38839140:6791180
04:44:38 ERROR : Flash Jetson TX1 : 71: SKP: 12288( 3 blks) ==> 45630320:12
04:44:38 ERROR : Flash Jetson TX1 : 72: RAW: 32768( 8 blks) ==> 45630332:32780
04:44:38 ERROR : Flash Jetson TX1 : 73: SKP: 16384( 4 blks) ==> 45663112:12
04:44:38 ERROR : Flash Jetson TX1 : 74: RAW: 8192( 2 blks) ==> 45663124:8204
04:44:38 ERROR : Flash Jetson TX1 : 75: SKP: 4096( 1 blks) ==> 45671328:12
04:44:38 ERROR : Flash Jetson TX1 : 76: RAW: 864256( 211 blks) ==> 45671340:864268
04:44:38 ERROR : Flash Jetson TX1 : 78: RAW: 40960( 10 blks) ==> 46535620:40972
04:44:38 ERROR : Flash Jetson TX1 : 79: SKP: 4096( 1 blks) ==> 46576592:12
04:44:38 ERROR : Flash Jetson TX1 : 80: RAW: 18415616( 4496 blks) ==> 46576604:18415628
04:44:38 ERROR : Flash Jetson TX1 : 81: SKP: 7360512( 1797 blks) ==> 64992232:12

and more lines like the last few, until “ERROR: Flash Jetson TX1 : 4703”.

Is there a way to resolve the errors on the first few lines? An alternate way to get the .dtb file?

Given the number of times I have tried reflashing the OS (definitely above ten times) I am starting to think I’m doing something wrong and the documentation I’m following may be outdated or incorrect. Could you possibly provide me with a procedure you know will work? (note: there seems to be very little documentation available for using SDK Manager. Most of it seems to be written before the SDK Manager was released).

Are there any not-so-obvious steps I may have missed during the install? (for example, I saw a couple of threads where people had written about extending the memory using SSDs or external drives. Storage didn’t seem to be an issue in our case so I didn’t look too deeply into it)

Really at the end of my wits here, have been trying different things for nearly a month now (including setting up a fresh Ubuntu install before downloading SDK Manager) and nothing has worked. Any help is appreciated! Thanks in advance.

Hi vishnuvenkatesh99,

This ERROR is known issue, sorry for confused you.
You can ignore this error, we will fixed this issue on next JetPack version.
Please try again and select correct target device, the sdkmanager will keep running and flash image and install sdk components.

1 Like