# libEGL.so.1 cannot be found

**URL:** <https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467>\
**Category:** DRIVE AGX Xavier General\
**Tags:** driveworks\
**Created:** [June 24, 2020, 1:45pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467 "2020-06-24T13:45:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 24, 2020, 1:45pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/1 "2020-06-24T13:45:51Z")

</div>

**Hardware Platform:** DRIVE AGX Pegasus™ Developer Kit  
**Software Version:** DRIVE Software 10  
**Host Machine Version:** Ubuntu 18.04  
**SDK Manager Version:** 1.1.0.6343

Hello,

I wanted to cross compile some code and samples onto the target but I get the following error when executing “make -j”:

```
/home/.../nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)

```

Last week, however, everything was still working fine. How can I fix this now?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![SivaRamaKrishnaNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sivaramakrishnanv/32/14043_2.png) [@SivaRamaKrishnaNV](https://forums.developer.nvidia.com/u/SivaRamaKrishnaNV)\
**Post date:** [June 24, 2020, 2:06pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/2 "2020-06-24T14:06:10Z")

</div>

Dear @kn10,  
Few questions, do you see libEGL.so.1 in the same path as mentioned in error. Did you select both host and target components while installing DRIVE SW 10 via sdkmanager?

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 24, 2020, 2:30pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/3 "2020-06-24T14:30:54Z")

</div>

Dear @SivaRamaKrishnaNV,

no, I do not see libEGL.so.1 in the same path as mentioned in the error above.

Yes, I selected both host and target components during the installation. As I mentioned in my post above, everything worked fine last week.

---

<div class="post-metadata">

**Author:** ![SivaRamaKrishnaNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sivaramakrishnanv/32/14043_2.png) [@SivaRamaKrishnaNV](https://forums.developer.nvidia.com/u/SivaRamaKrishnaNV)\
**Post date:** [June 24, 2020, 3:10pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/4 "2020-06-24T15:10:30Z")

</div>

Dear @kn10,  
Please empty the build folder and check the steps Could you please provide complete cmake and make logs. Also check if you see any issue with host compilation?

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 24, 2020, 4:02pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/5 "2020-06-24T16:02:37Z")

</div>

Dear @SivaRamaKrishnaNV,

I emptied the build folder and repeated the steps - it did not solve the problem.

Here are the log files:

[CMakeError.log](https://forums.developer.nvidia.com/uploads/short-url/k1TyzzQtF9VPldBBMczS2w7etqj.log) (6.2 KB)  
[CMakeOutput.log](https://forums.developer.nvidia.com/uploads/short-url/gL1049D4BW08cd6PRHszRzM64QM.log) (137.0 KB)  
[make\_log.txt](https://forums.developer.nvidia.com/uploads/short-url/8UEMrNNGWhWm5V9ghcW0ljNc6jp.txt) (35.7 KB)

Compiling on host works fine, there are no errors and issues.

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 24, 2020, 4:35pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/6 "2020-06-24T16:35:41Z")

</div>

Hi @kn10,

Because I cannot find the file in your current path (~/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target), could you try with including below as your library searching path?

~/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/targetfs\_a/usr/lib/aarch64-linux-gnu

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 25, 2020, 9:56am UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/7 "2020-06-25T09:56:49Z")

</div>

Hi @VickNV,

thank you for your response. I am not quite sure if I know what you mean. How and where exactly should I include the library searching path?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 25, 2020, 1:15pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/8 "2020-06-25T13:15:48Z")

</div>

According to below snippet from your [CMakeError.log](https://forums.developer.nvidia.com/uploads/short-url/k1TyzzQtF9VPldBBMczS2w7etqj.log), it was wrongly looking for libpthread **s**.so (should be libpthread.so).

/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/…/toolchains/gcc-linaro-7.3.1-2018.05-x86\_64\_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -fPIC -gsplit-dwarf -DCHECK\_FUNCTION\_EXISTS=pthread\_create -L/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target -L/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/targetfs/lib/aarch64-linux-gnu -Wl,-rpath,/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target -L/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target -L/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/targetfs/lib/aarch64-linux-gnu -Wl,-rpath,/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target CMakeFiles/cmTC\_a890c.dir/CheckFunctionExists.c.o -o cmTC\_a890c -lpthread **s**  
/home/dlr-sr-faz/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86\_64\_aarch64-linux-gnu/bin/…/lib/gcc/aarch64-linux-gnu/7.3.1/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lpthread **s**

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 25, 2020, 1:22pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/9 "2020-06-25T13:22:25Z")

</div>

Thanks for your reply. Where do I have to change this? In which file?

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 25, 2020, 2:21pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/10 "2020-06-25T14:21:25Z")

</div>

You can search “pthreads” in your project tree. I believe it’s just a typo.

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 26, 2020, 2:02pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/11 "2020-06-26T14:02:45Z")

</div>

Dear @VickNV,

I solved the problem.

Now, I am able to cross compile my code again. However, I still get the following warning:

```
/home/.../nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.3.1/../../../../aarch64-linux-gnu/bin/ld: warning: libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)

```

Despite receiving the warning, the compilation does not throw an error. Should we be worried about this warning or can we ignore it in the future?

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 26, 2020, 2:23pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/12 "2020-06-26T14:23:05Z")

</div>

