# Error building Libargus samples

**URL:** <https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666>\
**Category:** Jetson TX1\
**Created:** [February 8, 2020, 2:50pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666 "2020-02-08T14:50:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnuvenkatesh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vishnuvenkatesh99](https://forums.developer.nvidia.com/u/vishnuvenkatesh99)\
**Post date:** [February 8, 2020, 2:50pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/1 "2020-02-08T14:50:46Z")

</div>

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](https://docs.nvidia.com/jetson/archives/l4t-multimedia-archived/l4t-multimedia-281/l4t_mm_jpeg_capture_group.html)

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [February 10, 2020, 6:10am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/2 "2020-02-10T06:10:30Z")

</div>

hello vishnuvenkatesh99,

may I know which [JetPack](https://developer.nvidia.com/embedded/jetpack-archive) release version you’re working with,  
please also double check you’re using the same release of [L4T Multimedia API Reference](https://developer.nvidia.com/embedded/downloads#?search=L4T%20Multimedia%20API) package.  
thanks

---

<div class="post-metadata">

**Author:** ![vishnuvenkatesh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vishnuvenkatesh99](https://forums.developer.nvidia.com/u/vishnuvenkatesh99)\
**Post date:** [February 11, 2020, 5:27am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/3 "2020-02-11T05:27:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [February 11, 2020, 7:41am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/4 "2020-02-11T07:41:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [February 12, 2020, 2:47am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/5 "2020-02-12T02:47:22Z")

</div>

Hi vishnuvenkatesh99,

You can try following command and make again:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![vishnuvenkatesh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vishnuvenkatesh99](https://forums.developer.nvidia.com/u/vishnuvenkatesh99)\
**Post date:** [February 13, 2020, 4:08pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/6 "2020-02-13T16:08:54Z")

</div>

> [@JerryChang](#):
>
> 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

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](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:

```auto
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

```

> [@carolyuu](#):
>
> Hi vishnuvenkatesh99,
> 
> You can try following command and make again:
> 
> ```auto
> 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 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.

```auto
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!

 ![first_two_commands_screenshot.png](https://global.discourse-cdn.com/nvidia/original/2X/1/13204c8e0f48835815ea967a6c3ba439dc83eed6.png)  
 ![broken_link_screenshot.png](https://global.discourse-cdn.com/nvidia/original/2X/a/ac553feca9ba923c7686fce3798a7971aff9f951.png)

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [February 14, 2020, 1:47am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/7 "2020-02-14T01:47:03Z")

</div>

Hi vishnuvenkatesh99,

Run below command can fix the error:

```auto
sudo apt-get install libv4l-dev

```

---

<div class="post-metadata">

**Author:** ![vishnuvenkatesh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vishnuvenkatesh99](https://forums.developer.nvidia.com/u/vishnuvenkatesh99)\
**Post date:** [February 14, 2020, 1:10pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/8 "2020-02-14T13:10:09Z")

</div>

> [@carolyuu](#):
>
> Hi vishnuvenkatesh99,
> 
> Run below command can fix the error:
> 
> ```auto
> sudo apt-get install libv4l-dev
> 
> ```

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

```auto
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:

```auto
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):

```auto
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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [February 17, 2020, 2:23am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/9 "2020-02-17T02:23:46Z")

</div>

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](https://developer.nvidia.com/nvidia-sdk-manager) to flash and install sdk components again?

---

<div class="post-metadata">

**Author:** ![vishnuvenkatesh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vishnuvenkatesh99](https://forums.developer.nvidia.com/u/vishnuvenkatesh99)\
**Post date:** [February 21, 2020, 12:47pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/10 "2020-02-21T12:47:15Z")

</div>

Tried flashing again, and encountered these errors:

```auto
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.

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [February 24, 2020, 2:02am UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/11 "2020-02-24T02:02:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:57pm UTC](https://forums.developer.nvidia.com/t/error-building-libargus-samples/111666/12 "2021-10-18T18:57:07Z")

</div>

Closed on October 18, 2021, 6:57pm UTC


