0

I'm getting following errors after running make command:

/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -laio
/usr/bin/ld: cannot find -lcurl
/usr/bin/ld: cannot find -lssh2
/usr/bin/ld: cannot find -lncursesw
/usr/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status
main/CMakeFiles/esesc.dir/build.make:163: recipe for target 'main/esesc' failed
make[2]: *** [main/esesc] Error 1
CMakeFiles/Makefile2:1041: recipe for target 'main/CMakeFiles/esesc.dir/all' failed
make[1]: *** [main/CMakeFiles/esesc.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2

I have tried to search online in these links: ld cannot find an existing library

usr/bin/ld: cannot find -l<nameOfTheLibrary>

Here I see that every library has to be linked symbolically with the existing library but I'm unsure of doing that. Can anyone please suggest me any technique for doing this?

I know locate <library> and ln commands. Now how to eliminate the above errors using this? Can anyone please elaborate on this? Thanks in advance.

Community
  • 1
  • 1
Bhaskar Jupudi
  • 45
  • 1
  • 11

2 Answers2

0

it means you didn't install needed dependencies. did you install at least libs from this manual? https://github.com/masc-ucsc/esesc/blob/master/docs/Usage.md

 sudo apt-get install libepoxy0 libepoxy-dev

should remove epoxy warning, for example

strangeqargo
  • 1,276
  • 1
  • 15
  • 23
0

Your link command probably needs a -L to precede those -l.

Search your system for those libnames, for example GLESv2.

I use "locate GLESv2". (Note: locate uses what "sudo updatedb" updates)

On my Unbuntu, the following lines are reported by locate.

> /usr/lib/x86_64-linux-gnu/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2.0.0

For the so (the shared object library) found in the first dir, you might try adding the following to your build command.

-L/usr/lib/x86_64-linux-gnu

And repeat for any library name not yet resolved.

Here is an example from my Makefile - note the relative path to a collection of libraries I wrote in a directory "bag"


R01: dtb_acs.cc 
rm -f dtb_acs 
g++ -m64 -O3 -ggdb -std=c++14 -Wall-Wextra -Wshadow -Wnon-virtual-dtor
 -pedantic -Wcast-align -Wcast-qual -Wconversion -Wpointer-arith -Wunused
 -Woverloaded-virtual   
  -O0   dtb_acs.cc  -o dtb_acs  
 -L../../bag -lbag_i686 -lposix_i686 -lrt -pthread
 ^^^^^^^^^^^ three -l<libname> are in the -L dir

If needed (because the effort did not resolve anything), try adding -l and a specific library, such as -llibGLESv2.so (or .a, as the case may be)

Good luck.

2785528
  • 5,438
  • 2
  • 18
  • 20