0

This is Slackware 14.1 Linux. During compiling it always fail at

/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lexecinfo

Is there a library missing? The problem is I don't know the exact file name it's looking for, I have a

     /usr/include/execinfo.h 

Any help will be appreciated.

BioRod
  • 529
  • 1
  • 5
  • 19
  • That's ld, the linker, which is unable to find that library. Most probably it looks for `libexecinfo.so` and similar but cannot find it. Try to install it if you don't find it. – fedepad Jan 11 '17 at 20:49

2 Answers2

0

If the program is trying to use backtrace(3) or the like, then it's likely you do not actually need the -lexecinfo option to compile the source. Edit your Makefile and try removing it as see if it will build.

Steve Baker
  • 4,323
  • 1
  • 20
  • 15
0

To build on Steve's answer, glibc contains backtrace and friends, which are GNU extensions. Therefore, on glibc systems, no extra linker flag is needed to get the backtrace symbols, so you should remove the -lexecinfo flag.

However, non-glibc systems can use an external libexecinfo to provide these symbols, in which case -lexecinfo is needed.

bacchus
  • 41
  • 6