Subject: Re: can't find include file (using libelf)
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/13/2005 22:47:00
On Tue, 13 Dec 2005, Jeremy C. Reed wrote:

>> Any ideas? Something I should add to devel/libelf/buildlink3.mk??
>
> My workaround was to patch three ltrace source files with:
>
> -#include <gelf.h>
> +#include <libelf/gelf.h>
>
> What is the pkgsrc/buildink3 way so I don't have to patch the files (to find 
> the header provided by pkgsrc/devel/libelf)?

My problem was "-I-" which caused my first -I/usr/include/libelf to not be 
used for #include <gelf.h>.

So I patched the Makefile.in to readd the @CPPFLAGS@ after it. But the 
buildlink3 wrappers removed the second -- the duplicate -- 
-I/usr/include/libelf. How can I stop that?

Anyways, I removed my BUILDLINK_INCDIRS.libelf+=include/libelf and only 
set CPPFLAGS+=-I${BUILDLINK_DIR}/include/libelf
and all is well.

  Jeremy C. Reed

  	  	 	 Media Relations and Publishing Services
 	  	 	 http://www.reedmedia.net/