On Wed, Feb 03, 2021 at 12:06:10PM -0800, Andrii Nakryiko wrote: SNIP > > > >> > > > >> but pkg-config tells me: > > > >> > > > >> $ pkg-config --modversion libelf > > > >> 0.168 > > > >> $ pkg-config --libs libelf > > > >> -lelf > > > >> > > > >> > > > >> Any ideas? > > > > > > > > This usually happens because there's a stale cache of the feature > > > > detection tests lying around somewhere. Look for a 'feature' directory > > > > in whatever subdir you got that error. Just removing the feature > > > > directory usually fixes this; I've fixed a couple of places where this > > > > is not picked up by 'make clean' (see, e.g., 9d9aae53b96d ("bpf/preload: > > > > Make sure Makefile cleans up after itself, and add .gitignore")) but I > > > > wouldn't be surprised if there are still some that are broken. > > > > > > Hi, > > > > > > Thanks for replying. > > > > > > I removed the feature subdir and still got this build error, so I > > > removed everything in BUILDDIR/kernel/bpf/preload and rebuilt -- > > > and still got the same libelf build error. > > > > I hate the complexity of feature detection framework to the point that > > I'm willing to rip it out from libbpf's Makefile completely. I just > > spent an hour trying to understand what's going on in a very similar > > situation. Extremely frustrating. I have plans to rework this and get rid of the make code which is the worst part of that for me.. I'll speed it up ;-) jirka