My previous post should be able to solve the warning. You can find libEGL.so.1 under the path I mentioned there.

> [@libEGL.so.1 cannot be found](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/6):
>
> Hi @kn10, Because I cannot find the file in your current path (~/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/lib-target), could you try with including below as your library searching path? ~/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux/targetfs\_a/usr/lib/aarch64-linux-gnu

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 26, 2020, 2:34pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/13 "2020-06-26T14:34:34Z")

</div>

Yes, I can find it there in the path you mentioned. But how can I include this correctly as a library searching path in the DRIVE software framework? In which file do I have to specify the searching path? In CMakeLists.txt? And how? That is what I am struggling with at the moment since the cmake structure is quite complex.

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 26, 2020, 2:45pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/14 "2020-06-26T14:45:31Z")

</div>

It should be in the file which you assigned to cmake with below option.

-DCMAKE\_TOOLCHAIN\_FILE=\<your file\>

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [June 30, 2020, 11:41am UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/15 "2020-06-30T11:41:55Z")

</div>

Hi @VickNV,

I tried setting the library search path you mentioned above by adding the following to the Toolchain-V5L.cmake file (which is the file I assign to -DCMAKE\_TOOLCHAIN\_FILE):

```
set(CMAKE_LIBRARY_PATH ${LD_PATH} /home/dlr-sr-faz/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/targetfs_a/usr/lib/aarch64-linux-gnu)

```

However, I still get the warning above regarding libEGL.so.1. Did I set the library search path correctly? I just can’t seem to figure out how to set it and how to get rid of the warning. Could you maybe post how it is correctly set?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [June 30, 2020, 2:25pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/16 "2020-06-30T14:25:32Z")

</div>

Please search the library with below command:

$ sudo find ~/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux -iname ‘libEGL.so.1’

Then refer to /usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake and then update below lines of it with the path you figured out previously (e.g. change targetfs to targetfs\_a).

set(LD\_PATH ${VIBRANTE\_PDK}/lib-target)  
set(LD\_PATH\_EXTRA ${VIBRANTE\_PDK}/targetfs/lib/aarch64-linux-gnu)

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [July 1, 2020, 1:19pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/17 "2020-07-01T13:19:06Z")

</div>

Dear @VickNV,

I did the following:

I found the path in which libEGL.so.1 is. It is in

```
~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/targetfs_a/usr/lib/aarch64-linux-gnu

```

I copied this path and added it to the two lines you mentioned in the Toolchain-V5L.cmake which results in the following:

```
set(LD_PATH ${VIBRANTE_PDK}/lib-target ~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/targetfs_a/usr/lib/aarch64-linux-gnu)

set(LD_PATH_EXTRA ${VIBRANTE_PDK}/targetfs/lib/aarch64-linux-gnu ~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/targetfs_a/usr/lib/aarch64-linux-gnu)

```

However, when I try to compile it, it does not work. It throws a lot of different errors.

Is there any other way to resolve this problem?

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [July 1, 2020, 2:10pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/18 "2020-07-01T14:10:07Z")

</div>

You need to understand how /usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake uses LD\_PATH and LD\_PATH\_EXTRA to find the libEGL.so.1 and then you can manipulate your toolchain file accordingly. For example, you see “libEGL.so.1, needed by /usr/local/driveworks-2.2/targets/aarch64-Linux/lib/libnvinfer.so.5, not found (try using -rpath or -rpath-link)” so you should set CMAKE\_SHARED\_LINKER\_FLAGS / CMAKE\_MODULE\_LINKER\_FLAGS / CMAKE\_EXE\_LINKER\_FLAGS with the paths.

If you can provide the package for my reproducing here, I can help you further.

---

<div class="post-metadata">

**Author:** ![kn10](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kn10](https://forums.developer.nvidia.com/u/kn10)\
**Post date:** [July 1, 2020, 2:40pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/19 "2020-07-01T14:40:16Z")

</div>

Dear @VickNV,

yes, the Toolchain-V5L.cmake file is very complex and I am having a hard time completely understanding it. Therefore, I am extremely glad that you are helping me.

What do you mean by package? I am basically compiling the default samples with the default Toolchain-V5L.cmake file. I did not change anything. I am using it out-of-the-box. If you want, I can send you the Toolchain-V5L.cmake file.

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [July 2, 2020, 5:43pm UTC](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467/20 "2020-07-02T17:43:45Z")

</div>

Sorry that I didn’t know you are compling the default samples. If that’s the case, after installing DRIVE Software 10.0 you can browse file:///home/$USER/Documents/DRIVE\_SW\_10.0\_References/DRIVE\_Software/DRIVE\_AV\_doxy\_files/dwx\_samples\_building\_V5L.html and follow the steps there to cross compile the samples.

Below commands should work:

$ cmake -DCMAKE\_BUILD\_TYPE=Release -DCMAKE\_TOOLCHAIN\_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake -DVIBRANTE\_PDK:STRING=$HOME/nvidia/nvidia\_sdk/DRIVE\_Software\_10.0\_Linux\_OS\_DDPX/DRIVEOS/drive-t186ref-linux /usr/local/driveworks/samples  
$ make -j

Thanks!

[Next page](https://forums.developer.nvidia.com/t/libegl-so-1-cannot-be-found/129467.md?page=2)
