Reputation: 549
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.
Upvotes: 1
Views: 1144
Reputation: 71
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.
Upvotes: 1
Reputation: 4373
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.
Upvotes: 0